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
partners: AI21 Labs Contextual Answers support #18270
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
looks great! I'll change some nits in the code, and can you add documentation to the bottom of the llms/ai21.ipynb
documentation page?
Understand it's not strictly an LLM, and would be great to get some description there!
libs/partners/ai21/pyproject.toml
Outdated
description = "An integration package connecting AI21 and LangChain" | ||
authors = [] | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.8.1,<4.0" | ||
langchain-core = "^0.1.22" | ||
ai21 = "^2.0.0" | ||
ai21 = "^2.0.5" |
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.
@asafgardin I changed this from 2.0.5
to semver ^2.0.5
which now uses 2.1.2
- were there breaking changes between the two? Lint seems to be saying so
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.
@efriis Yes. We added better handling for default values that are not passed using | NotGiven
so now the lint is throwing an error about it whenever we try to pass None
. We have a task to better handle these types of values so mypy wouldn't raise an error
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.
Got it. So should I just lock this version to 2.0.5 specifically? Currently causing failures in CI
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.
Or do you want to add some logic that programmatically passes the param vs. not, or type it as Any? Happy to follow your lead - you know your sdk better than me and what will work vs. not work :)
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.
@efriis I'll fix the lint issues next week if that's okay by you. I want to merge this first using version 2.0.5 the way it is right now if everything works in the CI.
What do you think?
@efriis Added description to |
fix: Add chunking in embeddings
fix: Revert embeddings
Description: Added support for AI21 Labs model - Contextual Answers Dependencies: ai21, ai21-tokenizer Twitter handle: https://github.com/AI21Labs --------- Co-authored-by: Asaf Gardin <asafg@ai21.com> Co-authored-by: Erick Friis <erick@langchain.dev>
Description: Added support for AI21 Labs model - Contextual Answers Dependencies: ai21, ai21-tokenizer Twitter handle: https://github.com/AI21Labs --------- Co-authored-by: Asaf Gardin <asafg@ai21.com> Co-authored-by: Erick Friis <erick@langchain.dev>
Description: Added support for AI21 Labs model - Contextual Answers Dependencies: ai21, ai21-tokenizer Twitter handle: https://github.com/AI21Labs --------- Co-authored-by: Asaf Gardin <asafg@ai21.com> Co-authored-by: Erick Friis <erick@langchain.dev>
Description: Added support for AI21 Labs model - Contextual Answers
Dependencies: ai21, ai21-tokenizer
Twitter handle: https://github.com/AI21Labs