dvirmor commited on
Commit
b642b29
·
unverified ·
1 Parent(s): d100f51

Fix: Cohere Endpoint - Add Support for Tools (#1490)

Browse files

* fix(endpointCohere): Added force_single_step param to chatStream call

* refactor(endpointCohere): change force_single_step parameter to forceSingleStep for linting

src/lib/server/endpoints/cohere/endpointCohere.ts CHANGED
@@ -62,6 +62,7 @@ export async function endpointCohere(
62
  });
63
 
64
  stream = await cohere.chatStream({
 
65
  message: prompt,
66
  rawPrompting: true,
67
  model: model.id ?? model.name,
@@ -82,6 +83,7 @@ export async function endpointCohere(
82
 
83
  stream = await cohere
84
  .chatStream({
 
85
  model: model.id ?? model.name,
86
  chatHistory: formattedMessages.slice(0, -1),
87
  message: formattedMessages[formattedMessages.length - 1].message,
 
62
  });
63
 
64
  stream = await cohere.chatStream({
65
+ forceSingleStep: true,
66
  message: prompt,
67
  rawPrompting: true,
68
  model: model.id ?? model.name,
 
83
 
84
  stream = await cohere
85
  .chatStream({
86
+ forceSingleStep: true,
87
  model: model.id ?? model.name,
88
  chatHistory: formattedMessages.slice(0, -1),
89
  message: formattedMessages[formattedMessages.length - 1].message,