Commit b89330c 1 parent 62ad0b4 commit b89330c Copy full SHA for b89330c
File tree 2 files changed +1
-2
lines changed
2 files changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ export const handleOAI: ModelAdapter = async function* (opts) {
41
41
stream : ( gen . streamResponse && kind !== 'summary' ) ?? defaultPresets . openai . streamResponse ,
42
42
temperature : gen . temp ?? defaultPresets . openai . temp ,
43
43
max_tokens : maxResponseLength ,
44
- max_completion_tokens : maxResponseLength ,
45
44
top_p : gen . topP ?? 1 ,
46
45
stop : [ `\n${ handle } :` ] . concat ( gen . stopSequences ! ) ,
47
46
}
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ export async function toChatMessages(
64
64
for ( let i = 0 ; i < history . length ; i ++ ) {
65
65
const line = history [ i ]
66
66
const original = opts . lines [ i ]
67
- const role = original . startsWith ( sender ) ? 'user' : 'assistant'
67
+ const role = original ? .startsWith ( sender ) ? 'user' : 'assistant'
68
68
messages . push ( { role, content : line } )
69
69
}
70
70
You can’t perform that action at this time.
0 commit comments