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

Gemini connector integration #183668

Merged
merged 129 commits into from
Jun 6, 2024
Merged
Changes from 1 commit
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
47a3e94
feat: Gemini dashboard creation
honeyn303 Apr 10, 2024
fa2b7b9
feat: Added the API Key attribute
honeyn303 Apr 22, 2024
5893522
fix: Fixed the api error.
honeyn303 Apr 23, 2024
a2c919a
fix: Remove the access & secret keys input field and populated the de…
honeyn303 Apr 24, 2024
918699c
feat: Added the configuration parameters for generateContent api
honeyn303 Apr 24, 2024
7704bd5
feat: Modified the code to use Vertex AI endpoint instead of AI studio
honeyn303 May 7, 2024
31efa17
feat: Added Project ID & location configuration field.
honeyn303 May 7, 2024
0afa1fe
fix: modified variable apiKey to accessToken
honeyn303 May 7, 2024
2575b19
feat: changed the default gemini model version to gemini-1.5-pro
honeyn303 May 8, 2024
98a4d40
Rebased this branch to the gemini branch
honeyn303 May 8, 2024
289b644
removed unused dependencies
honeyn303 May 9, 2024
156264e
removing file
honeyn303 May 9, 2024
f6f3e32
rebasing with the main branch
honeyn303 May 9, 2024
d179be0
Merge pull request #5 from honeyn303/gemini-ai-assistant
honeyn303 May 9, 2024
49a9dc0
Merge branch 'elastic:main' into gemini-assistant
honeyn303 May 9, 2024
b8099c0
Merge branch 'elastic:main' into gemini-assistant
honeyn303 May 10, 2024
ba83a51
Merge branch 'elastic:main' into gemini-assistant
honeyn303 May 13, 2024
a9411c0
Merge branch 'elastic:main' into gemini-assistant
honeyn303 May 14, 2024
230c713
ai assistant issue
honeyn303 May 14, 2024
a30af87
fix
honeyn303 May 14, 2024
2cedc33
Merge branch 'elastic:main' into gemini-bug-fix
honeyn303 May 14, 2024
01fc5fe
bug fix
honeyn303 May 14, 2024
0a9a26f
Merge branch 'elastic:main' into gemini-bug-fix
honeyn303 May 15, 2024
3d8472f
fix: Fixed the issue with the test api throwing an error
honeyn303 May 15, 2024
e689126
corrected signal parameter missing issue in gemini connector
rohanxz May 15, 2024
1654aea
Merge branch 'elastic:main' into gemini-bug-fix
honeyn303 May 15, 2024
6426c8d
Adding unit test cases for Gemini
shivankawasthi11 May 15, 2024
c371347
Revert "Adding unit test cases for Gemini"
shivankawasthi11 May 16, 2024
23032b2
Merge branch 'elastic:main' into gemini-bug-fix
honeyn303 May 16, 2024
8b80d4a
feat: Removed the Observability featureID, code clean up and added do…
honeyn303 May 16, 2024
2b680d9
feat: uncommented code
honeyn303 May 16, 2024
d68ca63
Merge branch 'elastic:main' into gemini-connector-integration
honeyn303 May 16, 2024
5da317f
fxi
honeyn303 May 16, 2024
bd47bfc
Merge branch 'elastic:main' into gemini-connector-integration
honeyn303 May 16, 2024
1c0605a
fixed sceret parameters
rohanxz May 16, 2024
90c1714
Merge branch 'elastic:main' into gemini-connector-integration
honeyn303 May 16, 2024
332ef77
Merge branch 'elastic:main' into gemini-connector-integration
honeyn303 May 16, 2024
57fcfbb
Merge branch 'elastic:main' into gemini-connector-integration
honeyn303 May 19, 2024
53d0ba1
fix: addressing the PR#183668 comments
honeyn303 May 19, 2024
644edc4
fix: code tweaks
honeyn303 May 19, 2024
0b12b47
fix: code clean up
honeyn303 May 19, 2024
f4f632d
Adding unit tests for Gemini
shivankawasthi11 May 17, 2024
223ddce
Updating unit test to implement OAuth
shivankawasthi11 May 20, 2024
ace52eb
feat: add token tracking for non stream responses
honeyn303 May 20, 2024
41673a8
initial commit: Adding functional tests (might need further tweaks)
honeyn303 May 20, 2024
d28edad
functional test cases for gemini
honeyn303 May 20, 2024
f626e00
fix: tweaks to functional test
honeyn303 May 21, 2024
4d748dc
Merge branch 'elastic:main' into gemini-connector-integration
honeyn303 May 21, 2024
ef455e8
fix: tweaks to oauth implementation
honeyn303 May 21, 2024
0522284
feat: Adding client side test cases
honeyn303 May 21, 2024
26f6776
feat: added the required documentation
honeyn303 May 21, 2024
da7fd52
fixes to the documentation
honeyn303 May 21, 2024
f652084
fix: Fixed token tracking issue for run and test sub-action
honeyn303 May 21, 2024
73dfdbe
feat: Added server side test cases
honeyn303 May 21, 2024
c2f3ff3
Delete .yarnrc
honeyn303 May 21, 2024
df11787
Delete .yarn/releases/yarn-1.22.19.cjs
honeyn303 May 21, 2024
e965f89
restored .yarnrc
rohanxz May 21, 2024
42c4eaa
Delete yarn.lock.orig
honeyn303 May 21, 2024
b6132cc
Update .yarnrc
honeyn303 May 21, 2024
54e34d4
feat: added docs images
honeyn303 May 21, 2024
a8a4598
Update llm.ts
honeyn303 May 21, 2024
047f8e7
Update constants.ts
honeyn303 May 21, 2024
4491673
Update index.tsx
honeyn303 May 21, 2024
4755c45
Merge branch 'elastic:main' into gemini-connector-integration
honeyn303 May 21, 2024
c48b14f
Merge branch 'main' into gemini-connector-integration
kibanamachine May 22, 2024
25cf790
fix: pr review comments
honeyn303 May 22, 2024
dbc6f70
fix: removed invoke ai and invoke stream
honeyn303 May 22, 2024
6c471a5
adding gemini files to CODEOWNERS
honeyn303 May 22, 2024
33fa26a
fix: es lint errors
honeyn303 May 22, 2024
1c9419b
fix: eslint error
honeyn303 May 22, 2024
1e19e54
fix: unique translations id
honeyn303 May 22, 2024
97526c0
fix: linting errors and added checks to validate the credentials JSON…
honeyn303 May 22, 2024
3c2363b
Fixing PR comments on unit tests
shivankawasthi11 May 23, 2024
776d940
Updating test body for Gemini
shivankawasthi11 May 23, 2024
0da2eb9
fix: removed invokeai and invoke stream schema
honeyn303 May 23, 2024
5d26a2b
fix: add proper credentials json file to the test case and few code t…
honeyn303 May 23, 2024
a20af20
fix: changed the credentials json format
honeyn303 May 23, 2024
1e3f330
fix: updated the json file to include the updated config and secret p…
honeyn303 May 23, 2024
0b02118
fix: the CI error related to node scripts/yarn_deduplicate
honeyn303 May 23, 2024
2fe2fa4
Merge branch 'main' into gemini-connector-integration
kibanamachine May 23, 2024
47af483
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine May 23, 2024
ee2a23a
fix: pr review comment changes
honeyn303 May 23, 2024
ccf2647
Updating unit tests to fix PR comments
shivankawasthi11 May 24, 2024
eb478a9
Merge branch 'main' into gemini-connector-integration
kibanamachine May 24, 2024
40098b1
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine May 24, 2024
21c8479
Merge branch 'main' into gemini-connector-integration
honeyn303 May 26, 2024
9c51343
fix: liniting issues
honeyn303 May 28, 2024
f11e36d
fix: eslint issues
honeyn303 May 28, 2024
0888b57
fix: linitng errors
honeyn303 May 28, 2024
94939e2
fix: using ES storage for storing access tokens
honeyn303 May 26, 2024
f6b570b
fix: few tweaks
honeyn303 May 27, 2024
78422fb
fix: test failures
honeyn303 May 28, 2024
2dac8ff
reverting changes to connector_token_client.ts
honeyn303 May 28, 2024
21bd29d
fix: removed console logs
honeyn303 May 28, 2024
375a316
fix: linting errors
honeyn303 May 28, 2024
85fa2dc
fix: changed the sorted field
honeyn303 May 28, 2024
123f206
fix: linting errors
honeyn303 May 29, 2024
5cd663a
Merge branch 'main' into gemini-connector-integration
kibanamachine May 29, 2024
9e162e3
Test and lint errors fix
shivankawasthi11 May 29, 2024
2e5b95d
fix: test failures
honeyn303 May 29, 2024
5ff956b
fix: test failures
honeyn303 May 29, 2024
19cca4f
Fixing test case
shivankawasthi11 May 30, 2024
883be6b
resolved PR review comments and refactored get_oauth_token file
rohanxz May 30, 2024
ce59195
added Unit tests for get_gcp_oauth_access_token.test
rohanxz May 30, 2024
ac0fbe3
Merge remote-tracking branch 'origin' into gemini-connector-integration
rohanxz May 30, 2024
b04aaca
updated yarn.lock
rohanxz May 30, 2024
bf07435
Removing the test
honeyn303 May 31, 2024
6abbcd8
resolved linting errors
rohanxz May 31, 2024
a391b96
fix: replaced the update function
honeyn303 May 31, 2024
a80be35
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine May 31, 2024
906f028
resolving conflit in connector_token_client.ts
honeyn303 May 31, 2024
2dced08
Merge branch 'main' into gemini-connector-integration
honeyn303 May 31, 2024
c9d3afb
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine May 31, 2024
b493737
resolving linting issue
rohanxz May 31, 2024
67032a1
Merge remote-tracking branch 'origin' into gemini-connector-integration
honeyn303 May 31, 2024
671e7d2
Merge branch 'elastic:main' into gemini-connector-integration
honeyn303 May 31, 2024
fd66af2
resolved conflicts
honeyn303 May 31, 2024
04ba7df
Merge branch 'main' into gemini-connector-integration
kibanamachine May 31, 2024
ac71670
Merge branch 'main' into gemini-connector-integration
honeyn303 Jun 3, 2024
a5dd164
Merge branch 'main' into gemini-connector-integration
kibanamachine Jun 3, 2024
0dfce94
fix: addressing PR review comments
honeyn303 Jun 3, 2024
08b4deb
fix: build test failures
honeyn303 Jun 3, 2024
c738d03
Delete .yarnrc
honeyn303 Jun 3, 2024
3bde569
Revert "Delete .yarnrc"
honeyn303 Jun 5, 2024
f967c76
removing file as requested
honeyn303 Jun 5, 2024
5680339
reverting changes to .yarnrc
honeyn303 Jun 5, 2024
e7a07db
Merge branch 'main' into gemini-connector-integration
kibanamachine Jun 5, 2024
61666f3
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Jun 5, 2024
00298b4
Merge branch 'main' into gemini-connector-integration
honeyn303 Jun 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
…-fix'
kibanamachine committed May 24, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 40098b190995c62063a59c39552a967186d47170
Original file line number Diff line number Diff line change
@@ -9,12 +9,10 @@ import { renderParameterTemplates } from './render';
import { ExecutorParams } from '@kbn/actions-plugin/server/sub_action_framework/types';
import { SUB_ACTION } from '../../../common/gemini/constants';
import { Logger } from '@kbn/logging';
import { renderMustacheObject } from '@kbn/actions-plugin/server/lib/mustache_renderer';

