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: Fix ChatLiteLLMRouter runtime issues #28163

Merged

Conversation

bburgin
Copy link
Contributor

@bburgin bburgin commented Nov 17, 2024

Description: Fix ChatLiteLLMRouter ctor validation and model_name parameter
Issue: #19356, #27455, #28077
Twitter handle: @bburgin_0

Copy link

vercel bot commented Nov 17, 2024

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 Dec 2, 2024 2:36pm

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. community Related to langchain-community 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Nov 17, 2024
@bburgin
Copy link
Contributor Author

bburgin commented Nov 17, 2024

cc: @StephenKThung

@bburgin
Copy link
Contributor Author

bburgin commented Dec 2, 2024

@baskaryan This PR is ready to go in. Can you review and merge it? Thanks.

@ccurme ccurme self-assigned this Dec 16, 2024
@@ -43,6 +56,39 @@
]


# from https://stackoverflow.com/a/78573267
def aiter_to_iter(it: AsyncIterator) -> Generator:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we implement a synchronous _get_fake_results_generator instead of implementing this conversion?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The aiter_to_iter() function allows reuse of the async fake results generator function for both the async and sync cases. I think having a separate synchronous function would lead to duplication of the output and output logic.



@pytest.mark.scheduled
@pytest.mark.enable_socket
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't run community integration tests in CI. is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pytest.mark.enable_socket is needed to run the tests manually on a dev machine, since later versions of pytest disable sockets by default, and we need sockets enabled to run these tests.

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Dec 16, 2024
@ccurme ccurme merged commit 27a9056 into langchain-ai:master Dec 16, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature community Related to langchain-community lgtm PR looks good. Use to confirm that a PR is ready for merging. size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants