-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix ESM for ollama and google cloud plugin, added tests for ESM …
…compatibility (#1379) * fix: fix ESM for ollama and google cloud plugin, added tests for ESM compatibility * format * remove google auth from top level * skip checks * some more fixes
- Loading branch information
Showing
24 changed files
with
192 additions
and
32 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.genkit |
Binary file not shown.
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,42 @@ | ||
{ | ||
"name": "rag", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "lib/index.js", | ||
"type": "module", | ||
"scripts": { | ||
"start": "node lib/index.js", | ||
"dev": "tsx --watch src/index.ts", | ||
"genkit:dev": "cross-env GENKIT_ENV=dev pnpm dev", | ||
"compile": "tsc", | ||
"build": "pnpm build:clean && pnpm compile", | ||
"build:clean": "rimraf ./lib", | ||
"build:watch": "tsc --watch", | ||
"test": "pnpm build && node lib/index.js" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"@genkit-ai/checks": "workspace:*", | ||
"@genkit-ai/dev-local-vectorstore": "workspace:*", | ||
"@genkit-ai/evaluator": "workspace:*", | ||
"@genkit-ai/firebase": "workspace:*", | ||
"@genkit-ai/google-cloud": "workspace:*", | ||
"@genkit-ai/googleai": "workspace:*", | ||
"@genkit-ai/vertexai": "workspace:*", | ||
"firebase-admin": ">=12.2", | ||
"genkit": "workspace:*", | ||
"genkitx-chromadb": "workspace:*", | ||
"genkitx-ollama": "workspace:*", | ||
"genkitx-pinecone": "workspace:*", | ||
"google-auth-library": "^9.6.3" | ||
}, | ||
"devDependencies": { | ||
"@types/pdf-parse": "^1.1.4", | ||
"cross-env": "^7.0.3", | ||
"rimraf": "^6.0.1", | ||
"tsx": "^4.19.1", | ||
"typescript": "^5.3.3" | ||
} | ||
} |
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 @@ | ||
{{ role "system" }} your name is {{ @state.userName }}, always introduce yourself) |
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,46 @@ | ||
/** | ||
* Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import { checks } from '@genkit-ai/checks'; | ||
import { devLocalVectorstore } from '@genkit-ai/dev-local-vectorstore'; | ||
import { genkitEval } from '@genkit-ai/evaluator'; | ||
import { enableFirebaseTelemetry } from '@genkit-ai/firebase'; | ||
import { enableGoogleCloudTelemetry } from '@genkit-ai/google-cloud'; | ||
import { googleAI } from '@genkit-ai/googleai'; | ||
import { vertexAI } from '@genkit-ai/vertexai'; | ||
import { vertexAIEvaluation } from '@genkit-ai/vertexai/evaluation'; | ||
import { vertexAIModelGarden } from '@genkit-ai/vertexai/modelgarden'; | ||
import { vertexAIRerankers } from '@genkit-ai/vertexai/rerankers'; | ||
import { genkit } from 'genkit'; | ||
import { chroma } from 'genkitx-chromadb'; | ||
import { ollama } from 'genkitx-ollama'; | ||
import { pinecone } from 'genkitx-pinecone'; | ||
|
||
enableFirebaseTelemetry; | ||
enableGoogleCloudTelemetry; | ||
checks; | ||
googleAI; | ||
vertexAI; | ||
vertexAIModelGarden; | ||
vertexAIEvaluation; | ||
vertexAIRerankers; | ||
ollama; | ||
pinecone; | ||
chroma; | ||
devLocalVectorstore; | ||
genkitEval; | ||
|
||
export const ai = genkit({}); |
Oops, something went wrong.