-
Notifications
You must be signed in to change notification settings - Fork 792
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(generator): extend construction to any langchain LLM and Embeddings #670
Conversation
PR Description updated to latest commit (ca53c81) |
Just finalized the PR - It's ready for review now :) |
Wow, thanks man @mspronesti Will review it ASAP |
@shahules786 Thanks :) |
This works very well, thanks @mspronesti! |
Hi there @shahules786, any chance this PR gets reviewed? :) |
Hi @mspronesti apologies for the late review. @jjmachan was testing this out. Will be reviewed soon. |
Hi @mspronesti just finished testing and making some changes to avoid breaking changes. @jjmachan you can do the review now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove all changes made to tackle the removal of (with_openai) function
@shahules786 When I split this PR into two (the second part being #684) I didn't realize that completion models relied on the fact that this parameter needs to default to I have appended one additional commit. Please try again :) Regarding the docs, my suggestion would be to mark Lastly, I find the name |
hey @mspronesti - I agree from_defaults might be ambiguous so lets keep it as as for deprecation I've added the code in this PR but let me think we have to remove it in this version and for the completion bug - nice catch seems like it fixed the issue ❤️ |
Hi @jjmachan, thanks for the review :) I wouldn't remove |
@jjmachan I've just added an extra commit to make the deprecation decorator more versatile and informative, and I've used it on |
this is awesome @mspronesti - I love the depreciation util func - handy! btw would love to hop on a call with you sometime if you are interested @mspronesti 🙂 |
@mspronesti Yes, that actually makes sense. Let's do that. I'll also add some more docs to help community use non-open ai models with it. |
User description
The current version of
with_openai
contains a hardcoded instantiation oflangchain_openai.chat_models.ChatOpenAI
, which makesTestsetGenerator
very limited and not compatible with completion models, Azure OpenAI models, and open-source models.This PR extends
TestsetGenerator
to anyBaseLanguageModel
andEmbeddings
from langchain for versatility, addressing #230, #342, #635, and #636.Lastly, I've removed all the occurrences of mutable default arguments (bad antipattern, read here).