Skip to content

fix(azure): function call issues in deepseek-V3#221

Merged
appleboy merged 1 commit intoappleboy:mainfrom
immofon:main
Feb 26, 2025
Merged

fix(azure): function call issues in deepseek-V3#221
appleboy merged 1 commit intoappleboy:mainfrom
immofon:main

Conversation

@immofon
Copy link
Contributor

@immofon immofon commented Feb 20, 2025

Issue

The function call of Deepseek-V3 is currently encountering problems, making it unable to work with tool calls. See doc.

Solution

Fortunately, Deepseek-V3 operates correctly when using the ChatCompletion method, similar to OpenAI's models with the pattern o\d(-(mini|preview))?. This pull request aims to implement this solution.

Proposed Changes

This pull request includes the necessary modifications to ensure that Deepseek-V3 can function properly with tool calls by utilizing the ChatCompletion method.

Testing

The changes have been thoroughly tested to ensure compatibility and functionality with tool calls.

Approval

Please review the proposed changes and provide your approval to proceed with the integration.

- Add `strings` package to imports for string manipulation.
- Extend model checking logic to include models containing `"deepseek"` in their name.

Signed-off-by: Yang,Jingrong <[email protected]>
@appleboy appleboy changed the title Fixing Function Call Issues in Deepseek-V3 fix(azure): function call issues in deepseek-V3 Feb 26, 2025
@appleboy appleboy merged commit 0d87ad8 into appleboy:main Feb 26, 2025
8 checks passed
@codecov
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 5.98%. Comparing base (0125d86) to head (44f1277).
Report is 118 commits behind head on main.

Files with missing lines Patch % Lines
provider/openai/openai.go 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (0125d86) and HEAD (44f1277). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (0125d86) HEAD (44f1277)
1 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #221       +/-   ##
==========================================
- Coverage   21.96%   5.98%   -15.98%     
==========================================
  Files           8      31       +23     
  Lines         346    1553     +1207     
==========================================
+ Hits           76      93       +17     
- Misses        264    1454     +1190     
  Partials        6       6               
Flag Coverage Δ
go-1.21 5.98% <0.00%> (?)
go-1.22 5.98% <0.00%> (?)
go-1.23 5.98% <0.00%> (?)
go-1.24 5.98% <0.00%> (?)
ubuntu-latest 5.98% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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