-
Notifications
You must be signed in to change notification settings - Fork 134
feat: add new features(thinking_level and media_resolution) of gemini3 #1554
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1554 +/- ##
==========================================
+ Coverage 84.18% 84.22% +0.04%
==========================================
Files 150 150
Lines 13005 13041 +36
==========================================
+ Hits 10948 10984 +36
Misses 1436 1436
Partials 621 621 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/retest |
internal/apischema/openai/openai.go
Outdated
| ThinkingConfig *genai.ThinkingConfig `json:"thinkingConfig,omitzero"` | ||
|
|
||
| // Detail is media resolution in gemini models | ||
| Detail genai.MediaResolution `json:"detail,omitempty"` |
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.
can you add the reference link?
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.
added, thanks for the comment
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.
Actually this filed should be added to the image part details
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.
the link is wrong, it points to the caching API
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.
this filed should be added to the image part details is already in openai' spec
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.
it points to the caching API I think the definition is the same
|
/retest |
1 similar comment
|
/retest |
internal/apischema/openai/openai.go
Outdated
| ThinkingConfig *genai.ThinkingConfig `json:"thinkingConfig,omitzero"` | ||
|
|
||
| // Detail here is to set global media resolution in gemini models: https://ai.google.dev/api/caching#MediaResolution | ||
| Detail genai.MediaResolution `json:"detail,omitempty"` |
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.
details can be confusing without context at the top level, since it is in the GCP vendor field section we should keep the name medium_resolution.
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.
updated.
Signed-off-by: yxia216 <[email protected]>
**Description** update anthropic -> translation code to correctly translate token usage --------- Signed-off-by: Alexa Griffith <[email protected]> Signed-off-by: yxia216 <[email protected]>
Signed-off-by: yxia216 <[email protected]>
…#1536) **Description** The SSE event spec supports 3 different delimiters (pair of CRLF / LF / CR). This PR updates the stream processing translator for GCP VertexAI to support all 3 delimiters. [SSE docs] about delimiters > **Note:** The docs define an event as `event = *( comment / field ) end-of-line` `end-of-line` is defined as a single CRLF or LF or CR (not a pair) But the `comment` and `field` definitions also end in `end-of-line` implying that an event always ends in a pair of CRLR / CR / LF [SSE docs]: https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream --------- Signed-off-by: Sukumar Gaonkar <[email protected]> Co-authored-by: Ignasi Barrera <[email protected]> Signed-off-by: yxia216 <[email protected]>
Signed-off-by: yxia216 <[email protected]>
Signed-off-by: yxia216 <[email protected]>
da170d9 to
a47506d
Compare
Description
Some new features were introduced in gemini3:
1 thinking_level:
https://ai.google.dev/gemini-api/docs/gemini-3?thinking=low#thinking_level
This is similar to reasoning_effort of openai, thus, unified them.
2 media_resolution
https://ai.google.dev/gemini-api/docs/gemini-3?thinking=low#media_resolution
This is similar to detail in openai, thus, unified them.
The difference is that openai does not provide a global config of media_resolution. Thus, added it as gcp specific, but still use detail to make the name consistent.
Some related PRs:
thinking_budget is in
#1461
thinking_level and thinking_budget are both supported, but can not use them together.
Other features under review:
1 web search:
#1526
2 parse the thought summary:
#1521