You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cohere endpoint type doesn't work well with our current tools setup and errors with cannot specify both message and tool_results in multistep mode
Steps to reproduce
Set a .env.local with a model using cohere endpoint type, and set tools: true on that model.
Start a conversation with tool enabled
Context
Logs
Error: {"message":"invalid request: cannot specify both message and tool_results in multistep mode"}
at eval (C:/Users/achar/Documents/aditya/chat-ui/src/lib/server/endpoints/cohere/endpointCohere.ts:93:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async eval (C:/Users/achar/Documents/aditya/chat-ui/src/lib/server/endpoints/cohere/endpointCohere.ts:70:18)
at async Module.generate (C:/Users/achar/Documents/aditya/chat-ui/src/lib/server/textGeneration/generate.ts:8:20)
at async textGenerationWithoutTitle (C:/Users/achar/Documents/aditya/chat-ui/src/lib/server/textGeneration/index.ts:54:3)
at async Module.mergeAsyncGenerators (C:/Users/achar/Documents/aditya/chat-ui/src/lib/utils/mergeAsyncGenerators.ts:13:34)
at async Module.textGeneration (C:/Users/achar/Documents/aditya/chat-ui/src/lib/server/textGeneration/index.ts:24:3)
at async Object.start (C:/Users/achar/Documents/aditya/chat-ui/src/routes/conversation/[id]/+server.ts:329:26) {
[cause]: BadRequestError: BadRequestError
Status code: 400
Body: {}
at CohereClient. (C:\Users\achar\Documents\aditya\chat-ui\node_modules\cohere-ai\Client.js:112:31)
at Generator.next ()
at fulfilled (C:\Users\achar\Documents\aditya\chat-ui\node_modules\cohere-ai\Client.js:31:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
statusCode: 400,
body: ReadableStream { locked: false, state: 'closed', supportsBYOB: false }
Hi, I'm new. I don't know if custom pull requests are welcome here.
I also encounter this issues and I've found a solution:
add force_single_step: true to cohere.chatStream calling in the endpointCohere.ts file.
Bug description
The cohere endpoint type doesn't work well with our current tools setup and errors with
cannot specify both message and tool_results in multistep mode
Steps to reproduce
.env.local
with a model using cohere endpoint type, and settools: true
on that model.Context
Logs
Config
The text was updated successfully, but these errors were encountered: