Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Cohere Endpoint - Add Support for Tools #1490

Merged
merged 3 commits into from
Sep 26, 2024

Conversation

dvirmor
Copy link
Contributor

@dvirmor dvirmor commented Sep 25, 2024

This pull request addresses the issue described in #1404 (comment), where attempting to use tools with the Cohere endpoint results in the following error: cannot specify both message and tool_results in multistep mode.

Since the Chat UI project handles the tool usage process, the multistep feature provided by the Cohere endpoint is unnecessary in this context. Therefore, I've modified the implementation to enforce a single API call, which resolves the issue.

Tested on:

  • OS: Ubuntu 22.04
  • Node.js Version: v22.9.0

@dvirmor
Copy link
Contributor Author

dvirmor commented Sep 25, 2024

Hi @nsarrazin,
I just fix the linting.
In addition, I run npm run test, npm run check and npm run lint to be sure the workflow will pass

@nsarrazin
Copy link
Collaborator

thanks for the fix! 🚀

@nsarrazin nsarrazin merged commit 88e062f into huggingface:main Sep 26, 2024
3 checks passed
ice91 pushed a commit to ice91/chat-ui that referenced this pull request Oct 30, 2024
* fix(endpointCohere): Added force_single_step param to chatStream call

* refactor(endpointCohere): change force_single_step parameter to forceSingleStep for linting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants