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

feat(core): always provide message ID inferred from run ID if not present while streaming #6646

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

dqbd
Copy link
Collaborator

@dqbd dqbd commented Aug 27, 2024

Mirrors the langchain-ai/langchain#19863 PR which adds stable message IDs if not provided by the LLM

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Aug 27, 2024
Copy link

vercel bot commented Aug 27, 2024

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

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 3:17pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Aug 27, 2024 3:17pm

@dosubot dosubot bot added the auto:improvement Medium size change to existing code to handle new use-cases label Aug 27, 2024
@@ -264,6 +264,10 @@ export abstract class BaseChatModel<
callOptions,
runManagers?.[0]
)) {
if (chunk.message.id == null) {
const runId = runManagers?.at(0)?.runId;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh cool didn't know this existed

Copy link
Collaborator

@jacoblee93 jacoblee93 left a comment

Choose a reason for hiding this comment

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

Thank you!

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 lgtm PRs that are ready to be merged as-is size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants