Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
KotGPT
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Pastushkov
KotGPT
Commits
efce9518
Commit
efce9518
authored
Aug 17, 2025
by
Michael Pastushkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
bd29e57f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
19 deletions
+22
-19
src/api/ConversationManager.js
+8
-6
src/api/TopicRouter.js
+14
-13
No files found.
src/api/ConversationManager.js
View file @
efce9518
...
@@ -66,12 +66,12 @@ class ConversationManager {
...
@@ -66,12 +66,12 @@ class ConversationManager {
messages
:
messages
,
messages
:
messages
,
stream
:
true
,
stream
:
true
,
keep_alive
:
"5m"
,
keep_alive
:
"5m"
,
options
:
{
// options: { // limited results with these, and no performance gains
num_ctx
:
1024
,
//
num_ctx: 1024,
num_predict
:
256
,
//
num_predict: 256,
num_thread
:
4
,
//
num_thread: 4,
num_batch
:
1024
//
num_batch: 1024
}
//
}
});
});
// Making the main request to model
// Making the main request to model
...
@@ -113,6 +113,8 @@ class ConversationManager {
...
@@ -113,6 +113,8 @@ class ConversationManager {
}
}
}
}
callback
(
'
\
n'
);
this
.
history
.
addUser
(
topic
,
prompt
);
this
.
history
.
addUser
(
topic
,
prompt
);
this
.
history
.
addAssistant
(
topic
,
full
);
this
.
history
.
addAssistant
(
topic
,
full
);
}
}
...
...
src/api/TopicRouter.js
View file @
efce9518
...
@@ -30,13 +30,13 @@ class TopicRouter {
...
@@ -30,13 +30,13 @@ class TopicRouter {
model
:
this
.
labelModel
,
model
:
this
.
labelModel
,
messages
:
[{
role
:
'system'
,
content
:
sys
},
{
role
:
'user'
,
content
:
text
}],
messages
:
[{
role
:
'system'
,
content
:
sys
},
{
role
:
'user'
,
content
:
text
}],
stream
:
false
,
stream
:
false
,
options
:
{
// options: { // limited results with these, and no performance gains
num_ctx
:
1024
,
//
num_ctx: 1024,
num_predict
:
256
,
//
num_predict: 256,
num_thread
:
4
,
//
num_thread: 4,
num_batch
:
1024
//
num_batch: 1024
}
//
}
})
,
})
});
});
if
(
!
r
.
ok
)
if
(
!
r
.
ok
)
return
null
;
return
null
;
...
@@ -97,12 +97,13 @@ class TopicRouter {
...
@@ -97,12 +97,13 @@ class TopicRouter {
body
:
JSON
.
stringify
({
body
:
JSON
.
stringify
({
model
:
this
.
embedModel
,
model
:
this
.
embedModel
,
prompt
:
text
,
prompt
:
text
,
options
:
{
// options: { // limited results with these, and no performance gains
num_ctx
:
1024
,
// num_ctx: 1024,
num_predict
:
256
,
// num_predict: 256,
num_thread
:
4
,
// num_thread: 4,
num_batch
:
1024
// num_batch: 1024
}})
// }
})
});
});
utils
.
log
(
'Embed done'
,
5
);
utils
.
log
(
'Embed done'
,
5
);
if
(
!
r
.
ok
)
if
(
!
r
.
ok
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment