Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add tool choice configuration and update steam handling in Gemini #1996

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mxdlzg
Copy link
Contributor

@mxdlzg mxdlzg commented Dec 23, 2024

close #1993

我已确认该 PR 已自测通过,相关截图如下:
(此处放上测试通过的截图,如果不涉及前端改动或从 UI 上无法看出,请放终端启动成功的截图)

1、增加Gemini对tool_choice的支持。
顺便修复:thinking模型回答吞字问题;Gemini已经支持system指令,因此可以移除AddDummyModelMessage。
API资料:https://ai.google.dev/gemini-api/docs/system-instructions?hl=zh-cn&lang=rest

system指令:
image

tool_choice参数:
image

thinking模型:
image

Copy link

codecov bot commented Dec 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 27 lines in your changes missing coverage. Please review.

Project coverage is 1.18%. Comparing base (a858292) to head (ad56898).

Files with missing lines Patch % Lines
relay/adaptor/gemini/main.go 0.00% 27 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #1996      +/-   ##
========================================
- Coverage   1.18%   1.18%   -0.01%     
========================================
  Files        150     150              
  Lines      12742   12746       +4     
========================================
  Hits         151     151              
- Misses     12577   12581       +4     
  Partials      14      14              

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

Copy link

@blackwhite084 blackwhite084 left a comment

Choose a reason for hiding this comment

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

通过

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

请求适配一下gemini-2.0-flash-thinking
2 participants