-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Inference plugin: Add Gemini model adapter #191292
Merged
pgayvallet
merged 19 commits into
elastic:main
from
pgayvallet:kbn-xxx-gemini-connector
Aug 28, 2024
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
6b481c4
Add inference adapter for Gemini
pgayvallet 3d8eef7
nits
pgayvallet 88788ca
nits
pgayvallet 45402d3
add tests for operator
pgayvallet 5ecaaa3
add tests for gemini adapter, and add tool config to connector
pgayvallet 2f2d240
Merge remote-tracking branch 'upstream/main' into kbn-xxx-gemini-conn…
pgayvallet 7627ab7
remove useless default statement
pgayvallet 071d9a3
use the parameter on non-stream call too
pgayvallet b2ff857
update codeowner file
pgayvallet 4f2e664
update connector IT snapshot
pgayvallet e3486bc
Merge remote-tracking branch 'upstream/main' into kbn-xxx-gemini-conn…
pgayvallet aa8a4e0
Merge remote-tracking branch 'upstream/main' into kbn-xxx-gemini-conn…
pgayvallet dd18ef9
[CI] Auto-commit changed files from 'node scripts/build_plugin_list_d…
kibanamachine d8822a4
use native systemInstruction
pgayvallet b71632b
add unit test for system instructions
pgayvallet b5145d5
generate random tool call id
pgayvallet 2ecc4ad
update snapshot
pgayvallet fe00ac6
ensure multi-turn messages for gemini
pgayvallet fc720c8
Merge remote-tracking branch 'upstream/main' into kbn-xxx-gemini-conn…
pgayvallet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
241 changes: 241 additions & 0 deletions
241
x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
x-pack/plugins/inference/server/chat_complete/adapters/gemini/gemini_adapter.test.mocks.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export const processVertexStreamMock = jest.fn(); | ||
|
||
jest.doMock('./process_vertex_stream', () => { | ||
const actual = jest.requireActual('./process_vertex_stream'); | ||
return { | ||
...actual, | ||
processVertexStream: processVertexStreamMock, | ||
}; | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
As discussed with @dgieselaar: Gemini doesn't support type composition for tool definition, so we can't easily have it on the inference API. But given that the feature doesn't seem that useful, it feels like a very acceptable removal.