Skip to content

mistralai[minor]: Fix throwing abort errors and add tests #4843

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

Merged
merged 5 commits into from
Mar 21, 2024

Conversation

bracesproul
Copy link
Member

@bracesproul bracesproul commented Mar 20, 2024

Closes #4809

Changes:

  • omit stop from the mistral call options, not supported via their sdk
  • move the error thrown if abort controller is aborted to inside the for-await loop since their sdk doesn't support aborting natively
  • if timeout or signal is passed, make the generate method stream instead so we can properly abort
  • add tests

Copy link

vercel bot commented Mar 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 20, 2024 9:25pm
langchainjs-docs ✅ Ready (Inspect) Visit Preview Mar 20, 2024 9:25pm

@bracesproul bracesproul marked this pull request as ready for review March 20, 2024 21:15
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. auto:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The timeout and maxRetries are not passed to the Mistral client
1 participant