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

feat: add deepseek r1 serverless #567

Merged
merged 1 commit into from
Mar 11, 2025
Merged

feat: add deepseek r1 serverless #567

merged 1 commit into from
Mar 11, 2025

Conversation

NingLu
Copy link
Collaborator

@NingLu NingLu commented Mar 11, 2025

Fixes #

🤖 AI-Generated PR Description (Powered by Amazon Bedrock)

Description

This pull request includes several changes to improve the integration of the LangChain library with our chat models. Specifically, the following modifications have been made:

  1. source/lambda/shared/constant.py: Updated constants related to the chat models.
  2. source/lambda/shared/langchain_integration/models/chat_models/bedrock_models.py: Refactored the implementation of the chat models to leverage the latest features of LangChain.
  3. source/lambda/shared/langchain_integration/models/model_config.py: Adjusted the model configuration to accommodate the changes in the chat models.
  4. source/lambda/shared/utils/prompt_utils.py: Improved the prompt utilities to enhance the user experience when interacting with the chat models.
  5. source/portal/src/utils/const.ts: Updated the constants in the frontend to align with the changes in the backend.

These changes aim to enhance the performance and functionality of our chat models, providing a more seamless and efficient user experience. Additionally, the refactoring and integration with LangChain ensure better maintainability and extensibility of the codebase.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

File Stats Summary

File number involved in this PR: 5, unfold to see the details:

The file changes summary is as follows:

Files
Changes
Change Summary
source/lambda/shared/langchain_integration/models/chat_models/bedrock_models.py 1 added, 0 removed The code change adds a new boolean attribute is_reasoning_model to the BedrockBaseModel class, which is set to False by default.
source/lambda/shared/constant.py 1 added, 0 removed The code change adds a new constant BEDROCK_DEEPSEEK_R1 representing a model type to the LLMModelType class.
source/portal/src/utils/const.ts 9 added, 0 removed The code adds a new model option called 'DeepSeek' with a single model variant 'deepseek.r1-v1:0' to the LLM_BOT_COMMON_MODEL_LIST array.
source/lambda/shared/langchain_integration/models/model_config.py 13 added, 1 removed This code change adds a new configuration for the DeepSeek model, a reasoning model with specific settings, and includes it in the list of Bedrock model configurations.
source/lambda/shared/utils/prompt_utils.py 7 added, 0 removed This code change adds a new LLM model type called 'BEDROCK_DEEPSEEK_R1' to several lists of supported model types.

@IcyKallen IcyKallen self-requested a review March 11, 2025 03:37
Copy link
Contributor

@IcyKallen IcyKallen left a comment

Choose a reason for hiding this comment

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

LGTM

@IcyKallen IcyKallen merged commit 38c260c into dev Mar 11, 2025
6 checks passed
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.

2 participants