@askdb/ai-google 0.1.0-beta.2 → 1.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +9 -4
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,iBAAiB,EAEvB,MAAM,WAAW,CAAC;AAUnB,eAAO,MAAM,cAAc,EAAE,iBAqB5B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { createGoogleGenerativeAI } from "@ai-sdk/google";
|
|
2
|
+
import { resolveBaseConfig, } from "@askdb/ai";
|
|
3
|
+
const ENV_SPEC = {
|
|
4
|
+
apiKeyVars: ["GOOGLE_GENERATIVE_AI_API_KEY", "GOOGLE_AI_API_KEY"],
|
|
5
|
+
modelVars: ["GOOGLE_AI_MODEL"],
|
|
6
|
+
embeddingModelVars: ["GOOGLE_AI_EMBEDDING_MODEL"],
|
|
7
|
+
baseURLVars: ["GOOGLE_AI_BASE_URL"],
|
|
8
|
+
defaultModel: "gemini-2.0-flash",
|
|
9
|
+
};
|
|
2
10
|
export const googleProvider = {
|
|
3
11
|
provider: "google",
|
|
12
|
+
configHint: "For Google Gemini, set ai.provider: \"google\" and ai.providerConfig.google.apiKey in askdb.config.*.",
|
|
13
|
+
resolveConfig(env, options) {
|
|
14
|
+
return resolveBaseConfig("google", env, ENV_SPEC, options);
|
|
15
|
+
},
|
|
4
16
|
createLanguageModel(config) {
|
|
5
17
|
const google = createGoogleGenerativeAI({
|
|
6
18
|
apiKey: config.apiKey,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EACL,iBAAiB,GAGlB,MAAM,WAAW,CAAC;AAEnB,MAAM,QAAQ,GAAoB;IAChC,UAAU,EAAE,CAAC,8BAA8B,EAAE,mBAAmB,CAAC;IACjE,SAAS,EAAE,CAAC,iBAAiB,CAAC;IAC9B,kBAAkB,EAAE,CAAC,2BAA2B,CAAC;IACjD,WAAW,EAAE,CAAC,oBAAoB,CAAC;IACnC,YAAY,EAAE,kBAAkB;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAsB;IAC/C,QAAQ,EAAE,QAAQ;IAClB,UAAU,EACR,uGAAuG;IACzG,aAAa,CAAC,GAAG,EAAE,OAAO;QACxB,OAAO,iBAAiB,CAAC,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IACD,mBAAmB,CAAC,MAAM;QACxB,MAAM,MAAM,GAAG,wBAAwB,CAAC;YACtC,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACvD,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IACD,oBAAoB,CAAC,MAAM;QACzB,MAAM,MAAM,GAAG,wBAAwB,CAAC;YACtC,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACvD,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askdb/ai-google",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0-beta.3",
|
|
4
4
|
"description": "AskDB Google Generative AI provider adapter for @askdb/ai.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"askdb",
|
|
@@ -39,12 +39,17 @@
|
|
|
39
39
|
"node": ">=20"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@ai-sdk/google": "^3.0.80"
|
|
43
|
-
|
|
42
|
+
"@ai-sdk/google": "^3.0.80"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"ai": "^6.0.0",
|
|
46
|
+
"@askdb/ai": "^0.1.0-beta.3"
|
|
44
47
|
},
|
|
45
48
|
"devDependencies": {
|
|
49
|
+
"ai": "^6.0.200",
|
|
46
50
|
"typescript": "^5.9.3",
|
|
47
|
-
"vitest": "^3.2.6"
|
|
51
|
+
"vitest": "^3.2.6",
|
|
52
|
+
"@askdb/ai": "0.1.0-beta.3"
|
|
48
53
|
},
|
|
49
54
|
"scripts": {
|
|
50
55
|
"build": "tsc -p tsconfig.build.json",
|