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

add embeddings to TestsetGenerator #1

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

hunter-walden2113
Copy link
Collaborator

Addresses the "no embeddings found" and "API Connection error" issues.
Specifically issues: 1546, 1526, 1512, 1496

Issue to solve is to prevent the default_transforms function from using the llm_factory by forcing the user to add both an embedding model and llm model.

  1. Added embedding_model as an attribute to TestsetGenerator.
  2. Added embedding_model: LangchainEmbeddings as a parameter to TestsetGenerator.from_langchain
  3. Changed the return from TestsetGenerator.from_langchain to return cls(LangchainLLMWrapper(llm), LangchainEmbeddingsWrapper(embedding_model), knowledge_graph)
  4. Added both an llm and embedding_model parameter to TestsetGenerator.generate_with_langchain_docs

Copy link
Collaborator Author

@hunter-walden2113 hunter-walden2113 left a comment

Choose a reason for hiding this comment

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

Changes reviewed

@hunter-walden2113 hunter-walden2113 merged commit 7750ba7 into main Oct 23, 2024
@hunter-walden2113 hunter-walden2113 deleted the 1526-parameterize-models branch October 24, 2024 18:34
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.

1 participant