// Mock the renderMustacheString function
jest.mock('@kbn/actions-plugin/server/lib/mustache_renderer', () => ({
renderMustacheString: jest.fn((variables)
),
renderMustacheString: jest.fn(variables),
}));

const mockLogger: Logger = {
@@ -58,9 +56,7 @@ describe('Gemini - renderParameterTemplates', () => {
};

const runResult = renderParameterTemplates(mockLogger, runParams, variables);
expect(runResult.subActionParams.body).toEqual(
JSON.stringify({ message: 'Hello, !' })
);
expect(runResult.subActionParams.body).toEqual(JSON.stringify({ message: 'Hello, !' }));

const testResult = renderParameterTemplates(mockLogger, testParams, variables);
expect(testResult.subActionParams.body).toEqual(JSON.stringify({ test: 'someValue works!' }));
@@ -93,4 +89,3 @@ describe('Gemini - renderParameterTemplates', () => {
function variables(this: any, ...args: any[]): unknown {
throw new Error('Function not implemented.');
}

Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ export default function geminiTest({ getService }: FtrProviderContext) {
config: configService.get('kbnTestServer.serverArgs'),
},
});
let config = { ...defaultConfig, url: '' };
const config = { ...defaultConfig, url: '' };

before(async () => {
config.url = await simulator.start();