-
Notifications
You must be signed in to change notification settings - Fork 15.5k
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: add reka chat model integration #27379
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
closing as duplicate of #26405 - let me know if they're different |
nvm - got it - personal branch |
looks like CI might still be failing though |
Thanks! Looks like there are a few things failing (due to missing |
Updated to address the token count comment. thanks for the feedback. I have ran make lint, make lint and make test, and make extended_tests which passed. |
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 good to me -- thanks for addressing! i think one lint issue remaining and should be good to merge
@@ -329,11 +330,29 @@ async def _agenerate( | |||
|
|||
return ChatResult(generations=[ChatGeneration(message=message)]) | |||
|
|||
def get_num_tokens(self, text: str) -> int: | |||
def get_num_tokens(self, input: Union[str, BaseMessage, List[BaseMessage]]) -> int: |
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 like the input type here is not matching the one in the token_counter
callable (failing linter)
community: add Reka chat model integration
Description: This PR adds support for the Reka chat model to the LangChain community package. It includes the implementation of ChatReka class, which allows users to interact with Reka's API for chat completions. The integration supports both text and image inputs, streaming responses, and async operations.
Dependencies: This integration inside langchain-community requires the reka-api package to be installed. Users will need to install it separately with pip install reka-api.
Added features:
ChatReka class for interacting with Reka chat models
Support for text and image inputs
Streaming and non-streaming response handling
Synchronous and asynchronous methods
Unit and integration tests
Example notebook demonstrating usage
Testing:
Unit tests have been added in tests/unit_tests/chat_models/test_reka.py
Integration tests have been added in tests/integration_tests/chat_models/test_reka.py
An example notebook has been created in docs/docs/integrations/chat/reka.ipynb, including tool use with search.
I have run make format, make lint, and make test from the root of the community package, and all checks pass.
X/Twitter handle: @RekaAILabs