Skip to content

Commit

Permalink
Merge pull request #45 from Henri-J-Norden/openaiapi-fix
Browse files Browse the repository at this point in the history
fix: Invalid OpenAI fields
  • Loading branch information
Vali-98 authored Jun 24, 2024
2 parents 7a7f941 + bee7495 commit 96ea5ab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions constants/APIState/OpenAIAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import { APIBase, APISampler } from './BaseAPI'

class OpenAIAPI extends APIBase {
samplers: APISampler[] = [
{ externalName: 'max_context_length', samplerID: SamplerID.CONTEXT_LENGTH },
{ externalName: 'max_tokens', samplerID: SamplerID.GENERATED_LENGTH },
{ externalName: 'stream', samplerID: SamplerID.REPETITION_PENALTY },
{ externalName: 'temperature', samplerID: SamplerID.TEMPERATURE },
{ externalName: 'presence_penalty', samplerID: SamplerID.PRESENCE_PENALTY },
{ externalName: 'frequency_penalty', samplerID: SamplerID.FREQUENCY_PENALTY },
Expand All @@ -25,6 +23,7 @@ class OpenAIAPI extends APIBase {
return {
...payloadFields,
model: openAIModel.id,
stream: true,
messages: this.buildChatCompletionContext(length),
stop: this.constructStopSequence(),
}
Expand Down

0 comments on commit 96ea5ab

Please sign in to comment.