Skip to content

Commit

Permalink
fix: Cohere API failing due to not streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
Vali-98 committed Nov 19, 2024
1 parent 969e68b commit 0f15c3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/constants/APIState/CohereAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ class CohereAPI extends APIBase {
preamble: preamble.message,
chat_history: chat_history,
stop: this.constructStopSequence(),
stream: true,
}
return payload
}
inference = async () => {
Logger.log(`Using endpoint: OpenAI`)
Logger.log(`Using endpoint: Cohere`)
this.readableStreamResponse(
'https://api.cohere.com/v1/chat',
JSON.stringify(this.buildPayload()),
Expand Down

0 comments on commit 0f15c3c

Please sign in to comment.