Skip to content

fix(core): implement sleep delay in FakeMessagesListChatModel _generate #32014

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 3 commits into from
Jul 18, 2025

Conversation

siddarthreddygsr
Copy link
Contributor

implement sleep delay in FakeMessagesListChatModel._generate so the sleep parameter is respected, matching the documented behavior. This adds artificial latency between responses for testing purposes.

Issue: closes #31974 following docs

Dependencies: none

Twitter handle: @siddarthreddyg2

Copy link

vercel bot commented Jul 14, 2025

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

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 18, 2025 6:12pm

@siddarthreddygsr siddarthreddygsr changed the title fix(FakeMessagesListChatModel): implement sleep delay in _generate me… fix(core): implement sleep delay in FakeMessagesListChatModel _generate Jul 14, 2025
Copy link

codspeed-hq bot commented Jul 14, 2025

CodSpeed WallTime Performance Report

Merging #32014 will not alter performance

Comparing siddarthreddygsr:master (8711c52) with master (50a12a7)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 13 untouched benchmarks

Copy link

codspeed-hq bot commented Jul 14, 2025

CodSpeed Instrumentation Performance Report

Merging #32014 will not alter performance

Comparing siddarthreddygsr:master (8711c52) with master (50a12a7)

Summary

✅ 14 untouched benchmarks

Copy link
Collaborator

@mdrxy mdrxy left a comment

Choose a reason for hiding this comment

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

LGTM, @eyurtsev for final approval

@qwikgig-krishna
Copy link

This looks like a good fix. Have you considered adding a test case to verify that the sleep parameter is respected? This would help prevent regressions in the future.

@mdrxy
Copy link
Collaborator

mdrxy commented Jul 18, 2025

+1 on @qwikgig-krishna, some elementary test would be good here

@siddarthreddygsr
Copy link
Contributor Author

Added the test case @mdrxy

@mdrxy mdrxy merged commit 427d2d6 into langchain-ai:master Jul 18, 2025
65 checks passed
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.

sleep parameter in FakeMessagesListChatModel has no effect
4 participants