@zhivex-ai/gemini 0.10.5 → 0.11.1
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/README.md +48 -11
- package/dist/capabilities.d.ts +12 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +195 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/index.d.ts +2 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +127 -202
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@ bun add @zhivex-ai/core @zhivex-ai/gemini
|
|
|
15
15
|
| Text, tools, structured output, audio input | `generateText()` |
|
|
16
16
|
| Multimodal embeddings | `embeddingModel("gemini-embedding-2")` |
|
|
17
17
|
| Text-to-speech | `generateSpeech()` and `streamSpeech()`; Gemini 3.1 TTS streams |
|
|
18
|
+
| Speech-to-text | `transcribeAudio()` with Gemini 3.5 Transcribe; rich annotations remain in `rawResponse` |
|
|
18
19
|
| Live audio/text/image sessions | `realtimeModel()` |
|
|
19
20
|
| Interactions API, Deep Research, Antigravity / managed agents | high-level |
|
|
20
21
|
| Files API, File Search stores, Context Caching, Batch API | high-level |
|
|
@@ -43,6 +44,7 @@ import {
|
|
|
43
44
|
predictRaw,
|
|
44
45
|
resumeInteraction,
|
|
45
46
|
streamSpeech,
|
|
47
|
+
transcribeAudio,
|
|
46
48
|
uploadFile
|
|
47
49
|
} from "@zhivex-ai/core";
|
|
48
50
|
import { createGemini } from "@zhivex-ai/gemini";
|
|
@@ -55,7 +57,7 @@ await generateImage({
|
|
|
55
57
|
});
|
|
56
58
|
|
|
57
59
|
await generateText({
|
|
58
|
-
model: gemini("gemini-3.
|
|
60
|
+
model: gemini("gemini-3.7-flash"),
|
|
59
61
|
messages: [
|
|
60
62
|
{
|
|
61
63
|
role: "user",
|
|
@@ -90,6 +92,34 @@ const live = await gemini.realtimeModel!("gemini-3.1-flash-live-preview").connec
|
|
|
90
92
|
});
|
|
91
93
|
await live.close();
|
|
92
94
|
|
|
95
|
+
const transcript = await transcribeAudio({
|
|
96
|
+
model: gemini.transcriptionModel!("gemini-3.5-transcribe"),
|
|
97
|
+
audio: {
|
|
98
|
+
data: "BASE64_AUDIO",
|
|
99
|
+
mediaType: "audio/wav",
|
|
100
|
+
filename: "meeting.wav"
|
|
101
|
+
},
|
|
102
|
+
language: "es-419",
|
|
103
|
+
providerOptions: {
|
|
104
|
+
custom_vocabulary: ["Zhivex"],
|
|
105
|
+
mode: {
|
|
106
|
+
type: "verbatim",
|
|
107
|
+
diarization_mode: "speaker",
|
|
108
|
+
timestamp_granularities: ["word"]
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
console.log(transcript.text, transcript.rawResponse);
|
|
113
|
+
|
|
114
|
+
const liveTranscript = await gemini.realtimeModel!("gemini-3.5-transcribe-live").connect({
|
|
115
|
+
mode: "transcription",
|
|
116
|
+
inputAudioTranscription: {
|
|
117
|
+
languageCodes: [],
|
|
118
|
+
customVocabulary: ["Zhivex"]
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
await liveTranscript.close();
|
|
122
|
+
|
|
93
123
|
await embed({
|
|
94
124
|
model: gemini.embeddingModel("gemini-embedding-2"),
|
|
95
125
|
value: {
|
|
@@ -118,7 +148,7 @@ const file = await uploadFile({
|
|
|
118
148
|
const store = await createFileSearchStore({ provider: gemini, displayName: "Docs" });
|
|
119
149
|
|
|
120
150
|
await generateText({
|
|
121
|
-
model: gemini("gemini-3.
|
|
151
|
+
model: gemini("gemini-3.7-flash"),
|
|
122
152
|
prompt: "Use the indexed docs and URL context.",
|
|
123
153
|
tools: {
|
|
124
154
|
docs: googleFileSearchTool([store.name]),
|
|
@@ -128,19 +158,19 @@ await generateText({
|
|
|
128
158
|
|
|
129
159
|
await createContextCache({
|
|
130
160
|
provider: gemini,
|
|
131
|
-
modelId: "gemini-3.
|
|
161
|
+
modelId: "gemini-3.7-flash",
|
|
132
162
|
contents: [{ role: "user", parts: [{ type: "file", data: file.uri ?? file.name, mediaType: "text/plain" }] }]
|
|
133
163
|
});
|
|
134
164
|
|
|
135
165
|
await createBatch({
|
|
136
166
|
provider: gemini,
|
|
137
|
-
modelId: "gemini-3.
|
|
167
|
+
modelId: "gemini-3.7-flash",
|
|
138
168
|
requests: [{ request: { contents: [{ parts: [{ text: "Summarize this." }] }] } }]
|
|
139
169
|
});
|
|
140
170
|
|
|
141
171
|
const nearby = await createInteraction({
|
|
142
172
|
provider: gemini,
|
|
143
|
-
modelId: "gemini-3.
|
|
173
|
+
modelId: "gemini-3.7-flash",
|
|
144
174
|
input: "Find well-reviewed cafes within walking distance.",
|
|
145
175
|
store: false,
|
|
146
176
|
tools: {
|
|
@@ -165,9 +195,10 @@ for await (const event of await resumeInteraction({
|
|
|
165
195
|
|
|
166
196
|
await createInteraction({
|
|
167
197
|
provider: gemini,
|
|
168
|
-
modelId: "gemini-omni-flash
|
|
198
|
+
modelId: "gemini-omni-1.1-flash",
|
|
169
199
|
input: "A marble rolling through a chain-reaction track.",
|
|
170
|
-
responseFormat: { type: "video", aspect_ratio: "16:9" }
|
|
200
|
+
responseFormat: { type: "video", aspect_ratio: "16:9" },
|
|
201
|
+
generationConfig: { video_config: { task: "text_to_video", resolution: "4k" } }
|
|
171
202
|
});
|
|
172
203
|
|
|
173
204
|
await predictRaw({
|
|
@@ -184,18 +215,18 @@ Gemini 3.1 TTS supports buffered audio through `generateSpeech()` and incrementa
|
|
|
184
215
|
|
|
185
216
|
Current model guidance:
|
|
186
217
|
|
|
187
|
-
- Complex text, multimodal, coding, and multi-step agentic work: `gemini-3.
|
|
218
|
+
- Complex text, multimodal, coding, and multi-step agentic work: `gemini-3.7-flash`.
|
|
188
219
|
- High-volume extraction, routing, document parsing, and low-latency subagent work: `gemini-3.5-flash-lite`. It defaults to minimal thinking; use medium or high for autonomous multi-step agents.
|
|
189
220
|
- Managed agents: pass `deep-research-preview-04-2026`, `deep-research-max-preview-04-2026`, or `antigravity-preview-05-2026` through the `agent` field instead of `modelId`.
|
|
190
221
|
- Image generation: `gemini-3.1-flash-lite-image` for 1K low-cost output, `gemini-3.1-flash-image` for up to 4K/high-volume work, or `gemini-3-pro-image` for highest-quality composition.
|
|
191
|
-
- Video: `gemini-omni-flash
|
|
222
|
+
- Video: `gemini-omni-1.1-flash` is the GA Interactions-only model for conversational video generation/editing, including extension, interpolation, and `360p` through `4k` resolution controls. The old `gemini-omni-flash-preview` endpoint is retained in the catalog only for migration before its September 30, 2026 deprecation. The `generateVideo()` helper uses the separate Veo family, including `veo-3.1-lite-generate-preview`, `veo-3.1-generate-preview`, and `veo-3.1-fast-generate-preview`.
|
|
192
223
|
- Imagen 4 IDs are intentionally no longer recommended: Google has announced shutdown for August 17, 2026. Gemini 2.0 model IDs and the old image preview IDs are already shut down.
|
|
193
224
|
|
|
194
|
-
Gemini 3.6 Flash and Gemini 3.5 Flash-Lite use provider-managed sampling. Do not pass `temperature`, `topP` / `top_p`, `topK` / `top_k`, `candidateCount` / `candidate_count`, or frequency/presence penalties; the adapter rejects those controls locally for these model IDs.
|
|
225
|
+
Gemini 3.7 Flash, Gemini 3.6 Flash, and Gemini 3.5 Flash-Lite use provider-managed sampling. Do not pass `temperature`, `topP` / `top_p`, `topK` / `top_k`, `candidateCount` / `candidate_count`, or frequency/presence penalties; the adapter rejects those controls locally for these model IDs. Gemini 3.7 Flash accepts `low`, `medium`, and `high`; it rejects `minimal`. Gemini 3.6 Flash and Gemini 3.5 Flash-Lite accept `minimal`, `low`, `medium`, and `high`. These models also reject a final assistant/model-output prefill: end `generateText()` history with a user or tool-result turn, and use `previousInteractionId` for stateful Interactions continuation.
|
|
195
226
|
|
|
196
227
|
The mutable aliases `gemini-flash-latest` and `gemini-flash-lite-latest` are available upstream but can be remapped. Prefer the stable IDs above for production workloads and reproducible pricing.
|
|
197
228
|
|
|
198
|
-
The built-in catalog records Gemini 3.6 Flash and Gemini 3.5 Flash-Lite Standard text-token pricing as separate input, cached-input, and output rates; it does not treat the input price as a blended per-token estimate. Audio, media output, tools, agents, Batch, Flex, Priority, and storage have separate upstream prices.
|
|
229
|
+
The built-in catalog records Gemini 3.7 Flash, Gemini 3.6 Flash, and Gemini 3.5 Flash-Lite Standard text-token pricing as separate input, cached-input, and output rates; it does not treat the input price as a blended per-token estimate. Audio, media output, tools, agents, Batch, Flex, Priority, and storage have separate upstream prices.
|
|
199
230
|
|
|
200
231
|
Interactions store resources by default upstream. Pass `store: false` when you do not need server-side continuation, background execution, or stored interaction logs. Preview models and managed agents can have narrower availability and rate limits than GA models.
|
|
201
232
|
|
|
@@ -208,3 +239,9 @@ Model Garden-style coverage is intentionally raw/prediction based. The adapter d
|
|
|
208
239
|
Repository and full documentation:
|
|
209
240
|
|
|
210
241
|
- <https://github.com/Zhivex/zhivex-ai-sdk>
|
|
242
|
+
|
|
243
|
+
## September model update
|
|
244
|
+
|
|
245
|
+
`gemini-3.8-flash` follows the current provider-managed sampling rules: temperature, top-p/top-k, candidate count, and penalties are rejected locally, as is assistant prefill. Reasoning supports `low`, `medium`, and `high`; `minimal` is rejected. The SDK catalog includes `lyria-3.5`, usable through `musicGenerationModel("lyria-3.5")` and `generateMusic()` with the existing text/image-to-audio contract.
|
|
246
|
+
|
|
247
|
+
See [Gemini 3.8 migration](https://ai.google.dev/gemini-api/docs/latest-model) and [Lyria 3.5](https://ai.google.dev/gemini-api/docs/models/lyria-3.5). Catalog presence and offline tests do not certify account access.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ModelCapabilities } from "@zhivex-ai/core";
|
|
2
|
+
export declare const isGeminiLiveTranslateModel: (modelId: string) => boolean;
|
|
3
|
+
export declare const isGeminiLiveTranscribeModel: (modelId: string) => boolean;
|
|
4
|
+
export declare const capabilities: ModelCapabilities;
|
|
5
|
+
export declare const transcriptionCapabilities: ModelCapabilities;
|
|
6
|
+
export declare const speechCapabilities: ModelCapabilities;
|
|
7
|
+
export declare const groundedCapabilities: ModelCapabilities;
|
|
8
|
+
export declare const imageGenerationCapabilities: ModelCapabilities;
|
|
9
|
+
export declare const videoGenerationCapabilities: ModelCapabilities;
|
|
10
|
+
export declare const musicGenerationCapabilities: ModelCapabilities;
|
|
11
|
+
export declare const realtimeCapabilities: (modelId: string) => ModelCapabilities;
|
|
12
|
+
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,eAAO,MAAM,0BAA0B,GAAI,SAAS,MAAM,YAAsE,CAAC;AACjI,eAAO,MAAM,2BAA2B,GAAI,SAAS,MAAM,YAA0D,CAAC;AAEtH,eAAO,MAAM,YAAY,EAAE,iBAgC1B,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,iBAwBvC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,iBAKhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,iBAGlC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,iBAyBzC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,iBA0BzC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,iBAyBzC,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,SAAS,MAAM,KAAG,iBA4CtD,CAAC"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
export const isGeminiLiveTranslateModel = (modelId) => /^gemini-3\.5-live-translate(?:-preview)?$/i.test(modelId.trim());
|
|
2
|
+
export const isGeminiLiveTranscribeModel = (modelId) => /^gemini-3\.5-transcribe-live$/i.test(modelId.trim());
|
|
3
|
+
export const capabilities = {
|
|
4
|
+
streaming: true,
|
|
5
|
+
tools: true,
|
|
6
|
+
structuredOutput: true,
|
|
7
|
+
jsonMode: true,
|
|
8
|
+
toolChoice: true,
|
|
9
|
+
parallelToolCalls: false,
|
|
10
|
+
vision: true,
|
|
11
|
+
files: true,
|
|
12
|
+
audioInput: true,
|
|
13
|
+
audioOutput: false,
|
|
14
|
+
embeddings: true,
|
|
15
|
+
fileSearch: true,
|
|
16
|
+
urlContext: true,
|
|
17
|
+
contextCaching: true,
|
|
18
|
+
batch: true,
|
|
19
|
+
interactions: true,
|
|
20
|
+
rawPrediction: true,
|
|
21
|
+
computerUse: true,
|
|
22
|
+
reasoning: true,
|
|
23
|
+
webSearch: true,
|
|
24
|
+
agentCapabilities: {
|
|
25
|
+
supportTier: "tier-b",
|
|
26
|
+
toolChoiceNone: true,
|
|
27
|
+
approvalRequests: false,
|
|
28
|
+
hostedWebSearch: true,
|
|
29
|
+
hostedFileSearch: true,
|
|
30
|
+
remoteMcp: false,
|
|
31
|
+
computerUse: true,
|
|
32
|
+
codeExecution: true,
|
|
33
|
+
toolsets: false
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
export const transcriptionCapabilities = {
|
|
37
|
+
...capabilities,
|
|
38
|
+
streaming: false,
|
|
39
|
+
tools: false,
|
|
40
|
+
structuredOutput: false,
|
|
41
|
+
jsonMode: false,
|
|
42
|
+
toolChoice: false,
|
|
43
|
+
parallelToolCalls: false,
|
|
44
|
+
audioInput: true,
|
|
45
|
+
audioOutput: false,
|
|
46
|
+
embeddings: false,
|
|
47
|
+
reasoning: false,
|
|
48
|
+
webSearch: false,
|
|
49
|
+
agentCapabilities: {
|
|
50
|
+
supportTier: "tier-c",
|
|
51
|
+
toolChoiceNone: false,
|
|
52
|
+
approvalRequests: false,
|
|
53
|
+
hostedWebSearch: false,
|
|
54
|
+
hostedFileSearch: false,
|
|
55
|
+
remoteMcp: false,
|
|
56
|
+
computerUse: false,
|
|
57
|
+
codeExecution: false,
|
|
58
|
+
toolsets: false
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
export const speechCapabilities = {
|
|
62
|
+
...transcriptionCapabilities,
|
|
63
|
+
streaming: true,
|
|
64
|
+
audioInput: false,
|
|
65
|
+
audioOutput: true
|
|
66
|
+
};
|
|
67
|
+
export const groundedCapabilities = {
|
|
68
|
+
...capabilities,
|
|
69
|
+
webSearch: true
|
|
70
|
+
};
|
|
71
|
+
export const imageGenerationCapabilities = {
|
|
72
|
+
...capabilities,
|
|
73
|
+
streaming: false,
|
|
74
|
+
tools: false,
|
|
75
|
+
structuredOutput: false,
|
|
76
|
+
jsonMode: false,
|
|
77
|
+
toolChoice: false,
|
|
78
|
+
parallelToolCalls: false,
|
|
79
|
+
embeddings: false,
|
|
80
|
+
imageGeneration: true,
|
|
81
|
+
videoGeneration: false,
|
|
82
|
+
musicGeneration: false,
|
|
83
|
+
reasoning: false,
|
|
84
|
+
webSearch: false,
|
|
85
|
+
agentCapabilities: {
|
|
86
|
+
supportTier: "tier-c",
|
|
87
|
+
toolChoiceNone: false,
|
|
88
|
+
approvalRequests: false,
|
|
89
|
+
hostedWebSearch: false,
|
|
90
|
+
hostedFileSearch: false,
|
|
91
|
+
remoteMcp: false,
|
|
92
|
+
computerUse: false,
|
|
93
|
+
codeExecution: false,
|
|
94
|
+
toolsets: false
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
export const videoGenerationCapabilities = {
|
|
98
|
+
...capabilities,
|
|
99
|
+
streaming: false,
|
|
100
|
+
tools: false,
|
|
101
|
+
structuredOutput: false,
|
|
102
|
+
jsonMode: false,
|
|
103
|
+
toolChoice: false,
|
|
104
|
+
parallelToolCalls: false,
|
|
105
|
+
vision: false,
|
|
106
|
+
embeddings: false,
|
|
107
|
+
imageGeneration: false,
|
|
108
|
+
videoGeneration: true,
|
|
109
|
+
musicGeneration: false,
|
|
110
|
+
reasoning: false,
|
|
111
|
+
webSearch: false,
|
|
112
|
+
agentCapabilities: {
|
|
113
|
+
supportTier: "tier-c",
|
|
114
|
+
toolChoiceNone: false,
|
|
115
|
+
approvalRequests: false,
|
|
116
|
+
hostedWebSearch: false,
|
|
117
|
+
hostedFileSearch: false,
|
|
118
|
+
remoteMcp: false,
|
|
119
|
+
computerUse: false,
|
|
120
|
+
codeExecution: false,
|
|
121
|
+
toolsets: false
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
export const musicGenerationCapabilities = {
|
|
125
|
+
...capabilities,
|
|
126
|
+
streaming: false,
|
|
127
|
+
tools: false,
|
|
128
|
+
structuredOutput: false,
|
|
129
|
+
jsonMode: false,
|
|
130
|
+
toolChoice: false,
|
|
131
|
+
parallelToolCalls: false,
|
|
132
|
+
embeddings: false,
|
|
133
|
+
imageGeneration: false,
|
|
134
|
+
videoGeneration: false,
|
|
135
|
+
musicGeneration: true,
|
|
136
|
+
reasoning: false,
|
|
137
|
+
webSearch: false,
|
|
138
|
+
agentCapabilities: {
|
|
139
|
+
supportTier: "tier-c",
|
|
140
|
+
toolChoiceNone: false,
|
|
141
|
+
approvalRequests: false,
|
|
142
|
+
hostedWebSearch: false,
|
|
143
|
+
hostedFileSearch: false,
|
|
144
|
+
remoteMcp: false,
|
|
145
|
+
computerUse: false,
|
|
146
|
+
codeExecution: false,
|
|
147
|
+
toolsets: false
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
export const realtimeCapabilities = (modelId) => {
|
|
151
|
+
const translation = isGeminiLiveTranslateModel(modelId);
|
|
152
|
+
const transcription = isGeminiLiveTranscribeModel(modelId);
|
|
153
|
+
const audioOnly = translation || transcription;
|
|
154
|
+
return {
|
|
155
|
+
...capabilities,
|
|
156
|
+
streaming: false,
|
|
157
|
+
tools: !audioOnly,
|
|
158
|
+
structuredOutput: false,
|
|
159
|
+
jsonMode: false,
|
|
160
|
+
toolChoice: false,
|
|
161
|
+
parallelToolCalls: false,
|
|
162
|
+
vision: !audioOnly,
|
|
163
|
+
files: false,
|
|
164
|
+
audioInput: true,
|
|
165
|
+
audioOutput: !transcription,
|
|
166
|
+
embeddings: false,
|
|
167
|
+
fileSearch: false,
|
|
168
|
+
urlContext: false,
|
|
169
|
+
contextCaching: false,
|
|
170
|
+
batch: false,
|
|
171
|
+
interactions: false,
|
|
172
|
+
rawPrediction: false,
|
|
173
|
+
computerUse: false,
|
|
174
|
+
reasoning: !audioOnly,
|
|
175
|
+
webSearch: !audioOnly,
|
|
176
|
+
agentCapabilities: {
|
|
177
|
+
...capabilities.agentCapabilities,
|
|
178
|
+
toolChoiceNone: !audioOnly,
|
|
179
|
+
hostedWebSearch: !audioOnly,
|
|
180
|
+
hostedFileSearch: false,
|
|
181
|
+
remoteMcp: false,
|
|
182
|
+
computerUse: false,
|
|
183
|
+
codeExecution: false
|
|
184
|
+
},
|
|
185
|
+
realtime: {
|
|
186
|
+
sessions: true,
|
|
187
|
+
audioInput: true,
|
|
188
|
+
audioOutput: !transcription,
|
|
189
|
+
imageInput: !audioOnly,
|
|
190
|
+
tools: !audioOnly,
|
|
191
|
+
browserTokens: true
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
//# sourceMappingURL=capabilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,4CAA4C,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;AACjI,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,gCAAgC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;AAEtH,MAAM,CAAC,MAAM,YAAY,GAAsB;IAC7C,SAAS,EAAE,IAAI;IACf,KAAK,EAAE,IAAI;IACX,gBAAgB,EAAE,IAAI;IACtB,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,IAAI;IAChB,iBAAiB,EAAE,KAAK;IACxB,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IACX,UAAU,EAA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E,IAAI;QAChB,WAAW,EAAE,CAAC,aAAa;QAC3B,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,KAAK;QACjB,cAAc,EAAE,KAAK;QACrB,KAAK,EAAE,KAAK;QACZ,YAAY,EAAE,KAAK;QACnB,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,CAAC,SAAS;QACrB,SAAS,EAAE,CAAC,SAAS;QACrB,iBAAiB,EAAE;YACjB,GAAG,YAAY,CAAC,iBAAkB;YAClC,cAAc,EAAE,CAAC,SAAS;YAC1B,eAAe,EAAE,CAAC,SAAS;YAC3B,gBAAgB,EAAE,KAAK;YACvB,SAAS,EAAE,KAAK;YAChB,WAAW,EAAE,KAAK;YAClB,aAAa,EAAE,KAAK;SACrB;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,IAAI;YAChB,WAAW,EAAE,CAAC,aAAa;YAC3B,UAAU,EAAE,CAAC,SAAS;YACtB,KAAK,EAAE,CAAC,SAAS;YACjB,aAAa,EAAE,IAAI;SACpB;KACF,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
type TypedCallableProviderAdapter<TLanguageModel extends LanguageModel> = Omit<ProviderAdapter, "languageModel"> & ((modelId: string) => TLanguageModel) & {
|
|
3
|
-
languageModel(modelId: string): TLanguageModel;
|
|
4
|
-
};
|
|
1
|
+
import { type CallableProviderAdapter, type LanguageModel, type RealtimeConnectionFactory, type ToolSet } from "@zhivex-ai/core";
|
|
5
2
|
export interface GeminiProviderOptions {
|
|
6
3
|
apiKey?: string;
|
|
7
4
|
baseURL?: string;
|
|
@@ -20,9 +17,8 @@ export interface GeminiLanguageModelOptions {
|
|
|
20
17
|
responseMimeType?: string;
|
|
21
18
|
[key: string]: unknown;
|
|
22
19
|
}
|
|
23
|
-
export declare const createGemini: (options?: GeminiProviderOptions) =>
|
|
20
|
+
export declare const createGemini: (options?: GeminiProviderOptions) => CallableProviderAdapter<LanguageModel<GeminiLanguageModelOptions>> & {
|
|
24
21
|
rawFetch: typeof globalThis.fetch;
|
|
25
22
|
};
|
|
26
23
|
export declare const geminiMcpTools: (client: import("@zhivex-ai/core").McpClient, options?: import("@zhivex-ai/core").McpToolSetOptions) => Promise<ToolSet>;
|
|
27
|
-
export {};
|
|
28
24
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAiCL,KAAK,uBAAuB,EAuC5B,KAAK,aAAa,EAalB,KAAK,yBAAyB,EAQ9B,KAAK,OAAO,EAMb,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yBAAyB,CAAC,EAAE,yBAAyB,CAAC;IACtD,iGAAiG;IACjG,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAoBD,MAAM,WAAW,0BAA0B;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAsnGD,eAAO,MAAM,YAAY,GACvB,UAAS,qBAA0B,KAClC,uBAAuB,CAAC,aAAa,CAAC,0BAA0B,CAAC,CAAC,GAAG;IACtE,QAAQ,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CAmEnC,CAAC;AAEF,eAAO,MAAM,cAAc,0HAAmB,CAAC"}
|