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

community[patch]: Throw more descriptive errors for Ali toyi chat models #5549

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

sinajia
Copy link
Contributor

@sinajia sinajia commented May 26, 2024

Throw informative exception

Copy link

vercel bot commented May 26, 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 May 26, 2024 7:49am
langchainjs-docs ✅ Ready (Inspect) Visit Preview May 26, 2024 7:49am

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. auto:improvement Medium size change to existing code to handle new use-cases labels May 26, 2024
@@ -593,7 +603,7 @@ export class ChatAlibabaTongyi
continue;
}
try {
yield JSON.parse(line.slice("data:".length).trim());
yield JSON.parse(line.slice("data:".length));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the trim call?

"request_id": "43d18007-5aa5-9d18-b3b3-a55aba9ce8cb"
}
*/
if (!chunk.output) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safer to check for something like chunk.code?

@jacoblee93 jacoblee93 changed the title Ali toyi community[patch]: Throw more descriptive errors for Ali toyi chat models May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:improvement Medium size change to existing code to handle new use-cases size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants