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

[BUG] Cohere API requires array of strings for stop sequence #843

Closed
elebumm opened this issue May 31, 2024 · 2 comments
Closed

[BUG] Cohere API requires array of strings for stop sequence #843

elebumm opened this issue May 31, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@elebumm
Copy link

elebumm commented May 31, 2024

Describe the bug
When you insert a Cohere API key, it gives an error when trying to use the LLM saying:

 Retrying langchain_community.llms.cohere.acompletion_with_retry.<locals>._completion_with_retry in 4.0 seconds as it raised CohereAPIError: invalid type: parameter stop_sequences is of type string but should be of type []Object.

To Reproduce

  1. Insert Cohere API key
  2. Use the LLM
  3. Check console.

Expected behavior
A response, instead it gets hungup with a langchain error.

Additional context
I believe it's because Cheshire Cat is sending just a string instead of an array of strings.

@elebumm elebumm added the bug Something isn't working label May 31, 2024
@valentimarco
Copy link
Member

Hi, thanks for address the issue.
The error seems related to a deprecated version of the class we use to interact with cohere, and a PR is already open to fix the problem.
Sorry for the incontinence but langchain is evolving to fast and we don't XD

@valentimarco
Copy link
Member

We pushed a new version of the cat -> 1.6.2 and should work just fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants