@standardagents/google 0.0.1-dev.ffffff
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 +7 -0
- package/dist/index.d.ts +69 -0
- package/dist/index.js +1140 -0
- package/dist/index.js.map +1 -0
- package/package.json +52 -0
package/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @standardagents/google
|
|
2
|
+
|
|
3
|
+
Stub prerelease package for Standard Agents Google/Gemini provider publishing setup.
|
|
4
|
+
|
|
5
|
+
Current bootstrap version: `0.0.1-dev.ffffff`
|
|
6
|
+
|
|
7
|
+
This package will be wired into the normal monorepo release flow after trusted publishing is configured.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { LLMProviderInterface, ProviderFactoryConfig, ProviderModelInfo, ModelCapabilities, ProviderRequest, InspectedRequest, ProviderResponse, ProviderStreamChunk, ProviderFactoryWithOptions } from '@standardagents/spec';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
declare const googleProviderOptions: z.ZodObject<{
|
|
5
|
+
candidateCount: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
responseModalities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
7
|
+
TEXT: "TEXT";
|
|
8
|
+
IMAGE: "IMAGE";
|
|
9
|
+
AUDIO: "AUDIO";
|
|
10
|
+
}>>>;
|
|
11
|
+
mediaResolution: z.ZodOptional<z.ZodString>;
|
|
12
|
+
cachedContent: z.ZodOptional<z.ZodString>;
|
|
13
|
+
enableEnhancedCivicAnswers: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
15
|
+
safetySettings: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
16
|
+
thinkingConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
17
|
+
imageConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
18
|
+
numberOfImages: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
negativePrompt: z.ZodOptional<z.ZodString>;
|
|
20
|
+
aspectRatio: z.ZodOptional<z.ZodString>;
|
|
21
|
+
guidanceScale: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
safetyFilterLevel: z.ZodOptional<z.ZodString>;
|
|
23
|
+
personGeneration: z.ZodOptional<z.ZodString>;
|
|
24
|
+
includeSafetyAttributes: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
+
includeRaiReason: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
language: z.ZodOptional<z.ZodString>;
|
|
27
|
+
outputMimeType: z.ZodOptional<z.ZodString>;
|
|
28
|
+
outputCompressionQuality: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
addWatermark: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
imageSize: z.ZodOptional<z.ZodString>;
|
|
31
|
+
enhancePrompt: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
editMode: z.ZodOptional<z.ZodString>;
|
|
33
|
+
baseSteps: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
}, z.core.$loose>;
|
|
35
|
+
type GoogleProviderOptions = z.infer<typeof googleProviderOptions>;
|
|
36
|
+
|
|
37
|
+
declare class GoogleProvider implements LLMProviderInterface {
|
|
38
|
+
readonly name = "google";
|
|
39
|
+
readonly specificationVersion: "1";
|
|
40
|
+
private readonly config;
|
|
41
|
+
private client;
|
|
42
|
+
private static readonly cacheTtl;
|
|
43
|
+
private static modelsCache;
|
|
44
|
+
private static modelsCacheTime;
|
|
45
|
+
private static modelMetadataCache;
|
|
46
|
+
constructor(config: ProviderFactoryConfig);
|
|
47
|
+
private getClient;
|
|
48
|
+
supportsModel(modelId: string): boolean;
|
|
49
|
+
getIcon(_modelId?: string): string;
|
|
50
|
+
private getHttpOptions;
|
|
51
|
+
getModels(filter?: string): Promise<ProviderModelInfo[]>;
|
|
52
|
+
private filterModels;
|
|
53
|
+
private getModelMetadata;
|
|
54
|
+
getModelCapabilities(modelId: string): Promise<ModelCapabilities | null>;
|
|
55
|
+
private buildGenerateContentParams;
|
|
56
|
+
private extractImagenRequest;
|
|
57
|
+
inspectRequest(request: ProviderRequest): Promise<InspectedRequest>;
|
|
58
|
+
generate(request: ProviderRequest): Promise<ProviderResponse>;
|
|
59
|
+
private generateImagen;
|
|
60
|
+
stream(request: ProviderRequest): Promise<AsyncIterable<ProviderStreamChunk>>;
|
|
61
|
+
private toProviderError;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Google Gemini / Imagen provider factory for Standard Agents.
|
|
66
|
+
*/
|
|
67
|
+
declare const google: ProviderFactoryWithOptions<typeof googleProviderOptions>;
|
|
68
|
+
|
|
69
|
+
export { GoogleProvider, type GoogleProviderOptions, google, googleProviderOptions };
|