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: support deepseek model in camel #1217

Merged
merged 12 commits into from
Nov 28, 2024
Merged

feat: support deepseek model in camel #1217

merged 12 commits into from
Nov 28, 2024

Conversation

NeilJohnson0930
Copy link
Collaborator

@NeilJohnson0930 NeilJohnson0930 commented Nov 25, 2024

Description

Describe your changes in detail.

Motivation and Context

close #1199

  • I have raised an issue to propose this change (required for new features and bug fixes)

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds core functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)
  • Example (update in the folder of example)

Implemented Tasks

  • Subtask 1
  • Subtask 2
  • Subtask 3

Checklist

Go over all the following points, and put an x in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!

  • I have read the CONTRIBUTION guide. (required)
  • My change requires a change to the documentation.
  • I have updated the tests accordingly. (required for a bug fix or a new feature)
  • I have updated the documentation accordingly.

@NeilJohnson0930 NeilJohnson0930 modified the milestones: deepseek, Sprint 17 Nov 25, 2024
@NeilJohnson0930 NeilJohnson0930 linked an issue Nov 25, 2024 that may be closed by this pull request
2 tasks
@Wendong-Fan Wendong-Fan added the Model Related to backend models label Nov 25, 2024
Copy link
Member

@Wendong-Fan Wendong-Fan left a comment

Choose a reason for hiding this comment

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

Thanks @NeilJohnson0930 ! over all looks great, left some comments

camel/configs/deepseek_config.py Outdated Show resolved Hide resolved
camel/models/deepseek_model.py Outdated Show resolved Hide resolved
camel/models/deepseek_model.py Outdated Show resolved Hide resolved
test/models/test_deepseek_model.py Outdated Show resolved Hide resolved
Copy link
Member

@Wendong-Fan Wendong-Fan left a comment

Choose a reason for hiding this comment

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

Thanks @NeilJohnson0930 , could you also update docs/key_modules/models.md add deepseek to the list?

camel/configs/deepseek_config.py Outdated Show resolved Hide resolved
camel/configs/deepseek_config.py Outdated Show resolved Hide resolved
camel/configs/deepseek_config.py Outdated Show resolved Hide resolved
@MuggleJinx
Copy link
Collaborator

MuggleJinx commented Nov 27, 2024

Hi @NeilJohnson0930, thanks for the PR. However, I ran into some problem when running DeepSeek_model_example.py,
seems there is some configuration issue, I think you need to modify the stream_option in the deepseek_config file.
Could you check this? Thanks!

File "/Users/jinx0a/micromamba/envs/ai/lib/python3.12/site-packages/openai/_base_client.py", line 1058, in _request
    raise self._make_status_error_from_response(err.response) from None
openai.UnprocessableEntityError: Failed to deserialize the JSON body into the target type: stream_options: invalid type: boolean `false`, expected struct StreamOption at line 1 column 361

Copy link
Member

@Wendong-Fan Wendong-Fan left a comment

Choose a reason for hiding this comment

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

Thanks @NeilJohnson0930 , added one more commit here: da445eb, now it looks great, thanks a lot !

@Wendong-Fan Wendong-Fan merged commit 073ddb0 into master Nov 28, 2024
6 checks passed
@Wendong-Fan Wendong-Fan deleted the dev_deepseek branch November 28, 2024 10:41
@NeilJohnson0930
Copy link
Collaborator Author

Hi @NeilJohnson0930, thanks for the PR. However, I ran into some problem when running DeepSeek_model_example.py, seems there is some configuration issue, I think you need to modify the stream_option in the deepseek_config file. Could you check this? Thanks!

File "/Users/jinx0a/micromamba/envs/ai/lib/python3.12/site-packages/openai/_base_client.py", line 1058, in _request
    raise self._make_status_error_from_response(err.response) from None
openai.UnprocessableEntityError: Failed to deserialize the JSON body into the target type: stream_options: invalid type: boolean `false`, expected struct StreamOption at line 1 column 361

Thanks MuggleJinx, config modification has been done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Model Related to backend models
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

[Feature Request] Support deepseek models
3 participants