@langchain/google-common 2.0.4 → 2.0.5-dev-1765432861398
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/auth.d.cts.map +1 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/chat_models.d.cts +2 -14
- package/dist/chat_models.d.cts.map +1 -0
- package/dist/chat_models.d.ts +2 -14
- package/dist/chat_models.d.ts.map +1 -0
- package/dist/connection.d.cts +0 -2
- package/dist/connection.d.cts.map +1 -0
- package/dist/connection.d.ts +0 -2
- package/dist/connection.d.ts.map +1 -0
- package/dist/embeddings.d.cts.map +1 -0
- package/dist/embeddings.d.ts.map +1 -0
- package/dist/experimental/media.d.cts +6 -7
- package/dist/experimental/media.d.cts.map +1 -0
- package/dist/experimental/media.d.ts +6 -7
- package/dist/experimental/media.d.ts.map +1 -0
- package/dist/experimental/utils/media_core.d.cts +3 -4
- package/dist/experimental/utils/media_core.d.cts.map +1 -0
- package/dist/experimental/utils/media_core.d.ts +3 -4
- package/dist/experimental/utils/media_core.d.ts.map +1 -0
- package/dist/llms.d.cts +0 -7
- package/dist/llms.d.cts.map +1 -0
- package/dist/llms.d.ts +0 -7
- package/dist/llms.d.ts.map +1 -0
- package/dist/output_parsers.d.cts.map +1 -0
- package/dist/output_parsers.d.ts.map +1 -0
- package/dist/types-anthropic.d.cts +1 -4
- package/dist/types-anthropic.d.cts.map +1 -0
- package/dist/types-anthropic.d.ts +1 -4
- package/dist/types-anthropic.d.ts.map +1 -0
- package/dist/types.d.cts +11 -24
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.ts +11 -24
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/common.d.cts.map +1 -0
- package/dist/utils/common.d.ts.map +1 -0
- package/dist/utils/failed_handler.d.cts +0 -1
- package/dist/utils/failed_handler.d.cts.map +1 -0
- package/dist/utils/failed_handler.d.ts +0 -1
- package/dist/utils/failed_handler.d.ts.map +1 -0
- package/dist/utils/gemini.d.cts.map +1 -0
- package/dist/utils/gemini.d.ts.map +1 -0
- package/dist/utils/palm.d.cts +0 -1
- package/dist/utils/palm.d.cts.map +1 -0
- package/dist/utils/palm.d.ts +0 -1
- package/dist/utils/palm.d.ts.map +1 -0
- package/dist/utils/safety.d.cts +0 -1
- package/dist/utils/safety.d.cts.map +1 -0
- package/dist/utils/safety.d.ts +0 -1
- package/dist/utils/safety.d.ts.map +1 -0
- package/dist/utils/stream.d.cts +0 -21
- package/dist/utils/stream.d.cts.map +1 -0
- package/dist/utils/stream.d.ts +0 -21
- package/dist/utils/stream.d.ts.map +1 -0
- package/dist/utils/zod_to_gemini_parameters.d.cts +4 -14
- package/dist/utils/zod_to_gemini_parameters.d.cts.map +1 -0
- package/dist/utils/zod_to_gemini_parameters.d.ts +4 -14
- package/dist/utils/zod_to_gemini_parameters.d.ts.map +1 -0
- package/package.json +17 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media_core.d.ts","names":["BaseStore","Serializable","MediaBlobData","MediaBlobParameters","Record","MediaBlob","Uint8Array","Promise","Blob","Omit","ActionIfInvalidAction","BlobStoreStoreOptions","ActionIfBlobMissingAction","BlobStoreFetchOptions","BlobStoreOptions","BlobStore","BackedBlobStoreOptions","BackedBlobStore","AsyncGenerator","ReadThroughBlobStoreOptions","ReadThroughBlobStore","SimpleWebBlobStore","DataBlobStore","MediaManagerConfiguration","MediaManager"],"sources":["../../../src/experimental/utils/media_core.d.ts"],"sourcesContent":["import { BaseStore } from \"@langchain/core/stores\";\nimport { Serializable } from \"@langchain/core/load/serializable\";\nexport type MediaBlobData = {\n value: string;\n type: string;\n};\nexport interface MediaBlobParameters {\n data?: MediaBlobData;\n metadata?: Record<string, unknown>;\n path?: string;\n}\n/**\n * Represents a chunk of data that can be identified by the path where the\n * data is (or will be) located, along with optional metadata about the data.\n */\nexport declare class MediaBlob extends Serializable implements MediaBlobParameters {\n lc_serializable: boolean;\n lc_namespace: string[];\n data: MediaBlobData;\n metadata?: Record<string, any>;\n path?: string;\n constructor(params: MediaBlobParameters);\n get size(): number;\n get dataType(): string;\n get encoding(): string;\n get mimetype(): string;\n get asBytes(): Uint8Array;\n asString(): Promise<string>;\n asBase64(): Promise<string>;\n asDataUrl(): Promise<string>;\n asUri(): Promise<string>;\n encode(): Promise<{\n encoded: string;\n encoding: string;\n }>;\n static fromDataUrl(url: string): MediaBlob;\n static fromBlob(blob: Blob, other?: Omit<MediaBlobParameters, \"data\">): Promise<MediaBlob>;\n}\nexport type ActionIfInvalidAction = \"ignore\" | \"prefixPath\" | \"prefixUuid1\" | \"prefixUuid4\" | \"prefixUuid6\" | \"prefixUuid7\" | \"removePath\";\nexport interface BlobStoreStoreOptions {\n /**\n * If the path is missing or invalid in the blob, how should we create\n * a new path?\n * Subclasses may define their own methods, but the following are supported\n * by default:\n * - Undefined or an emtpy string: Reject the blob\n * - \"ignore\": Attempt to store it anyway (but this may fail)\n * - \"prefixPath\": Use the default prefix for the BlobStore and get the\n * unique portion from the URL. The original path is stored in the metadata\n * - \"prefixUuid\": Use the default prefix for the BlobStore and get the\n * unique portion from a generated UUID. The original path is stored\n * in the metadata\n */\n actionIfInvalid?: ActionIfInvalidAction;\n /**\n * The expected prefix for URIs that are stored.\n * This may be used to test if a MediaBlob is valid and used to create a new\n * path if \"prefixPath\" or \"prefixUuid\" is set for actionIfInvalid.\n */\n pathPrefix?: string;\n}\nexport type ActionIfBlobMissingAction = \"emptyBlob\";\nexport interface BlobStoreFetchOptions {\n /**\n * If the blob is not found when fetching, what should we do?\n * Subclasses may define their own methods, but the following are supported\n * by default:\n * - Undefined or an empty string: return undefined\n * - \"emptyBlob\": return a new MediaBlob that has the path set, but nothing else.\n */\n actionIfBlobMissing?: ActionIfBlobMissingAction;\n}\nexport interface BlobStoreOptions {\n defaultStoreOptions?: BlobStoreStoreOptions;\n defaultFetchOptions?: BlobStoreFetchOptions;\n}\n/**\n * A specialized Store that is designed to handle MediaBlobs and use the\n * key that is included in the blob to determine exactly how it is stored.\n *\n * The full details of a MediaBlob may be changed when it is stored.\n * For example, it may get additional or different Metadata. This should be\n * what is returned when the store() method is called.\n *\n * Although BlobStore extends BaseStore, not all of the methods from\n * BaseStore may be implemented (or even possible). Those that are not\n * implemented should be documented and throw an Error if called.\n */\nexport declare abstract class BlobStore extends BaseStore<string, MediaBlob> {\n lc_namespace: string[];\n defaultStoreOptions: BlobStoreStoreOptions;\n defaultFetchOptions: BlobStoreFetchOptions;\n constructor(opts?: BlobStoreOptions);\n protected _realKey(key: string | MediaBlob): Promise<string>;\n /**\n * Is the path supported by this BlobStore?\n *\n * Although this is async, this is expected to be a relatively fast operation\n * (ie - you shouldn't make network calls).\n *\n * @param path The path to check\n * @param opts Any options (if needed) that may be used to determine if it is valid\n * @return If the path is supported\n */\n hasValidPath(path: string | undefined, opts?: BlobStoreStoreOptions): Promise<boolean>;\n protected _blobPathSuffix(blob: MediaBlob): string;\n protected _newBlob(oldBlob: MediaBlob, newPath?: string): Promise<MediaBlob>;\n protected _validBlobPrefixPath(blob: MediaBlob, opts?: BlobStoreStoreOptions): Promise<MediaBlob>;\n protected _validBlobPrefixUuidFunction(name: ActionIfInvalidAction | string): string;\n protected _validBlobPrefixUuid(blob: MediaBlob, opts?: BlobStoreStoreOptions): Promise<MediaBlob>;\n protected _validBlobRemovePath(blob: MediaBlob, _opts?: BlobStoreStoreOptions): Promise<MediaBlob>;\n /**\n * Based on the blob and options, return a blob that has a valid path\n * that can be saved.\n * @param blob\n * @param opts\n */\n protected _validStoreBlob(blob: MediaBlob, opts?: BlobStoreStoreOptions): Promise<MediaBlob | undefined>;\n store(blob: MediaBlob, opts?: BlobStoreStoreOptions): Promise<MediaBlob | undefined>;\n protected _missingFetchBlobEmpty(path: string, _opts?: BlobStoreFetchOptions): Promise<MediaBlob>;\n protected _missingFetchBlob(path: string, opts?: BlobStoreFetchOptions): Promise<MediaBlob | undefined>;\n fetch(key: string | MediaBlob, opts?: BlobStoreFetchOptions): Promise<MediaBlob | undefined>;\n}\nexport interface BackedBlobStoreOptions extends BlobStoreOptions {\n backingStore: BaseStore<string, MediaBlob>;\n}\nexport declare class BackedBlobStore extends BlobStore {\n backingStore: BaseStore<string, MediaBlob>;\n constructor(opts: BackedBlobStoreOptions);\n mdelete(keys: string[]): Promise<void>;\n mget(keys: string[]): Promise<(MediaBlob | undefined)[]>;\n mset(keyValuePairs: [string, MediaBlob][]): Promise<void>;\n yieldKeys(prefix: string | undefined): AsyncGenerator<string>;\n}\nexport interface ReadThroughBlobStoreOptions extends BlobStoreOptions {\n baseStore: BlobStore;\n backingStore: BlobStore;\n}\nexport declare class ReadThroughBlobStore extends BlobStore {\n baseStore: BlobStore;\n backingStore: BlobStore;\n constructor(opts: ReadThroughBlobStoreOptions);\n store(blob: MediaBlob, opts?: BlobStoreStoreOptions): Promise<MediaBlob | undefined>;\n mdelete(keys: string[]): Promise<void>;\n mget(keys: string[]): Promise<(MediaBlob | undefined)[]>;\n mset(_keyValuePairs: [string, MediaBlob][]): Promise<void>;\n yieldKeys(prefix: string | undefined): AsyncGenerator<string>;\n}\nexport declare class SimpleWebBlobStore extends BlobStore {\n _notImplementedException(): void;\n hasValidPath(path: string | undefined, _opts?: BlobStoreStoreOptions): Promise<boolean>;\n _fetch(url: string): Promise<MediaBlob | undefined>;\n mget(keys: string[]): Promise<(MediaBlob | undefined)[]>;\n mdelete(_keys: string[]): Promise<void>;\n mset(_keyValuePairs: [string, MediaBlob][]): Promise<void>;\n yieldKeys(_prefix: string | undefined): AsyncGenerator<string>;\n}\n/**\n * A blob \"store\" that works with data: URLs that will turn the URL into\n * a blob.\n */\nexport declare class DataBlobStore extends BlobStore {\n _notImplementedException(): void;\n hasValidPath(path: string, _opts?: BlobStoreStoreOptions): Promise<boolean>;\n _fetch(url: string): MediaBlob;\n mget(keys: string[]): Promise<(MediaBlob | undefined)[]>;\n mdelete(_keys: string[]): Promise<void>;\n mset(_keyValuePairs: [string, MediaBlob][]): Promise<void>;\n yieldKeys(_prefix: string | undefined): AsyncGenerator<string>;\n}\nexport interface MediaManagerConfiguration {\n /**\n * A store that, given a common URI, returns the corresponding MediaBlob.\n * The returned MediaBlob may have a different URI.\n * In many cases, this will be a ReadThroughStore or something similar\n * that has a cached version of the MediaBlob, but also a way to get\n * a new (or refreshed) version.\n */\n store: BlobStore;\n /**\n * BlobStores that can resolve a URL into the MediaBlob to save\n * in the canonical store. This list is evaluated in order.\n * If not provided, a default list (which involves a DataBlobStore\n * and a SimpleWebBlobStore) will be used.\n */\n resolvers?: BlobStore[];\n}\n/**\n * Responsible for converting a URI (typically a web URL) into a MediaBlob.\n * Allows for aliasing / caching of the requested URI and what it resolves to.\n * This MediaBlob is expected to be usable to provide to an LLM, either\n * through the Base64 of the media or through a canonical URI that the LLM\n * supports.\n */\nexport declare class MediaManager {\n store: BlobStore;\n resolvers: BlobStore[] | undefined;\n constructor(config: MediaManagerConfiguration);\n defaultResolvers(): BlobStore[];\n _isInvalid(blob: MediaBlob | undefined): Promise<boolean>;\n /**\n * Given the public URI, load what is at this URI and save it\n * in the store.\n * @param uri The URI to resolve using the resolver\n * @return A canonical MediaBlob for this URI\n */\n _resolveAndSave(uri: string): Promise<MediaBlob | undefined>;\n getMediaBlob(uri: string): Promise<MediaBlob | undefined>;\n}\n//# sourceMappingURL=media_core.d.ts.map"],"mappings":";;;;KAEYE,aAAAA;;EAAAA,IAAAA,EAAAA,MAAAA;AAIZ,CAAA;AASqBG,UATJF,mBAAAA,CASa;EAGpBD,IAAAA,CAAAA,EAXCA,aAWDA;EACKE,QAAAA,CAAAA,EAXAA,MAWAA,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;EAESD,IAAAA,CAAAA,EAAAA,MAAAA;;;;;;AAUVI,cAhBOF,SAAAA,SAAkBJ,YAAAA,YAAwBE,mBAgBjDI,CAAAA;EAIuBF,eAAAA,EAAAA,OAAAA;EACXG,YAAAA,EAAAA,MAAAA,EAAAA;EAAmBL,IAAAA,EAlBnCD,aAkBmCC;EAALM,QA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17
|
declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelCallOptions> implements GoogleBaseLLMInput<AuthOptions> {
|
|
18
|
-
// Used for tracing, replace with the same name as your class
|
|
19
18
|
static lc_name(): string;
|
|
20
19
|
get lc_secrets(): {
|
|
21
20
|
[key: string]: string;
|
|
@@ -41,7 +40,6 @@ declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelC
|
|
|
41
40
|
buildClient(fields?: GoogleAIBaseLLMInput<AuthOptions>): GoogleAbstractedClient;
|
|
42
41
|
buildConnection(fields: GoogleBaseLLMInput<AuthOptions>, client: GoogleAbstractedClient): void;
|
|
43
42
|
get platform(): GooglePlatformType;
|
|
44
|
-
// Replace
|
|
45
43
|
_llmType(): string;
|
|
46
44
|
formatPrompt(prompt: string): MessageContent;
|
|
47
45
|
/**
|
|
@@ -51,9 +49,6 @@ declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelC
|
|
|
51
49
|
* in order to handle public APi calls to `generate()`.
|
|
52
50
|
*/
|
|
53
51
|
_call(prompt: string, options: this["ParsedCallOptions"]): Promise<string>;
|
|
54
|
-
// Normally, you should not override this method and instead should override
|
|
55
|
-
// _streamResponseChunks. We are doing so here to allow for multimodal inputs into
|
|
56
|
-
// the LLM.
|
|
57
52
|
_streamIterator(input: BaseLanguageModelInput, options?: BaseLanguageModelCallOptions): AsyncGenerator<string>;
|
|
58
53
|
predictMessages(messages: BaseMessage[], options?: string[] | BaseLanguageModelCallOptions, _callbacks?: Callbacks): Promise<BaseMessage>;
|
|
59
54
|
/**
|
|
@@ -63,8 +58,6 @@ declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelC
|
|
|
63
58
|
* TODO: Replace with something less hacky.
|
|
64
59
|
*/
|
|
65
60
|
protected createProxyChat(): ChatGoogleBase<AuthOptions>;
|
|
66
|
-
// TODO: Remove the need to override this - we are doing it to
|
|
67
|
-
// allow the LLM to handle multimodal types of input.
|
|
68
61
|
invoke(input: BaseLanguageModelInput, options?: BaseLanguageModelCallOptions): Promise<string>;
|
|
69
62
|
}
|
|
70
63
|
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llms.d.cts","names":["Callbacks","LLM","BaseLanguageModelCallOptions","BaseLanguageModelInput","BaseMessage","MessageContent","AbstractGoogleLLMConnection","GoogleAIBaseLLMInput","GoogleAIModelParams","GoogleAISafetySetting","GooglePlatformType","GeminiContent","GoogleAIResponseMimeType","GoogleAbstractedClient","ChatGoogleBase","GoogleBaseLLMInput","GoogleAISafetyHandler","GoogleLLMConnection","AuthOptions","Promise","GoogleBaseLLM","AsyncGenerator"],"sources":["../src/llms.d.ts"],"sourcesContent":["import { Callbacks } from \"@langchain/core/callbacks/manager\";\nimport { LLM } from \"@langchain/core/language_models/llms\";\nimport { type BaseLanguageModelCallOptions, BaseLanguageModelInput } from \"@langchain/core/language_models/base\";\nimport { BaseMessage, MessageContent } from \"@langchain/core/messages\";\nimport { AbstractGoogleLLMConnection } from \"./connection.js\";\nimport { GoogleAIBaseLLMInput, GoogleAIModelParams, GoogleAISafetySetting, GooglePlatformType, GeminiContent, GoogleAIResponseMimeType } from \"./types.js\";\nimport { GoogleAbstractedClient } from \"./auth.js\";\nimport { ChatGoogleBase } from \"./chat_models.js\";\nimport type { GoogleBaseLLMInput, GoogleAISafetyHandler } from \"./types.js\";\nexport { GoogleBaseLLMInput };\ndeclare class GoogleLLMConnection<AuthOptions> extends AbstractGoogleLLMConnection<MessageContent, AuthOptions> {\n formatContents(input: MessageContent, _parameters: GoogleAIModelParams): Promise<GeminiContent[]>;\n}\n/**\n * Integration with an LLM.\n */\nexport declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelCallOptions> implements GoogleBaseLLMInput<AuthOptions> {\n static lc_name(): string;\n get lc_secrets(): {\n [key: string]: string;\n } | undefined;\n originalFields?: GoogleBaseLLMInput<AuthOptions>;\n lc_serializable: boolean;\n modelName: string;\n model: string;\n temperature: number;\n maxOutputTokens: number;\n topP: number;\n topK: number;\n stopSequences: string[];\n safetySettings: GoogleAISafetySetting[];\n safetyHandler: GoogleAISafetyHandler;\n responseMimeType: GoogleAIResponseMimeType;\n protected connection: GoogleLLMConnection<AuthOptions>;\n protected streamedConnection: GoogleLLMConnection<AuthOptions>;\n constructor(fields?: GoogleBaseLLMInput<AuthOptions>);\n abstract buildAbstractedClient(fields?: GoogleAIBaseLLMInput<AuthOptions>): GoogleAbstractedClient;\n buildApiKeyClient(apiKey: string): GoogleAbstractedClient;\n buildApiKey(fields?: GoogleAIBaseLLMInput<AuthOptions>): string | undefined;\n buildClient(fields?: GoogleAIBaseLLMInput<AuthOptions>): GoogleAbstractedClient;\n buildConnection(fields: GoogleBaseLLMInput<AuthOptions>, client: GoogleAbstractedClient): void;\n get platform(): GooglePlatformType;\n _llmType(): string;\n formatPrompt(prompt: string): MessageContent;\n /**\n * For some given input string and options, return a string output.\n *\n * Despite the fact that `invoke` is overridden below, we still need this\n * in order to handle public APi calls to `generate()`.\n */\n _call(prompt: string, options: this[\"ParsedCallOptions\"]): Promise<string>;\n _streamIterator(input: BaseLanguageModelInput, options?: BaseLanguageModelCallOptions): AsyncGenerator<string>;\n predictMessages(messages: BaseMessage[], options?: string[] | BaseLanguageModelCallOptions, _callbacks?: Callbacks): Promise<BaseMessage>;\n /**\n * Internal implementation detail to allow Google LLMs to support\n * multimodal input by delegating to the chat model implementation.\n *\n * TODO: Replace with something less hacky.\n */\n protected createProxyChat(): ChatGoogleBase<AuthOptions>;\n invoke(input: BaseLanguageModelInput, options?: BaseLanguageModelCallOptions): Promise<string>;\n}\n//# sourceMappingURL=llms.d.ts.map"],"mappings":";;;;;;;;;;AAS8B,cAChBiB,mBAAmBC,CAAAA,WAAAA,CAAAA,SAAsBZ,2BAAtB,CAAkDD,cAAlD,EAAkEa,WAAlE,CAAA,CAAA;EAAkDb,cAAAA,CAAAA,KAAAA,EACzDA,cADyDA,EAAAA,W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
|
15
15
|
* Integration with an LLM.
|
|
16
16
|
*/
|
|
17
17
|
declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelCallOptions> implements GoogleBaseLLMInput<AuthOptions> {
|
|
18
|
-
// Used for tracing, replace with the same name as your class
|
|
19
18
|
static lc_name(): string;
|
|
20
19
|
get lc_secrets(): {
|
|
21
20
|
[key: string]: string;
|
|
@@ -41,7 +40,6 @@ declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelC
|
|
|
41
40
|
buildClient(fields?: GoogleAIBaseLLMInput<AuthOptions>): GoogleAbstractedClient;
|
|
42
41
|
buildConnection(fields: GoogleBaseLLMInput<AuthOptions>, client: GoogleAbstractedClient): void;
|
|
43
42
|
get platform(): GooglePlatformType;
|
|
44
|
-
// Replace
|
|
45
43
|
_llmType(): string;
|
|
46
44
|
formatPrompt(prompt: string): MessageContent;
|
|
47
45
|
/**
|
|
@@ -51,9 +49,6 @@ declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelC
|
|
|
51
49
|
* in order to handle public APi calls to `generate()`.
|
|
52
50
|
*/
|
|
53
51
|
_call(prompt: string, options: this["ParsedCallOptions"]): Promise<string>;
|
|
54
|
-
// Normally, you should not override this method and instead should override
|
|
55
|
-
// _streamResponseChunks. We are doing so here to allow for multimodal inputs into
|
|
56
|
-
// the LLM.
|
|
57
52
|
_streamIterator(input: BaseLanguageModelInput, options?: BaseLanguageModelCallOptions): AsyncGenerator<string>;
|
|
58
53
|
predictMessages(messages: BaseMessage[], options?: string[] | BaseLanguageModelCallOptions, _callbacks?: Callbacks): Promise<BaseMessage>;
|
|
59
54
|
/**
|
|
@@ -63,8 +58,6 @@ declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelC
|
|
|
63
58
|
* TODO: Replace with something less hacky.
|
|
64
59
|
*/
|
|
65
60
|
protected createProxyChat(): ChatGoogleBase<AuthOptions>;
|
|
66
|
-
// TODO: Remove the need to override this - we are doing it to
|
|
67
|
-
// allow the LLM to handle multimodal types of input.
|
|
68
61
|
invoke(input: BaseLanguageModelInput, options?: BaseLanguageModelCallOptions): Promise<string>;
|
|
69
62
|
}
|
|
70
63
|
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llms.d.ts","names":["Callbacks","LLM","BaseLanguageModelCallOptions","BaseLanguageModelInput","BaseMessage","MessageContent","AbstractGoogleLLMConnection","GoogleAIBaseLLMInput","GoogleAIModelParams","GoogleAISafetySetting","GooglePlatformType","GeminiContent","GoogleAIResponseMimeType","GoogleAbstractedClient","ChatGoogleBase","GoogleBaseLLMInput","GoogleAISafetyHandler","GoogleLLMConnection","AuthOptions","Promise","GoogleBaseLLM","AsyncGenerator"],"sources":["../src/llms.d.ts"],"sourcesContent":["import { Callbacks } from \"@langchain/core/callbacks/manager\";\nimport { LLM } from \"@langchain/core/language_models/llms\";\nimport { type BaseLanguageModelCallOptions, BaseLanguageModelInput } from \"@langchain/core/language_models/base\";\nimport { BaseMessage, MessageContent } from \"@langchain/core/messages\";\nimport { AbstractGoogleLLMConnection } from \"./connection.js\";\nimport { GoogleAIBaseLLMInput, GoogleAIModelParams, GoogleAISafetySetting, GooglePlatformType, GeminiContent, GoogleAIResponseMimeType } from \"./types.js\";\nimport { GoogleAbstractedClient } from \"./auth.js\";\nimport { ChatGoogleBase } from \"./chat_models.js\";\nimport type { GoogleBaseLLMInput, GoogleAISafetyHandler } from \"./types.js\";\nexport { GoogleBaseLLMInput };\ndeclare class GoogleLLMConnection<AuthOptions> extends AbstractGoogleLLMConnection<MessageContent, AuthOptions> {\n formatContents(input: MessageContent, _parameters: GoogleAIModelParams): Promise<GeminiContent[]>;\n}\n/**\n * Integration with an LLM.\n */\nexport declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelCallOptions> implements GoogleBaseLLMInput<AuthOptions> {\n static lc_name(): string;\n get lc_secrets(): {\n [key: string]: string;\n } | undefined;\n originalFields?: GoogleBaseLLMInput<AuthOptions>;\n lc_serializable: boolean;\n modelName: string;\n model: string;\n temperature: number;\n maxOutputTokens: number;\n topP: number;\n topK: number;\n stopSequences: string[];\n safetySettings: GoogleAISafetySetting[];\n safetyHandler: GoogleAISafetyHandler;\n responseMimeType: GoogleAIResponseMimeType;\n protected connection: GoogleLLMConnection<AuthOptions>;\n protected streamedConnection: GoogleLLMConnection<AuthOptions>;\n constructor(fields?: GoogleBaseLLMInput<AuthOptions>);\n abstract buildAbstractedClient(fields?: GoogleAIBaseLLMInput<AuthOptions>): GoogleAbstractedClient;\n buildApiKeyClient(apiKey: string): GoogleAbstractedClient;\n buildApiKey(fields?: GoogleAIBaseLLMInput<AuthOptions>): string | undefined;\n buildClient(fields?: GoogleAIBaseLLMInput<AuthOptions>): GoogleAbstractedClient;\n buildConnection(fields: GoogleBaseLLMInput<AuthOptions>, client: GoogleAbstractedClient): void;\n get platform(): GooglePlatformType;\n _llmType(): string;\n formatPrompt(prompt: string): MessageContent;\n /**\n * For some given input string and options, return a string output.\n *\n * Despite the fact that `invoke` is overridden below, we still need this\n * in order to handle public APi calls to `generate()`.\n */\n _call(prompt: string, options: this[\"ParsedCallOptions\"]): Promise<string>;\n _streamIterator(input: BaseLanguageModelInput, options?: BaseLanguageModelCallOptions): AsyncGenerator<string>;\n predictMessages(messages: BaseMessage[], options?: string[] | BaseLanguageModelCallOptions, _callbacks?: Callbacks): Promise<BaseMessage>;\n /**\n * Internal implementation detail to allow Google LLMs to support\n * multimodal input by delegating to the chat model implementation.\n *\n * TODO: Replace with something less hacky.\n */\n protected createProxyChat(): ChatGoogleBase<AuthOptions>;\n invoke(input: BaseLanguageModelInput, options?: BaseLanguageModelCallOptions): Promise<string>;\n}\n//# sourceMappingURL=llms.d.ts.map"],"mappings":";;;;;;;;;;AAS8B,cAChBiB,mBAAmBC,CAAAA,WAAAA,CAAAA,SAAsBZ,2BAAtB,CAAkDD,cAAlD,EAAkEa,WAAlE,CAAA,CAAA;EAAkD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parsers.d.cts","names":["BaseLLMOutputParser","Callbacks","ChatGeneration","Generation","GeminiGroundingChunk","GeminiGroundingMetadata","GeminiGroundingSupport","Generations","GroundingInfo","BaseGoogleSearchOutputParser","Promise","SimpleGoogleSearchOutputParser","MarkdownGoogleSearchOutputParser"],"sources":["../src/output_parsers.d.ts"],"sourcesContent":["import { BaseLLMOutputParser } from \"@langchain/core/output_parsers\";\nimport { Callbacks } from \"@langchain/core/callbacks/manager\";\nimport { ChatGeneration, Generation } from \"@langchain/core/outputs\";\nimport { GeminiGroundingChunk, GeminiGroundingMetadata, GeminiGroundingSupport } from \"./types.js\";\ntype Generations = Generation[] | ChatGeneration[];\ntype GroundingInfo = {\n metadata: GeminiGroundingMetadata;\n supports: GeminiGroundingSupport[];\n};\nexport declare abstract class BaseGoogleSearchOutputParser extends BaseLLMOutputParser<string> {\n lc_namespace: string[];\n protected generationToGroundingInfo(generation: Generation | ChatGeneration): GroundingInfo | undefined;\n protected generationsToGroundingInfo(generations: Generations): GroundingInfo | undefined;\n protected generationToString(generation: Generation | ChatGeneration): string;\n protected generationsToString(generations: Generations): string;\n protected abstract segmentPrefix(grounding: GroundingInfo, support: GeminiGroundingSupport, index: number): string | undefined;\n protected abstract segmentSuffix(grounding: GroundingInfo, support: GeminiGroundingSupport, index: number): string | undefined;\n protected annotateSegment(text: string, grounding: GroundingInfo, support: GeminiGroundingSupport, index: number): string;\n protected annotateTextSegments(text: string, grounding: GroundingInfo): string;\n protected abstract textPrefix(text: string, grounding: GroundingInfo): string | undefined;\n protected abstract textSuffix(text: string, grounding: GroundingInfo): string | undefined;\n /**\n * Google requires us to\n * \"Display the Search Suggestion exactly as provided without any modifications\"\n * So this will typically be called from the textSuffix() method to get\n * a string that renders HTML.\n * See https://ai.google.dev/gemini-api/docs/grounding/search-suggestions\n * @param grounding\n */\n protected searchSuggestion(grounding: GroundingInfo): string;\n protected annotateText(text: string, grounding: GroundingInfo): string;\n parseResult(generations: Generations, _callbacks?: Callbacks): Promise<string>;\n}\nexport declare class SimpleGoogleSearchOutputParser extends BaseGoogleSearchOutputParser {\n protected segmentPrefix(_grounding: GroundingInfo, _support: GeminiGroundingSupport, _index: number): string | undefined;\n protected segmentSuffix(_grounding: GroundingInfo, support: GeminiGroundingSupport, _index: number): string | undefined;\n protected textPrefix(_text: string, _grounding: GroundingInfo): string;\n protected chunkToString(chunk: GeminiGroundingChunk, index: number): string;\n protected textSuffix(_text: string, grounding: GroundingInfo): string;\n}\nexport declare class MarkdownGoogleSearchOutputParser extends BaseGoogleSearchOutputParser {\n protected segmentPrefix(_grounding: GroundingInfo, _support: GeminiGroundingSupport, _index: number): string | undefined;\n protected chunkLink(grounding: GroundingInfo, index: number): string;\n protected segmentSuffix(grounding: GroundingInfo, support: GeminiGroundingSupport, _index: number): string | undefined;\n protected textPrefix(_text: string, _grounding: GroundingInfo): string | undefined;\n protected chunkSuffixLink(chunk: GeminiGroundingChunk, index: number): string;\n protected textSuffix(_text: string, grounding: GroundingInfo): string | undefined;\n}\nexport {};\n//# sourceMappingURL=output_parsers.d.ts.map"],"mappings":";;;;;;KAIKO,WAAAA,GAAcJ,eAAeD;KAC7BM,aAAAA;EADAD,QAAAA,EAESF,uBAFKF;EACdK,QAAAA,EAESF,sBADAD,EAAAA;AAGd,CAAA;AAEoDF,uBAFtBM,4BAAAA,SAAqCT,mBAEfG,CAAAA,MAAAA,CAAAA,CAAAA;EAAaD,YAAAA,EAAAA,MAAAA,EAAAA;EAAiBM,UAAAA,yBAAAA,CAAAA,UAAAA,EAA9BL,UAA8BK,GAAjBN,cAAiBM,CAAAA,EAAAA,aAAAA,GAAAA,SAAAA;EAC5BD,UAAAA,0BAAAA,CAAAA,WAAAA,EAAAA,WAAAA,CAAAA,EAAcC,aAAdD,GAAAA,SAAAA;EAAcC,UAAAA,kBAAAA,CAAAA,UAAAA,EACvBL,UADuBK,GACVN,cADUM,CAAAA,EAAAA,MAAAA;EACvBL,UAAAA,mBAAAA,CAAAA,WAAAA,EACEI,WAD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,EAAAA,MAAAA,EAAAA,SAAAA,EAIgBA,aAJhBA,CAAAA,EAAAA,MAAAA,GAAAA,SAAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output_parsers.d.ts","names":["BaseLLMOutputParser","Callbacks","ChatGeneration","Generation","GeminiGroundingChunk","GeminiGroundingMetadata","GeminiGroundingSupport","Generations","GroundingInfo","BaseGoogleSearchOutputParser","Promise","SimpleGoogleSearchOutputParser","MarkdownGoogleSearchOutputParser"],"sources":["../src/output_parsers.d.ts"],"sourcesContent":["import { BaseLLMOutputParser } from \"@langchain/core/output_parsers\";\nimport { Callbacks } from \"@langchain/core/callbacks/manager\";\nimport { ChatGeneration, Generation } from \"@langchain/core/outputs\";\nimport { GeminiGroundingChunk, GeminiGroundingMetadata, GeminiGroundingSupport } from \"./types.js\";\ntype Generations = Generation[] | ChatGeneration[];\ntype GroundingInfo = {\n metadata: GeminiGroundingMetadata;\n supports: GeminiGroundingSupport[];\n};\nexport declare abstract class BaseGoogleSearchOutputParser extends BaseLLMOutputParser<string> {\n lc_namespace: string[];\n protected generationToGroundingInfo(generation: Generation | ChatGeneration): GroundingInfo | undefined;\n protected generationsToGroundingInfo(generations: Generations): GroundingInfo | undefined;\n protected generationToString(generation: Generation | ChatGeneration): string;\n protected generationsToString(generations: Generations): string;\n protected abstract segmentPrefix(grounding: GroundingInfo, support: GeminiGroundingSupport, index: number): string | undefined;\n protected abstract segmentSuffix(grounding: GroundingInfo, support: GeminiGroundingSupport, index: number): string | undefined;\n protected annotateSegment(text: string, grounding: GroundingInfo, support: GeminiGroundingSupport, index: number): string;\n protected annotateTextSegments(text: string, grounding: GroundingInfo): string;\n protected abstract textPrefix(text: string, grounding: GroundingInfo): string | undefined;\n protected abstract textSuffix(text: string, grounding: GroundingInfo): string | undefined;\n /**\n * Google requires us to\n * \"Display the Search Suggestion exactly as provided without any modifications\"\n * So this will typically be called from the textSuffix() method to get\n * a string that renders HTML.\n * See https://ai.google.dev/gemini-api/docs/grounding/search-suggestions\n * @param grounding\n */\n protected searchSuggestion(grounding: GroundingInfo): string;\n protected annotateText(text: string, grounding: GroundingInfo): string;\n parseResult(generations: Generations, _callbacks?: Callbacks): Promise<string>;\n}\nexport declare class SimpleGoogleSearchOutputParser extends BaseGoogleSearchOutputParser {\n protected segmentPrefix(_grounding: GroundingInfo, _support: GeminiGroundingSupport, _index: number): string | undefined;\n protected segmentSuffix(_grounding: GroundingInfo, support: GeminiGroundingSupport, _index: number): string | undefined;\n protected textPrefix(_text: string, _grounding: GroundingInfo): string;\n protected chunkToString(chunk: GeminiGroundingChunk, index: number): string;\n protected textSuffix(_text: string, grounding: GroundingInfo): string;\n}\nexport declare class MarkdownGoogleSearchOutputParser extends BaseGoogleSearchOutputParser {\n protected segmentPrefix(_grounding: GroundingInfo, _support: GeminiGroundingSupport, _index: number): string | undefined;\n protected chunkLink(grounding: GroundingInfo, index: number): string;\n protected segmentSuffix(grounding: GroundingInfo, support: GeminiGroundingSupport, _index: number): string | undefined;\n protected textPrefix(_text: string, _grounding: GroundingInfo): string | undefined;\n protected chunkSuffixLink(chunk: GeminiGroundingChunk, index: number): string;\n protected textSuffix(_text: string, grounding: GroundingInfo): string | undefined;\n}\nexport {};\n//# sourceMappingURL=output_parsers.d.ts.map"],"mappings":";;;;;;KAIKO,WAAAA,GAAcJ,eAAeD;KAC7BM,aAAAA;EADAD,QAAAA,EAESF,uBAFKF;EACdK,QAAAA,EAESF,sBADAD,EAAAA;AAGd,CAAA;AAEoDF,uBAFtBM,4BAAAA,SAAqCT,mBAEfG,CAAAA,MAAAA,CAAAA,CAAAA;EAAaD,YAAAA,EAAAA,MAAAA,EAAAA;EAAiBM,UAAAA,yBAAAA,CAAAA,UAAAA,EAA9BL,UAA8BK,GAAjBN,cAAiBM,CAAAA,EAAAA,aAAAA,GAAAA,SAAAA;EAC5BD,UAAAA,0BAAAA,CAAAA,WAAAA,EAAAA,WAAAA,CAAAA,EAAcC,aAAdD,GAAAA,SA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,UAAAA,eAAAA,CAAAA,KAAAA,EAI5BF,oBAJ4BE,EAAAA,KAAAA,EAAAA,MAAAA,CAAAA,EAAAA,MAAAA;EAC9BE,UAAAA,UAAAA,CAAAA,KAAAA,EAAAA,MAAAA,EAAAA,SAAAA,EAIgBA,aAJhBA,CAAAA,EAAAA,MAAAA,GAAAA,SAAAA"}
|
|
@@ -62,7 +62,6 @@ interface AnthropicMessageContentRedactedThinking extends AnthropicMessageConten
|
|
|
62
62
|
type: "redacted_thinking";
|
|
63
63
|
data: string;
|
|
64
64
|
}
|
|
65
|
-
// TODO: Define this
|
|
66
65
|
type AnthropicMessageContentToolUseInput = object;
|
|
67
66
|
interface AnthropicMessageContentToolUse extends AnthropicMessageContentBase {
|
|
68
67
|
type: "tool_use";
|
|
@@ -99,10 +98,9 @@ interface AnthropicToolChoiceTool extends AnthropicToolChoiceBase {
|
|
|
99
98
|
name: string;
|
|
100
99
|
}
|
|
101
100
|
type AnthropicToolChoice = AnthropicToolChoiceAuto | AnthropicToolChoiceAny | AnthropicToolChoiceTool;
|
|
102
|
-
// TODO: Define this
|
|
103
101
|
type AnthropicToolInputSchema = object;
|
|
104
102
|
interface AnthropicTool {
|
|
105
|
-
type?: string;
|
|
103
|
+
type?: string;
|
|
106
104
|
name: string;
|
|
107
105
|
description?: string;
|
|
108
106
|
cache_control?: AnthropicCacheControl;
|
|
@@ -221,7 +219,6 @@ interface AnthropicStreamPingEvent extends AnthropicStreamBaseEvent {
|
|
|
221
219
|
}
|
|
222
220
|
interface AnthropicStreamErrorEvent extends AnthropicStreamBaseEvent {
|
|
223
221
|
type: "error";
|
|
224
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
225
222
|
error: any;
|
|
226
223
|
}
|
|
227
224
|
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-anthropic.d.cts","names":["AnthropicCacheControl","AnthropicMessageContentBase","AnthropicMessageContentText","AnthropicMessageContentImage","AnthropicMessageContentThinking","AnthropicMessageContentDocument","AnthropicMessageContentRedactedThinking","AnthropicMessageContentToolUseInput","AnthropicMessageContentToolUse","AnthropicMessageContentToolResultContent","AnthropicMessageContentToolResult","AnthropicMessageContent","AnthropicMessage","AnthropicMetadata","AnthropicToolChoiceBase","AnthropicToolChoiceAuto","AnthropicToolChoiceAny","AnthropicToolChoiceTool","AnthropicToolChoice","AnthropicToolInputSchema","AnthropicTool","AnthropicThinkingEnabled","AnthropicThinkingDisabled","AnthropicThinking","AnthropicRequest","AnthropicRequestSettings","Pick","AnthropicContentText","AnthropicContentToolUse","AnthropicContentThinking","AnthropicContentRedactedThinking","AnthropicContent","AnthropicUsage","AnthropicResponseData","AnthropicResponseMessage","AnthropicStreamBaseEvent","AnthropicAPIConfig","AnthropicStreamEventType","AnthropicStreamDeltaType","AnthropicStreamMessageStartEvent","AnthropicStreamContentBlockStartEvent","AnthropicStreamBaseDelta","AnthropicStreamTextDelta","AnthropicStreamInputJsonDelta","AnthropicStreamDelta","AnthropicStreamContentBlockDeltaEvent","AnthropicStreamContentBlockStopEvent","AnthropicStreamMessageDeltaEvent","Partial","AnthropicStreamMessageStopEvent","AnthropicStreamPingEvent","AnthropicStreamErrorEvent"],"sources":["../src/types-anthropic.d.ts"],"sourcesContent":["export interface AnthropicCacheControl {\n type: \"ephemeral\" | string;\n}\ninterface AnthropicMessageContentBase {\n type: string;\n cache_control?: AnthropicCacheControl | null;\n}\nexport interface AnthropicMessageContentText extends AnthropicMessageContentBase {\n type: \"text\";\n text: string;\n}\nexport interface AnthropicMessageContentImage extends AnthropicMessageContentBase {\n type: \"image\";\n source: {\n type: \"base64\" | string;\n media_type?: string;\n data: string;\n } | {\n type: \"url\" | string;\n url: string;\n };\n}\nexport interface AnthropicMessageContentThinking extends AnthropicMessageContentBase {\n type: \"thinking\";\n thinking: string;\n signature: string;\n}\nexport interface AnthropicMessageContentDocument extends AnthropicMessageContentBase {\n type: \"document\";\n source: {\n type: \"base64\" | \"text\" | string;\n media_type?: \"application/pdf\" | \"text/plain\" | string;\n data: string;\n } | {\n type: \"url\" | string;\n url: string;\n } | {\n type: \"content\" | string;\n content: {\n type: \"image\" | string;\n source: {\n type: \"base64\" | string;\n data: string;\n media_type?: \"image/jpeg\" | \"image/png\" | \"image/gif\" | \"image/webp\" | string;\n } | {\n type: \"url\" | string;\n url: string;\n } | {\n type: \"text\" | string;\n text: string;\n };\n }[];\n };\n citations?: {\n enabled?: boolean;\n };\n context?: string;\n title?: string;\n}\nexport interface AnthropicMessageContentRedactedThinking extends AnthropicMessageContentBase {\n type: \"redacted_thinking\";\n data: string;\n}\nexport type AnthropicMessageContentToolUseInput = object;\nexport interface AnthropicMessageContentToolUse extends AnthropicMessageContentBase {\n type: \"tool_use\";\n id: string;\n name: string;\n input: AnthropicMessageContentToolUseInput;\n}\nexport type AnthropicMessageContentToolResultContent = AnthropicMessageContentText | AnthropicMessageContentImage;\nexport interface AnthropicMessageContentToolResult extends AnthropicMessageContentBase {\n type: \"tool_result\";\n tool_use_id: string;\n is_error?: boolean;\n content: string | AnthropicMessageContentToolResultContent[];\n}\nexport type AnthropicMessageContent = AnthropicMessageContentText | AnthropicMessageContentImage | AnthropicMessageContentToolUse | AnthropicMessageContentToolResult | AnthropicMessageContentThinking | AnthropicMessageContentRedactedThinking;\nexport interface AnthropicMessage {\n role: string;\n content: string | AnthropicMessageContent[];\n}\nexport interface AnthropicMetadata {\n user_id?: string | null;\n}\ninterface AnthropicToolChoiceBase {\n type: string;\n}\nexport interface AnthropicToolChoiceAuto extends AnthropicToolChoiceBase {\n type: \"auto\";\n}\nexport interface AnthropicToolChoiceAny extends AnthropicToolChoiceBase {\n type: \"any\";\n}\nexport interface AnthropicToolChoiceTool extends AnthropicToolChoiceBase {\n type: \"tool\";\n name: string;\n}\nexport type AnthropicToolChoice = AnthropicToolChoiceAuto | AnthropicToolChoiceAny | AnthropicToolChoiceTool;\nexport type AnthropicToolInputSchema = object;\nexport interface AnthropicTool {\n type?: string;\n name: string;\n description?: string;\n cache_control?: AnthropicCacheControl;\n input_schema: AnthropicToolInputSchema;\n}\nexport interface AnthropicThinkingEnabled {\n type: \"enabled\";\n budget_tokens: number;\n}\nexport interface AnthropicThinkingDisabled {\n type: \"disabled\";\n}\nexport type AnthropicThinking = AnthropicThinkingEnabled | AnthropicThinkingDisabled;\nexport interface AnthropicRequest {\n anthropic_version: string;\n messages: AnthropicMessage[];\n system?: string;\n stream?: boolean;\n max_tokens: number;\n temperature?: number;\n top_k?: number;\n top_p?: number;\n stop_sequences?: string[];\n metadata?: AnthropicMetadata;\n tool_choice?: AnthropicToolChoice;\n tools?: AnthropicTool[];\n thinking?: AnthropicThinking;\n}\nexport type AnthropicRequestSettings = Pick<AnthropicRequest, \"max_tokens\" | \"temperature\" | \"top_k\" | \"top_p\" | \"stop_sequences\" | \"stream\">;\nexport interface AnthropicContentText {\n type: \"text\";\n text: string;\n}\nexport interface AnthropicContentToolUse {\n type: \"tool_use\";\n id: string;\n name: string;\n input: object;\n}\nexport interface AnthropicContentThinking {\n type: \"thinking\";\n thinking: string;\n signature: string;\n}\nexport interface AnthropicContentRedactedThinking {\n type: \"redacted_thinking\";\n data: string;\n}\nexport type AnthropicContent = AnthropicContentText | AnthropicContentToolUse | AnthropicContentThinking | AnthropicContentRedactedThinking;\nexport interface AnthropicUsage {\n input_tokens: number;\n output_tokens: number;\n cache_creation_input_tokens: number | null;\n cache_creation_output_tokens: number | null;\n cache_read_input_tokens: number | null;\n}\nexport type AnthropicResponseData = AnthropicResponseMessage | AnthropicStreamBaseEvent;\nexport interface AnthropicResponseMessage {\n id: string;\n type: string;\n role: string;\n content: AnthropicContent[];\n model: string;\n stop_reason: string | null;\n stop_sequence: string | null;\n usage: AnthropicUsage;\n}\nexport interface AnthropicAPIConfig {\n version?: string;\n thinking?: AnthropicThinking;\n}\nexport type AnthropicStreamEventType = \"message_start\" | \"content_block_start\" | \"content_block_delta\" | \"content_block_stop\" | \"message_delta\" | \"message_stop\" | \"ping\" | \"error\";\nexport type AnthropicStreamDeltaType = \"text_delta\" | \"input_json_delta\";\nexport interface AnthropicStreamBaseEvent {\n type: AnthropicStreamEventType;\n}\nexport interface AnthropicStreamMessageStartEvent extends AnthropicStreamBaseEvent {\n type: \"message_start\";\n message: AnthropicResponseMessage;\n}\nexport interface AnthropicStreamContentBlockStartEvent extends AnthropicStreamBaseEvent {\n type: \"content_block_start\";\n index: number;\n content_block: AnthropicContent;\n}\nexport interface AnthropicStreamBaseDelta {\n type: AnthropicStreamDeltaType;\n}\nexport interface AnthropicStreamTextDelta extends AnthropicStreamBaseDelta {\n type: \"text_delta\";\n text: string;\n}\nexport interface AnthropicStreamInputJsonDelta extends AnthropicStreamBaseDelta {\n type: \"input_json_delta\";\n partial_json: string;\n}\nexport type AnthropicStreamDelta = AnthropicStreamTextDelta | AnthropicStreamInputJsonDelta;\nexport interface AnthropicStreamContentBlockDeltaEvent extends AnthropicStreamBaseEvent {\n type: \"content_block_delta\";\n index: number;\n delta: AnthropicStreamDelta;\n}\nexport interface AnthropicStreamContentBlockStopEvent extends AnthropicStreamBaseEvent {\n type: \"content_block_stop\";\n index: number;\n}\nexport interface AnthropicStreamMessageDeltaEvent extends AnthropicStreamBaseEvent {\n type: \"message_delta\";\n delta: Partial<AnthropicResponseMessage>;\n}\nexport interface AnthropicStreamMessageStopEvent extends AnthropicStreamBaseEvent {\n type: \"message_stop\";\n}\nexport interface AnthropicStreamPingEvent extends AnthropicStreamBaseEvent {\n type: \"ping\";\n}\nexport interface AnthropicStreamErrorEvent extends AnthropicStreamBaseEvent {\n type: \"error\";\n error: any;\n}\nexport {};\n//# sourceMappingURL=types-anthropic.d.ts.map"],"mappings":";UAAiBA,qBAAAA;EAAAA,IAAAA,EAAAA,WAAAA,GAAAA,MAAqB;AAErC;AAKD,UAJUC,2BAAAA,CAIkC;EAI3BE,IAAAA,EAAAA,MAAAA;EAWAC,aAAAA,CAAAA,EAjBGJ,qBAiB4B,GAAA,IAAA;AAKhD;AAgCiBM,U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AAAA,GAAsBH,0BAA0BC,yBAAyBC;KACzEE,wBAAAA;UACKC,aAAAA;;;;kBAIGpB;gBACFmB;;UAEDE,wBAAAA;;;;UAIAC,yBAAAA;;;KAGLC,iBAAAA,GAAoBF,2BAA2BC;UAC1CE,gBAAAA;;YAEHZ;;;;;;;;aAQCC;gBACGK;UACNE;aACGG;;KAEHE,wBAAAA,GAA2BC,KAAKF;UAC3BG,oBAAAA;;;;UAIAC,uBAAAA;;;;;;UAMAC,wBAAAA;;;;;UAKAC,gCAAAA;;;;KAILC,gBAAAA,GAAmBJ,uBAAuBC,0BAA0BC,2BAA2BC;UAC1FE,cAAAA;;;;;;;KAOLC,qBAAAA,GAAwBC,2BAA2BC;UAC9CD,wBAAAA;;;;WAIJH;;;;SAIFC;;UAEMI,kBAAAA;;aAEFb;;KAEHc,wBAAAA;KACAC,wBAAAA;UACKH,wBAAAA;QACPE;;UAEOE,gCAAAA,SAAyCJ;;WAE7CD;;UAEIM,qCAAAA,SAA8CL;;;iBAG5CJ;;UAEFU,wBAAAA;QACPH;;UAEOI,wBAAAA,SAAiCD;;;;UAIjCE,6BAAAA,SAAsCF;;;;KAI3CG,oBAAAA,GAAuBF,2BAA2BC;UAC7CE,qCAAAA,SAA8CV;;;SAGpDS;;UAEME,oCAAAA,SAA6CX;;;;UAI7CY,gCAAAA,SAAyCZ;;SAE/Ca,QAAQd;;UAEFe,+BAAAA,SAAwCd;;;UAGxCe,wBAAAA,SAAiCf;;;UAGjCgB,yBAAAA,SAAkChB"}
|
|
@@ -62,7 +62,6 @@ interface AnthropicMessageContentRedactedThinking extends AnthropicMessageConten
|
|
|
62
62
|
type: "redacted_thinking";
|
|
63
63
|
data: string;
|
|
64
64
|
}
|
|
65
|
-
// TODO: Define this
|
|
66
65
|
type AnthropicMessageContentToolUseInput = object;
|
|
67
66
|
interface AnthropicMessageContentToolUse extends AnthropicMessageContentBase {
|
|
68
67
|
type: "tool_use";
|
|
@@ -99,10 +98,9 @@ interface AnthropicToolChoiceTool extends AnthropicToolChoiceBase {
|
|
|
99
98
|
name: string;
|
|
100
99
|
}
|
|
101
100
|
type AnthropicToolChoice = AnthropicToolChoiceAuto | AnthropicToolChoiceAny | AnthropicToolChoiceTool;
|
|
102
|
-
// TODO: Define this
|
|
103
101
|
type AnthropicToolInputSchema = object;
|
|
104
102
|
interface AnthropicTool {
|
|
105
|
-
type?: string;
|
|
103
|
+
type?: string;
|
|
106
104
|
name: string;
|
|
107
105
|
description?: string;
|
|
108
106
|
cache_control?: AnthropicCacheControl;
|
|
@@ -221,7 +219,6 @@ interface AnthropicStreamPingEvent extends AnthropicStreamBaseEvent {
|
|
|
221
219
|
}
|
|
222
220
|
interface AnthropicStreamErrorEvent extends AnthropicStreamBaseEvent {
|
|
223
221
|
type: "error";
|
|
224
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
225
222
|
error: any;
|
|
226
223
|
}
|
|
227
224
|
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-anthropic.d.ts","names":["AnthropicCacheControl","AnthropicMessageContentBase","AnthropicMessageContentText","AnthropicMessageContentImage","AnthropicMessageContentThinking","AnthropicMessageContentDocument","AnthropicMessageContentRedactedThinking","AnthropicMessageContentToolUseInput","AnthropicMessageContentToolUse","AnthropicMessageContentToolResultContent","AnthropicMessageContentToolResult","AnthropicMessageContent","AnthropicMessage","AnthropicMetadata","AnthropicToolChoiceBase","AnthropicToolChoiceAuto","AnthropicToolChoiceAny","AnthropicToolChoiceTool","AnthropicToolChoice","AnthropicToolInputSchema","AnthropicTool","AnthropicThinkingEnabled","AnthropicThinkingDisabled","AnthropicThinking","AnthropicRequest","AnthropicRequestSettings","Pick","AnthropicContentText","AnthropicContentToolUse","AnthropicContentThinking","AnthropicContentRedactedThinking","AnthropicContent","AnthropicUsage","AnthropicResponseData","AnthropicResponseMessage","AnthropicStreamBaseEvent","AnthropicAPIConfig","AnthropicStreamEventType","AnthropicStreamDeltaType","AnthropicStreamMessageStartEvent","AnthropicStreamContentBlockStartEvent","AnthropicStreamBaseDelta","AnthropicStreamTextDelta","AnthropicStreamInputJsonDelta","AnthropicStreamDelta","AnthropicStreamContentBlockDeltaEvent","AnthropicStreamContentBlockStopEvent","AnthropicStreamMessageDeltaEvent","Partial","AnthropicStreamMessageStopEvent","AnthropicStreamPingEvent","AnthropicStreamErrorEvent"],"sources":["../src/types-anthropic.d.ts"],"sourcesContent":["export interface AnthropicCacheControl {\n type: \"ephemeral\" | string;\n}\ninterface AnthropicMessageContentBase {\n type: string;\n cache_control?: AnthropicCacheControl | null;\n}\nexport interface AnthropicMessageContentText extends AnthropicMessageContentBase {\n type: \"text\";\n text: string;\n}\nexport interface AnthropicMessageContentImage extends AnthropicMessageContentBase {\n type: \"image\";\n source: {\n type: \"base64\" | string;\n media_type?: string;\n data: string;\n } | {\n type: \"url\" | string;\n url: string;\n };\n}\nexport interface AnthropicMessageContentThinking extends AnthropicMessageContentBase {\n type: \"thinking\";\n thinking: string;\n signature: string;\n}\nexport interface AnthropicMessageContentDocument extends AnthropicMessageContentBase {\n type: \"document\";\n source: {\n type: \"base64\" | \"text\" | string;\n media_type?: \"application/pdf\" | \"text/plain\" | string;\n data: string;\n } | {\n type: \"url\" | string;\n url: string;\n } | {\n type: \"content\" | string;\n content: {\n type: \"image\" | string;\n source: {\n type: \"base64\" | string;\n data: string;\n media_type?: \"image/jpeg\" | \"image/png\" | \"image/gif\" | \"image/webp\" | string;\n } | {\n type: \"url\" | string;\n url: string;\n } | {\n type: \"text\" | string;\n text: string;\n };\n }[];\n };\n citations?: {\n enabled?: boolean;\n };\n context?: string;\n title?: string;\n}\nexport interface AnthropicMessageContentRedactedThinking extends AnthropicMessageContentBase {\n type: \"redacted_thinking\";\n data: string;\n}\nexport type AnthropicMessageContentToolUseInput = object;\nexport interface AnthropicMessageContentToolUse extends AnthropicMessageContentBase {\n type: \"tool_use\";\n id: string;\n name: string;\n input: AnthropicMessageContentToolUseInput;\n}\nexport type AnthropicMessageContentToolResultContent = AnthropicMessageContentText | AnthropicMessageContentImage;\nexport interface AnthropicMessageContentToolResult extends AnthropicMessageContentBase {\n type: \"tool_result\";\n tool_use_id: string;\n is_error?: boolean;\n content: string | AnthropicMessageContentToolResultContent[];\n}\nexport type AnthropicMessageContent = AnthropicMessageContentText | AnthropicMessageContentImage | AnthropicMessageContentToolUse | AnthropicMessageContentToolResult | AnthropicMessageContentThinking | AnthropicMessageContentRedactedThinking;\nexport interface AnthropicMessage {\n role: string;\n content: string | AnthropicMessageContent[];\n}\nexport interface AnthropicMetadata {\n user_id?: string | null;\n}\ninterface AnthropicToolChoiceBase {\n type: string;\n}\nexport interface AnthropicToolChoiceAuto extends AnthropicToolChoiceBase {\n type: \"auto\";\n}\nexport interface AnthropicToolChoiceAny extends AnthropicToolChoiceBase {\n type: \"any\";\n}\nexport interface AnthropicToolChoiceTool extends AnthropicToolChoiceBase {\n type: \"tool\";\n name: string;\n}\nexport type AnthropicToolChoice = AnthropicToolChoiceAuto | AnthropicToolChoiceAny | AnthropicToolChoiceTool;\nexport type AnthropicToolInputSchema = object;\nexport interface AnthropicTool {\n type?: string;\n name: string;\n description?: string;\n cache_control?: AnthropicCacheControl;\n input_schema: AnthropicToolInputSchema;\n}\nexport interface AnthropicThinkingEnabled {\n type: \"enabled\";\n budget_tokens: number;\n}\nexport interface AnthropicThinkingDisabled {\n type: \"disabled\";\n}\nexport type AnthropicThinking = AnthropicThinkingEnabled | AnthropicThinkingDisabled;\nexport interface AnthropicRequest {\n anthropic_version: string;\n messages: AnthropicMessage[];\n system?: string;\n stream?: boolean;\n max_tokens: number;\n temperature?: number;\n top_k?: number;\n top_p?: number;\n stop_sequences?: string[];\n metadata?: AnthropicMetadata;\n tool_choice?: AnthropicToolChoice;\n tools?: AnthropicTool[];\n thinking?: AnthropicThinking;\n}\nexport type AnthropicRequestSettings = Pick<AnthropicRequest, \"max_tokens\" | \"temperature\" | \"top_k\" | \"top_p\" | \"stop_sequences\" | \"stream\">;\nexport interface AnthropicContentText {\n type: \"text\";\n text: string;\n}\nexport interface AnthropicContentToolUse {\n type: \"tool_use\";\n id: string;\n name: string;\n input: object;\n}\nexport interface AnthropicContentThinking {\n type: \"thinking\";\n thinking: string;\n signature: string;\n}\nexport interface AnthropicContentRedactedThinking {\n type: \"redacted_thinking\";\n data: string;\n}\nexport type AnthropicContent = AnthropicContentText | AnthropicContentToolUse | AnthropicContentThinking | AnthropicContentRedactedThinking;\nexport interface AnthropicUsage {\n input_tokens: number;\n output_tokens: number;\n cache_creation_input_tokens: number | null;\n cache_creation_output_tokens: number | null;\n cache_read_input_tokens: number | null;\n}\nexport type AnthropicResponseData = AnthropicResponseMessage | AnthropicStreamBaseEvent;\nexport interface AnthropicResponseMessage {\n id: string;\n type: string;\n role: string;\n content: AnthropicContent[];\n model: string;\n stop_reason: string | null;\n stop_sequence: string | null;\n usage: AnthropicUsage;\n}\nexport interface AnthropicAPIConfig {\n version?: string;\n thinking?: AnthropicThinking;\n}\nexport type AnthropicStreamEventType = \"message_start\" | \"content_block_start\" | \"content_block_delta\" | \"content_block_stop\" | \"message_delta\" | \"message_stop\" | \"ping\" | \"error\";\nexport type AnthropicStreamDeltaType = \"text_delta\" | \"input_json_delta\";\nexport interface AnthropicStreamBaseEvent {\n type: AnthropicStreamEventType;\n}\nexport interface AnthropicStreamMessageStartEvent extends AnthropicStreamBaseEvent {\n type: \"message_start\";\n message: AnthropicResponseMessage;\n}\nexport interface AnthropicStreamContentBlockStartEvent extends AnthropicStreamBaseEvent {\n type: \"content_block_start\";\n index: number;\n content_block: AnthropicContent;\n}\nexport interface AnthropicStreamBaseDelta {\n type: AnthropicStreamDeltaType;\n}\nexport interface AnthropicStreamTextDelta extends AnthropicStreamBaseDelta {\n type: \"text_delta\";\n text: string;\n}\nexport interface AnthropicStreamInputJsonDelta extends AnthropicStreamBaseDelta {\n type: \"input_json_delta\";\n partial_json: string;\n}\nexport type AnthropicStreamDelta = AnthropicStreamTextDelta | AnthropicStreamInputJsonDelta;\nexport interface AnthropicStreamContentBlockDeltaEvent extends AnthropicStreamBaseEvent {\n type: \"content_block_delta\";\n index: number;\n delta: AnthropicStreamDelta;\n}\nexport interface AnthropicStreamContentBlockStopEvent extends AnthropicStreamBaseEvent {\n type: \"content_block_stop\";\n index: number;\n}\nexport interface AnthropicStreamMessageDeltaEvent extends AnthropicStreamBaseEvent {\n type: \"message_delta\";\n delta: Partial<AnthropicResponseMessage>;\n}\nexport interface AnthropicStreamMessageStopEvent extends AnthropicStreamBaseEvent {\n type: \"message_stop\";\n}\nexport interface AnthropicStreamPingEvent extends AnthropicStreamBaseEvent {\n type: \"ping\";\n}\nexport interface AnthropicStreamErrorEvent extends AnthropicStreamBaseEvent {\n type: \"error\";\n error: any;\n}\nexport {};\n//# sourceMappingURL=types-anthropic.d.ts.map"],"mappings":";UAAiBA,qBAAAA;EAAAA,IAAAA,EAAAA,WAAAA,GAAAA,MAAqB;AAErC;AAKD,UAJUC,2BAAAA,CAIkC;EAI3BE,IAAAA,EAAAA,MAAAA;EAWAC,aAAAA,CAAAA,EAjBGJ,qBAiB4B,GAAA,IAAA;AAKhD;AAgCiBM,UApDAJ,2BAAAA,SAAoCD,2BAoDYA,CAAAA;EAIrDM,IAAAA,EAAAA,MAAAA;EACKC,IAAAA,EAAAA,MAAAA;AAMjB;AACiBE,UA5DAP,4BAAAA,SAAqCF,2BAgEhCQ,CAAAA;EAEVE,IAAAA,EAAAA,OAAAA;EAA0BT,MAAAA,EAAAA;IAA8BC,IAAAA,EAAAA,QAAAA,GAAAA,MAAAA;IAA+BK,UAAAA,CAAAA,EAAAA,MAAAA;IAAiCE,IAAAA,EAAAA,MAAAA;EAAoCN,CAAAA,GAAAA;IAAkCE,IAAAA,EAAAA,KAAAA,GAAAA,MAAAA;IAAuC,GAAA,EAAA,MAAA;EAChOM,CAAAA;AAIjB;AAGUE,UA/DOV,+BAAAA,SAAwCH,2BA+DxB,CAAA;EAGhBc,IAAAA,EAAAA,UAAAA;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wBAAAA;KACAC,wBAAAA;UACKH,wBAAAA;QACPE;;UAEOE,gCAAAA,SAAyCJ;;WAE7CD;;UAEIM,qCAAAA,SAA8CL;;;iBAG5CJ;;UAEFU,wBAAAA;QACPH;;UAEOI,wBAAAA,SAAiCD;;;;UAIjCE,6BAAAA,SAAsCF;;;;KAI3CG,oBAAAA,GAAuBF,2BAA2BC;UAC7CE,qCAAAA,SAA8CV;;;SAGpDS;;UAEME,oCAAAA,SAA6CX;;;;UAI7CY,gCAAAA,SAAyCZ;;SAE/Ca,QAAQd;;UAEFe,+BAAAA,SAAwCd;;;UAGxCe,wBAAAA,SAAiCf;;;UAGjCgB,yBAAAA,SAAkChB"}
|
package/dist/types.d.cts
CHANGED
|
@@ -90,7 +90,7 @@ type GoogleAISafetyMethod = (typeof GoogleAISafetyMethod)[keyof typeof GoogleAIS
|
|
|
90
90
|
interface GoogleAISafetySetting {
|
|
91
91
|
category: GoogleAISafetyCategory | string;
|
|
92
92
|
threshold: GoogleAISafetyThreshold | string;
|
|
93
|
-
method?: GoogleAISafetyMethod | string;
|
|
93
|
+
method?: GoogleAISafetyMethod | string;
|
|
94
94
|
}
|
|
95
95
|
type GoogleAIResponseMimeType = "text/plain" | "application/json";
|
|
96
96
|
type GoogleAIModelModality = "TEXT" | "IMAGE" | "AUDIO" | string;
|
|
@@ -308,7 +308,6 @@ interface GoogleAIModelRequestParams extends GoogleAIModelParams {
|
|
|
308
308
|
*
|
|
309
309
|
* The tool configuration's "any" mode ("forced function calling") is supported for Gemini 1.5 Pro models only.
|
|
310
310
|
*/
|
|
311
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
312
311
|
tool_choice?: string | "auto" | "any" | "none" | Record<string, any>;
|
|
313
312
|
/**
|
|
314
313
|
* Allowed functions to call when the mode is "any".
|
|
@@ -340,18 +339,17 @@ interface GoogleAIBaseLanguageModelCallOptions extends BaseChatModelCallOptions,
|
|
|
340
339
|
*/
|
|
341
340
|
interface GoogleBaseLLMInput<AuthOptions> extends GoogleAIBaseLLMInput<AuthOptions> {}
|
|
342
341
|
interface GoogleResponse {
|
|
343
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
344
342
|
data: any;
|
|
345
343
|
}
|
|
346
344
|
interface GoogleRawResponse extends GoogleResponse {
|
|
347
345
|
data: Blob;
|
|
348
346
|
}
|
|
349
347
|
interface GeminiPartBase {
|
|
350
|
-
thought?: boolean;
|
|
348
|
+
thought?: boolean;
|
|
351
349
|
thoughtSignature?: string;
|
|
352
350
|
}
|
|
353
351
|
interface GeminiVideoMetadata {
|
|
354
|
-
fps?: number;
|
|
352
|
+
fps?: number;
|
|
355
353
|
startOffset?: string;
|
|
356
354
|
endOffset?: string;
|
|
357
355
|
}
|
|
@@ -373,14 +371,12 @@ interface GeminiPartFileData extends GeminiPartBaseFile {
|
|
|
373
371
|
fileUri: string;
|
|
374
372
|
};
|
|
375
373
|
}
|
|
376
|
-
// AI Studio only?
|
|
377
374
|
interface GeminiPartFunctionCall extends GeminiPartBase {
|
|
378
375
|
functionCall: {
|
|
379
376
|
name: string;
|
|
380
377
|
args?: object;
|
|
381
378
|
};
|
|
382
379
|
}
|
|
383
|
-
// AI Studio Only?
|
|
384
380
|
interface GeminiPartFunctionResponse extends GeminiPartBase {
|
|
385
381
|
functionResponse: {
|
|
386
382
|
name: string;
|
|
@@ -408,9 +404,9 @@ interface GeminiCitation {
|
|
|
408
404
|
publicationDate: GoogleTypeDate;
|
|
409
405
|
}
|
|
410
406
|
interface GoogleTypeDate {
|
|
411
|
-
year: number;
|
|
412
|
-
month: number;
|
|
413
|
-
day: number;
|
|
407
|
+
year: number;
|
|
408
|
+
month: number;
|
|
409
|
+
day: number;
|
|
414
410
|
}
|
|
415
411
|
interface GeminiGroundingMetadata {
|
|
416
412
|
webSearchQueries?: string[];
|
|
@@ -421,7 +417,7 @@ interface GeminiGroundingMetadata {
|
|
|
421
417
|
}
|
|
422
418
|
interface GeminiSearchEntryPoint {
|
|
423
419
|
renderedContent?: string;
|
|
424
|
-
sdkBlob?: string;
|
|
420
|
+
sdkBlob?: string;
|
|
425
421
|
}
|
|
426
422
|
interface GeminiGroundingChunk {
|
|
427
423
|
web: GeminiGroundingChunkWeb;
|
|
@@ -474,26 +470,18 @@ interface GeminiLogprobsResultCandidate {
|
|
|
474
470
|
tokenId: number;
|
|
475
471
|
logProbability: number;
|
|
476
472
|
}
|
|
477
|
-
// The "system" content appears to only be valid in the systemInstruction
|
|
478
473
|
type GeminiRole = "system" | "user" | "model" | "function";
|
|
479
474
|
interface GeminiContent {
|
|
480
475
|
parts: GeminiPart[];
|
|
481
|
-
role: GeminiRole;
|
|
476
|
+
role: GeminiRole;
|
|
482
477
|
}
|
|
483
|
-
/*
|
|
484
|
-
* If additional attributes are added here, they should also be
|
|
485
|
-
* added to the attributes below
|
|
486
|
-
*/
|
|
487
478
|
interface GeminiTool {
|
|
488
479
|
functionDeclarations?: GeminiFunctionDeclaration[];
|
|
489
|
-
googleSearchRetrieval?: GoogleSearchRetrieval;
|
|
490
|
-
googleSearch?: GoogleSearch;
|
|
480
|
+
googleSearchRetrieval?: GoogleSearchRetrieval;
|
|
481
|
+
googleSearch?: GoogleSearch;
|
|
491
482
|
urlContext?: UrlContext;
|
|
492
483
|
retrieval?: VertexAIRetrieval;
|
|
493
484
|
}
|
|
494
|
-
/*
|
|
495
|
-
* The known strings in this type should match those in GeminiSearchToolAttribuets
|
|
496
|
-
*/
|
|
497
485
|
type GoogleSearchToolSetting = boolean | "googleSearchRetrieval" | "googleSearch" | string;
|
|
498
486
|
declare const GeminiSearchToolAttributes: string[];
|
|
499
487
|
declare const GeminiToolAttributes: string[];
|
|
@@ -665,7 +653,6 @@ interface GoogleAIAPIParams {
|
|
|
665
653
|
apiName?: string;
|
|
666
654
|
apiConfig?: GoogleAIAPIConfig;
|
|
667
655
|
}
|
|
668
|
-
// Embeddings
|
|
669
656
|
/**
|
|
670
657
|
* Defines the parameters required to initialize a
|
|
671
658
|
* GoogleEmbeddings instance. It extends EmbeddingsParams and
|
|
@@ -710,7 +697,7 @@ interface AIStudioEmbeddingsRequest {
|
|
|
710
697
|
content: {
|
|
711
698
|
parts: GeminiPartText[];
|
|
712
699
|
};
|
|
713
|
-
model?: string;
|
|
700
|
+
model?: string;
|
|
714
701
|
taskType?: GoogleEmbeddingsTaskType;
|
|
715
702
|
title?: string;
|
|
716
703
|
outputDimensionality?: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":["BaseLLMParams","BaseChatModelCallOptions","BindToolsInput","BaseMessage","BaseMessageChunk","MessageContent","ChatGenerationChunk","ChatResult","EmbeddingsParams","AsyncCallerCallOptions","JsonStream","MediaManager","AnthropicResponseData","AnthropicAPIConfig","GoogleClientParams","AuthOptions","GooglePlatformType","GoogleConnectionParams","GoogleAISafetyCategory","GoogleAISafetyThreshold","GoogleAISafetyMethod","GoogleAISafetySetting","GoogleAIResponseMimeType","GoogleAIModelModality","GoogleThinkingConfig","GooglePrebuiltVoiceName","GooglePrebuiltVoiceConfig","GoogleVoiceConfig","GoogleSpeakerVoiceConfig","GoogleMultiSpeakerVoiceConfig","GoogleSpeechConfigSingle","GoogleSpeechConfigMulti","GoogleSpeechConfig","GoogleSpeechSpeakerName","GoogleSpeechVoice","GoogleSpeechVoiceLanguage","GoogleSpeechVoicesLanguage","GoogleSpeechSimplifiedLanguage","GoogleSpeechConfigSimplified","GoogleModelParams","GoogleAIModelParams","Record","GoogleAIToolType","GeminiTool","GoogleAIModelRequestParams","GoogleAIBaseLLMInput","GoogleAISafetyParams","GoogleAIAPIParams","GoogleAIBaseLanguageModelCallOptions","GoogleBaseLLMInput","GoogleResponse","GoogleRawResponse","Blob","GeminiPartBase","GeminiVideoMetadata","GeminiPartBaseFile","GeminiPartText","GeminiPartInlineData","GeminiPartFileData","GeminiPartFunctionCall","GeminiPartFunctionResponse","GeminiPart","GeminiSafetySetting","GeminiSafetyRating","GeminiCitationMetadata","GeminiCitation","GoogleTypeDate","GeminiGroundingMetadata","GeminiSearchEntryPoint","GeminiGroundingChunk","GeminiGroundingSupport","GeminiRetrievalMetadata","GeminiGroundingChunkWeb","GeminiGroundingChunkRetrievedContext","GeminiSegment","GeminiUrlRetrievalStatus","GeminiUrlRetrievalContext","GeminiUrlRetrievalMetadata","GeminiUrlMetadata","GeminiUrlContextMetadata","GeminiLogprobsResult","GeminiLogprobsTopCandidate","GeminiLogprobsResultCandidate","GeminiRole","GeminiContent","GeminiFunctionDeclaration","GoogleSearchRetrieval","GoogleSearch","UrlContext","VertexAIRetrieval","GoogleSearchToolSetting","GeminiSearchToolAttributes","GeminiToolAttributes","GeminiFunctionSchema","GeminiFunctionSchemaType","GeminiGenerationConfig","GeminiRequest","GeminiResponseCandidate","GeminiResponsePromptFeedback","ModalityEnum","ModalityTokenCount","GenerateContentResponseUsageMetadata","GenerateContentResponseData","GoogleLLMModelFamily","VertexModelFamily","GoogleLLMResponseData","GoogleLLMResponse","GoogleAISafetyHandler","GeminiJsonSchema","GeminiJsonSchemaDirty","GoogleAIAPI","Promise","GeminiAPIConfig","GoogleAIAPIConfig","BaseGoogleEmbeddingsParams","BaseGoogleEmbeddingsOptions","GoogleEmbeddingsTaskType","VertexEmbeddingsInstance","VertexEmbeddingsParameters","VertexEmbeddingsRequest","AIStudioEmbeddingsRequest","GoogleEmbeddingsRequest","VertexEmbeddingsResponsePrediction","VertexEmbeddingsResponse","AIStudioEmbeddingsResponse","GoogleEmbeddingsResponse"],"sources":["../src/types.d.ts"],"sourcesContent":["import type { BaseLLMParams } from \"@langchain/core/language_models/llms\";\nimport type { BaseChatModelCallOptions, BindToolsInput } from \"@langchain/core/language_models/chat_models\";\nimport { BaseMessage, BaseMessageChunk, MessageContent } from \"@langchain/core/messages\";\nimport { ChatGenerationChunk, ChatResult } from \"@langchain/core/outputs\";\nimport { EmbeddingsParams } from \"@langchain/core/embeddings\";\nimport { AsyncCallerCallOptions } from \"@langchain/core/utils/async_caller\";\nimport type { JsonStream } from \"./utils/stream.js\";\nimport { MediaManager } from \"./experimental/utils/media_core.js\";\nimport { AnthropicResponseData, AnthropicAPIConfig } from \"./types-anthropic.js\";\nexport * from \"./types-anthropic.js\";\n/**\n * Parameters needed to setup the client connection.\n * AuthOptions are something like GoogleAuthOptions (from google-auth-library)\n * or WebGoogleAuthOptions.\n */\nexport interface GoogleClientParams<AuthOptions> {\n authOptions?: AuthOptions;\n /** Some APIs allow an API key instead */\n apiKey?: string;\n}\n/**\n * What platform is this running on?\n * gai - Google AI Studio / MakerSuite / Generative AI platform\n * gcp - Google Cloud Platform\n */\nexport type GooglePlatformType = \"gai\" | \"gcp\";\nexport interface GoogleConnectionParams<AuthOptions> extends GoogleClientParams<AuthOptions> {\n /** Hostname for the API call (if this is running on GCP) */\n endpoint?: string;\n /** Region where the LLM is stored (if this is running on GCP) */\n location?: string;\n /** The version of the API functions. Part of the path. */\n apiVersion?: string;\n /**\n * What platform to run the service on.\n * If not specified, the class should determine this from other\n * means. Either way, the platform actually used will be in\n * the \"platform\" getter.\n */\n platformType?: GooglePlatformType;\n /**\n * For compatibility with Google's libraries, should this use Vertex?\n * The \"platformType\" parmeter takes precedence.\n */\n vertexai?: boolean;\n}\nexport declare const GoogleAISafetyCategory: {\n readonly Harassment: \"HARM_CATEGORY_HARASSMENT\";\n readonly HARASSMENT: \"HARM_CATEGORY_HARASSMENT\";\n readonly HARM_CATEGORY_HARASSMENT: \"HARM_CATEGORY_HARASSMENT\";\n readonly HateSpeech: \"HARM_CATEGORY_HATE_SPEECH\";\n readonly HATE_SPEECH: \"HARM_CATEGORY_HATE_SPEECH\";\n readonly HARM_CATEGORY_HATE_SPEECH: \"HARM_CATEGORY_HATE_SPEECH\";\n readonly SexuallyExplicit: \"HARM_CATEGORY_SEXUALLY_EXPLICIT\";\n readonly SEXUALLY_EXPLICIT: \"HARM_CATEGORY_SEXUALLY_EXPLICIT\";\n readonly HARM_CATEGORY_SEXUALLY_EXPLICIT: \"HARM_CATEGORY_SEXUALLY_EXPLICIT\";\n readonly Dangerous: \"HARM_CATEGORY_DANGEROUS\";\n readonly DANGEROUS: \"HARM_CATEGORY_DANGEROUS\";\n readonly HARM_CATEGORY_DANGEROUS: \"HARM_CATEGORY_DANGEROUS\";\n readonly CivicIntegrity: \"HARM_CATEGORY_CIVIC_INTEGRITY\";\n readonly CIVIC_INTEGRITY: \"HARM_CATEGORY_CIVIC_INTEGRITY\";\n readonly HARM_CATEGORY_CIVIC_INTEGRITY: \"HARM_CATEGORY_CIVIC_INTEGRITY\";\n};\nexport type GoogleAISafetyCategory = (typeof GoogleAISafetyCategory)[keyof typeof GoogleAISafetyCategory];\nexport declare const GoogleAISafetyThreshold: {\n readonly None: \"BLOCK_NONE\";\n readonly NONE: \"BLOCK_NONE\";\n readonly BLOCK_NONE: \"BLOCK_NONE\";\n readonly Few: \"BLOCK_ONLY_HIGH\";\n readonly FEW: \"BLOCK_ONLY_HIGH\";\n readonly BLOCK_ONLY_HIGH: \"BLOCK_ONLY_HIGH\";\n readonly Some: \"BLOCK_MEDIUM_AND_ABOVE\";\n readonly SOME: \"BLOCK_MEDIUM_AND_ABOVE\";\n readonly BLOCK_MEDIUM_AND_ABOVE: \"BLOCK_MEDIUM_AND_ABOVE\";\n readonly Most: \"BLOCK_LOW_AND_ABOVE\";\n readonly MOST: \"BLOCK_LOW_AND_ABOVE\";\n readonly BLOCK_LOW_AND_ABOVE: \"BLOCK_LOW_AND_ABOVE\";\n readonly Off: \"OFF\";\n readonly OFF: \"OFF\";\n readonly BLOCK_OFF: \"OFF\";\n};\nexport type GoogleAISafetyThreshold = (typeof GoogleAISafetyThreshold)[keyof typeof GoogleAISafetyThreshold];\nexport declare const GoogleAISafetyMethod: {\n readonly Severity: \"SEVERITY\";\n readonly Probability: \"PROBABILITY\";\n};\nexport type GoogleAISafetyMethod = (typeof GoogleAISafetyMethod)[keyof typeof GoogleAISafetyMethod];\nexport interface GoogleAISafetySetting {\n category: GoogleAISafetyCategory | string;\n threshold: GoogleAISafetyThreshold | string;\n method?: GoogleAISafetyMethod | string;\n}\nexport type GoogleAIResponseMimeType = \"text/plain\" | \"application/json\";\nexport type GoogleAIModelModality = \"TEXT\" | \"IMAGE\" | \"AUDIO\" | string;\nexport interface GoogleThinkingConfig {\n thinkingBudget?: number;\n includeThoughts?: boolean;\n}\nexport type GooglePrebuiltVoiceName = string;\nexport interface GooglePrebuiltVoiceConfig {\n voiceName: GooglePrebuiltVoiceName;\n}\nexport interface GoogleVoiceConfig {\n prebuiltVoiceConfig: GooglePrebuiltVoiceConfig;\n}\nexport interface GoogleSpeakerVoiceConfig {\n speaker: string;\n voiceConfig: GoogleVoiceConfig;\n}\nexport interface GoogleMultiSpeakerVoiceConfig {\n speakerVoiceConfigs: GoogleSpeakerVoiceConfig[];\n}\nexport interface GoogleSpeechConfigSingle {\n voiceConfig: GoogleVoiceConfig;\n languageCode?: string;\n}\nexport interface GoogleSpeechConfigMulti {\n multiSpeakerVoiceConfig: GoogleMultiSpeakerVoiceConfig;\n languageCode?: string;\n}\nexport type GoogleSpeechConfig = GoogleSpeechConfigSingle | GoogleSpeechConfigMulti;\n/**\n * A simplified version of the GoogleSpeakerVoiceConfig\n */\nexport interface GoogleSpeechSpeakerName {\n speaker: string;\n name: GooglePrebuiltVoiceName;\n}\nexport type GoogleSpeechVoice = GooglePrebuiltVoiceName | GoogleSpeechSpeakerName | GoogleSpeechSpeakerName[];\nexport interface GoogleSpeechVoiceLanguage {\n voice: GoogleSpeechVoice;\n languageCode: string;\n}\nexport interface GoogleSpeechVoicesLanguage {\n voices: GoogleSpeechVoice;\n languageCode: string;\n}\n/**\n * A simplified way to represent the voice (or voices) and language code.\n * \"voice\" and \"voices\" are semantically the same, we're not enforcing\n * that one is an array and one isn't.\n */\nexport type GoogleSpeechSimplifiedLanguage = GoogleSpeechVoiceLanguage | GoogleSpeechVoicesLanguage;\n/**\n * A simplified way to represent the voices.\n * It can either be the voice (or voices), or the voice or voices with language configuration\n */\nexport type GoogleSpeechConfigSimplified = GoogleSpeechVoice | GoogleSpeechSimplifiedLanguage;\nexport interface GoogleModelParams {\n /** Model to use */\n model?: string;\n /**\n * Model to use\n * Alias for `model`\n */\n modelName?: string;\n}\nexport interface GoogleAIModelParams extends GoogleModelParams {\n /** Sampling temperature to use */\n temperature?: number;\n /**\n * Maximum number of tokens to generate in the completion.\n * This may include reasoning tokens (for backwards compatibility).\n */\n maxOutputTokens?: number;\n /**\n * The maximum number of the output tokens that will be used\n * for the \"thinking\" or \"reasoning\" stages.\n */\n maxReasoningTokens?: number;\n /**\n * An alias for \"maxReasoningTokens\"\n */\n thinkingBudget?: number;\n /**\n * An OpenAI compatible parameter that will map to \"maxReasoningTokens\"\n */\n reasoningEffort?: \"low\" | \"medium\" | \"high\";\n /**\n * Top-p changes how the model selects tokens for output.\n *\n * Tokens are selected from most probable to least until the sum\n * of their probabilities equals the top-p value.\n *\n * For example, if tokens A, B, and C have a probability of\n * .3, .2, and .1 and the top-p value is .5, then the model will\n * select either A or B as the next token (using temperature).\n */\n topP?: number;\n /**\n * Top-k changes how the model selects tokens for output.\n *\n * A top-k of 1 means the selected token is the most probable among\n * all tokens in the model’s vocabulary (also called greedy decoding),\n * while a top-k of 3 means that the next token is selected from\n * among the 3 most probable tokens (using temperature).\n */\n topK?: number;\n /**\n * Seed used in decoding. If not set, the request uses a randomly generated seed.\n */\n seed?: number;\n /**\n * Presence penalty applied to the next token's logprobs\n * if the token has already been seen in the response.\n * This penalty is binary on/off and not dependant on the\n * number of times the token is used (after the first).\n * Use frequencyPenalty for a penalty that increases with each use.\n * A positive penalty will discourage the use of tokens that have\n * already been used in the response, increasing the vocabulary.\n * A negative penalty will encourage the use of tokens that have\n * already been used in the response, decreasing the vocabulary.\n */\n presencePenalty?: number;\n /**\n * Frequency penalty applied to the next token's logprobs,\n * multiplied by the number of times each token has been seen\n * in the respponse so far.\n * A positive penalty will discourage the use of tokens that\n * have already been used, proportional to the number of times\n * the token has been used:\n * The more a token is used, the more dificult it is for the model\n * to use that token again increasing the vocabulary of responses.\n * Caution: A _negative_ penalty will encourage the model to reuse\n * tokens proportional to the number of times the token has been used.\n * Small negative values will reduce the vocabulary of a response.\n * Larger negative values will cause the model to start repeating\n * a common token until it hits the maxOutputTokens limit.\n */\n frequencyPenalty?: number;\n stopSequences?: string[];\n safetySettings?: GoogleAISafetySetting[];\n convertSystemMessageToHumanContent?: boolean;\n /**\n * Available for `gemini-1.5-pro`.\n * The output format of the generated candidate text.\n * Supported MIME types:\n * - `text/plain`: Text output.\n * - `application/json`: JSON response in the candidates.\n *\n * @default \"text/plain\"\n */\n responseMimeType?: GoogleAIResponseMimeType;\n /**\n * Whether or not to stream.\n * @default false\n */\n streaming?: boolean;\n /**\n * Whether to return log probabilities of the output tokens or not.\n * If true, returns the log probabilities of each output token\n * returned in the content of message.\n */\n logprobs?: boolean;\n /**\n * An integer between 0 and 5 specifying the number of\n * most likely tokens to return at each token position,\n * each with an associated log probability.\n * logprobs must be set to true if this parameter is used.\n */\n topLogprobs?: number;\n /**\n * The modalities of the response.\n */\n responseModalities?: GoogleAIModelModality[];\n /**\n * Custom metadata labels to associate with the request.\n * Only supported on Vertex AI (Google Cloud Platform).\n * Labels are key-value pairs where both keys and values must be strings.\n *\n * Example:\n * ```typescript\n * {\n * labels: {\n * \"team\": \"research\",\n * \"component\": \"frontend\",\n * \"environment\": \"production\"\n * }\n * }\n * ```\n */\n labels?: Record<string, string>;\n /**\n * Speech generation configuration.\n * You can use either Google's definition of the speech configuration,\n * or a simplified version we've defined (which can be as simple\n * as the name of a pre-defined voice).\n */\n speechConfig?: GoogleSpeechConfig | GoogleSpeechConfigSimplified;\n}\nexport type GoogleAIToolType = BindToolsInput | GeminiTool;\n/**\n * The params which can be passed to the API at request time.\n */\nexport interface GoogleAIModelRequestParams extends GoogleAIModelParams {\n tools?: GoogleAIToolType[];\n /**\n * Force the model to use tools in a specific way.\n *\n * | Mode |\tDescription |\n * |----------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n * | \"auto\"\t | The default model behavior. The model decides whether to predict a function call or a natural language response. |\n * | \"any\"\t | The model must predict only function calls. To limit the model to a subset of functions, define the allowed function names in `allowed_function_names`. |\n * | \"none\"\t | The model must not predict function calls. This behavior is equivalent to a model request without any associated function declarations. |\n * | string | The string value must be one of the function names. This will force the model to predict the specified function call. |\n *\n * The tool configuration's \"any\" mode (\"forced function calling\") is supported for Gemini 1.5 Pro models only.\n */\n tool_choice?: string | \"auto\" | \"any\" | \"none\" | Record<string, any>;\n /**\n * Allowed functions to call when the mode is \"any\".\n * If empty, any one of the provided functions are called.\n */\n allowed_function_names?: string[];\n /**\n * Used to specify a previously created context cache to use with generation.\n * For Vertex, this should be of the form:\n * \"projects/PROJECT_NUMBER/locations/LOCATION/cachedContents/CACHE_ID\",\n *\n * See these guides for more information on how to use context caching:\n * https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-create\n * https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-use\n */\n cachedContent?: string;\n}\nexport interface GoogleAIBaseLLMInput<AuthOptions> extends BaseLLMParams, GoogleConnectionParams<AuthOptions>, GoogleAIModelParams, GoogleAISafetyParams, GoogleAIAPIParams {\n}\nexport interface GoogleAIBaseLanguageModelCallOptions extends BaseChatModelCallOptions, GoogleAIModelRequestParams, GoogleAISafetyParams {\n /**\n * Whether or not to include usage data, like token counts\n * in the streamed response chunks.\n * @default true\n */\n streamUsage?: boolean;\n}\n/**\n * Input to LLM class.\n */\nexport interface GoogleBaseLLMInput<AuthOptions> extends GoogleAIBaseLLMInput<AuthOptions> {\n}\nexport interface GoogleResponse {\n data: any;\n}\nexport interface GoogleRawResponse extends GoogleResponse {\n data: Blob;\n}\nexport interface GeminiPartBase {\n thought?: boolean;\n thoughtSignature?: string;\n}\nexport interface GeminiVideoMetadata {\n fps?: number;\n startOffset?: string;\n endOffset?: string;\n}\nexport interface GeminiPartBaseFile extends GeminiPartBase {\n videoMetadata?: GeminiVideoMetadata;\n}\nexport interface GeminiPartText extends GeminiPartBase {\n text: string;\n}\nexport interface GeminiPartInlineData extends GeminiPartBaseFile {\n inlineData: {\n mimeType: string;\n data: string;\n };\n}\nexport interface GeminiPartFileData extends GeminiPartBaseFile {\n fileData: {\n mimeType: string;\n fileUri: string;\n };\n}\nexport interface GeminiPartFunctionCall extends GeminiPartBase {\n functionCall: {\n name: string;\n args?: object;\n };\n}\nexport interface GeminiPartFunctionResponse extends GeminiPartBase {\n functionResponse: {\n name: string;\n response: object;\n };\n}\nexport type GeminiPart = GeminiPartText | GeminiPartInlineData | GeminiPartFileData | GeminiPartFunctionCall | GeminiPartFunctionResponse;\nexport interface GeminiSafetySetting {\n category: string;\n threshold: string;\n}\nexport type GeminiSafetyRating = {\n category: string;\n probability: string;\n} & Record<string, unknown>;\nexport interface GeminiCitationMetadata {\n citations: GeminiCitation[];\n}\nexport interface GeminiCitation {\n startIndex: number;\n endIndex: number;\n uri: string;\n title: string;\n license: string;\n publicationDate: GoogleTypeDate;\n}\nexport interface GoogleTypeDate {\n year: number;\n month: number;\n day: number;\n}\nexport interface GeminiGroundingMetadata {\n webSearchQueries?: string[];\n searchEntryPoint?: GeminiSearchEntryPoint;\n groundingChunks: GeminiGroundingChunk[];\n groundingSupports?: GeminiGroundingSupport[];\n retrievalMetadata?: GeminiRetrievalMetadata;\n}\nexport interface GeminiSearchEntryPoint {\n renderedContent?: string;\n sdkBlob?: string;\n}\nexport interface GeminiGroundingChunk {\n web: GeminiGroundingChunkWeb;\n retrievedContext: GeminiGroundingChunkRetrievedContext;\n}\nexport interface GeminiGroundingChunkWeb {\n uri: string;\n title: string;\n}\nexport interface GeminiGroundingChunkRetrievedContext {\n uri: string;\n title: string;\n text: string;\n}\nexport interface GeminiGroundingSupport {\n segment: GeminiSegment;\n groundingChunkIndices: number[];\n confidenceScores: number[];\n}\nexport interface GeminiSegment {\n partIndex: number;\n startIndex: number;\n endIndex: number;\n text: string;\n}\nexport interface GeminiRetrievalMetadata {\n googleSearchDynamicRetrievalScore: number;\n}\nexport type GeminiUrlRetrievalStatus = \"URL_RETRIEVAL_STATUS_SUCCESS\" | \"URL_RETRIEVAL_STATUS_ERROR\";\nexport interface GeminiUrlRetrievalContext {\n retrievedUrl: string;\n urlRetrievalStatus: GeminiUrlRetrievalStatus;\n}\nexport interface GeminiUrlRetrievalMetadata {\n urlRetrievalContexts: GeminiUrlRetrievalContext[];\n}\nexport type GeminiUrlMetadata = GeminiUrlRetrievalContext;\nexport interface GeminiUrlContextMetadata {\n urlMetadata: GeminiUrlMetadata[];\n}\nexport interface GeminiLogprobsResult {\n topCandidates: GeminiLogprobsTopCandidate[];\n chosenCandidates: GeminiLogprobsResultCandidate[];\n}\nexport interface GeminiLogprobsTopCandidate {\n candidates: GeminiLogprobsResultCandidate[];\n}\nexport interface GeminiLogprobsResultCandidate {\n token: string;\n tokenId: number;\n logProbability: number;\n}\nexport type GeminiRole = \"system\" | \"user\" | \"model\" | \"function\";\nexport interface GeminiContent {\n parts: GeminiPart[];\n role: GeminiRole;\n}\nexport interface GeminiTool {\n functionDeclarations?: GeminiFunctionDeclaration[];\n googleSearchRetrieval?: GoogleSearchRetrieval;\n googleSearch?: GoogleSearch;\n urlContext?: UrlContext;\n retrieval?: VertexAIRetrieval;\n}\nexport type GoogleSearchToolSetting = boolean | \"googleSearchRetrieval\" | \"googleSearch\" | string;\nexport declare const GeminiSearchToolAttributes: string[];\nexport declare const GeminiToolAttributes: string[];\nexport interface GoogleSearchRetrieval {\n dynamicRetrievalConfig?: {\n mode?: string;\n dynamicThreshold?: number;\n };\n}\nexport interface GoogleSearch {\n}\nexport interface UrlContext {\n}\nexport interface VertexAIRetrieval {\n vertexAiSearch: {\n datastore: string;\n };\n disableAttribution?: boolean;\n}\nexport interface GeminiFunctionDeclaration {\n name: string;\n description: string;\n parameters?: GeminiFunctionSchema;\n}\nexport interface GeminiFunctionSchema {\n type: GeminiFunctionSchemaType;\n format?: string;\n description?: string;\n nullable?: boolean;\n enum?: string[];\n properties?: Record<string, GeminiFunctionSchema>;\n required?: string[];\n items?: GeminiFunctionSchema;\n}\nexport type GeminiFunctionSchemaType = \"string\" | \"number\" | \"integer\" | \"boolean\" | \"array\" | \"object\";\nexport interface GeminiGenerationConfig {\n stopSequences?: string[];\n candidateCount?: number;\n maxOutputTokens?: number;\n temperature?: number;\n topP?: number;\n topK?: number;\n seed?: number;\n presencePenalty?: number;\n frequencyPenalty?: number;\n responseMimeType?: GoogleAIResponseMimeType;\n responseLogprobs?: boolean;\n logprobs?: number;\n responseModalities?: GoogleAIModelModality[];\n thinkingConfig?: GoogleThinkingConfig;\n speechConfig?: GoogleSpeechConfig;\n}\nexport interface GeminiRequest {\n contents?: GeminiContent[];\n systemInstruction?: GeminiContent;\n tools?: GeminiTool[];\n toolConfig?: {\n functionCallingConfig: {\n mode: \"auto\" | \"any\" | \"none\";\n allowedFunctionNames?: string[];\n };\n };\n safetySettings?: GeminiSafetySetting[];\n generationConfig?: GeminiGenerationConfig;\n cachedContent?: string;\n /**\n * Custom metadata labels to associate with the API call.\n */\n labels?: Record<string, string>;\n}\nexport interface GeminiResponseCandidate {\n content: {\n parts: GeminiPart[];\n role: string;\n };\n finishReason: string;\n index: number;\n tokenCount?: number;\n safetyRatings: GeminiSafetyRating[];\n citationMetadata?: GeminiCitationMetadata;\n groundingMetadata?: GeminiGroundingMetadata;\n urlRetrievalMetadata?: GeminiUrlRetrievalMetadata;\n urlContextMetadata?: GeminiUrlContextMetadata;\n avgLogprobs?: number;\n logprobsResult: GeminiLogprobsResult;\n finishMessage?: string;\n}\ninterface GeminiResponsePromptFeedback {\n blockReason?: string;\n safetyRatings: GeminiSafetyRating[];\n}\nexport type ModalityEnum = \"TEXT\" | \"IMAGE\" | \"VIDEO\" | \"AUDIO\" | \"DOCUMENT\" | string;\nexport interface ModalityTokenCount {\n modality: ModalityEnum;\n tokenCount: number;\n}\nexport interface GenerateContentResponseUsageMetadata {\n promptTokenCount: number;\n toolUsePromptTokenCount: number;\n cachedContentTokenCount: number;\n thoughtsTokenCount: number;\n candidatesTokenCount: number;\n totalTokenCount: number;\n promptTokensDetails: ModalityTokenCount[];\n toolUsePromptTokensDetails: ModalityTokenCount[];\n cacheTokensDetails: ModalityTokenCount[];\n candidatesTokensDetails: ModalityTokenCount[];\n [key: string]: unknown;\n}\nexport interface GenerateContentResponseData {\n candidates: GeminiResponseCandidate[];\n promptFeedback: GeminiResponsePromptFeedback;\n usageMetadata: GenerateContentResponseUsageMetadata;\n}\nexport type GoogleLLMModelFamily = null | \"palm\" | \"gemini\" | \"gemma\";\nexport type VertexModelFamily = GoogleLLMModelFamily | \"claude\";\nexport type GoogleLLMResponseData = JsonStream | GenerateContentResponseData | GenerateContentResponseData[];\nexport interface GoogleLLMResponse extends GoogleResponse {\n data: GoogleLLMResponseData | AnthropicResponseData;\n}\nexport interface GoogleAISafetyHandler {\n /**\n * A function that will take a response and return the, possibly modified,\n * response or throw an exception if there are safety issues.\n *\n * @throws GoogleAISafetyError\n */\n handle(response: GoogleLLMResponse): GoogleLLMResponse;\n}\nexport interface GoogleAISafetyParams {\n safetyHandler?: GoogleAISafetyHandler;\n}\nexport type GeminiJsonSchema = Record<string, unknown> & {\n properties?: Record<string, GeminiJsonSchema>;\n type: GeminiFunctionSchemaType;\n nullable?: boolean;\n};\nexport interface GeminiJsonSchemaDirty extends GeminiJsonSchema {\n items?: GeminiJsonSchemaDirty;\n properties?: Record<string, GeminiJsonSchemaDirty>;\n additionalProperties?: boolean;\n}\nexport type GoogleAIAPI = {\n messageContentToParts?: (content: MessageContent) => Promise<GeminiPart[]>;\n baseMessageToContent?: (message: BaseMessage, prevMessage: BaseMessage | undefined, useSystemInstruction: boolean) => Promise<GeminiContent[]>;\n responseToString: (response: GoogleLLMResponse) => string;\n responseToChatGeneration: (response: GoogleLLMResponse) => ChatGenerationChunk | null;\n chunkToString: (chunk: BaseMessageChunk) => string;\n responseToBaseMessage: (response: GoogleLLMResponse) => BaseMessage;\n responseToChatResult: (response: GoogleLLMResponse) => ChatResult;\n formatData: (input: unknown, parameters: GoogleAIModelRequestParams) => Promise<unknown>;\n};\nexport interface GeminiAPIConfig {\n safetyHandler?: GoogleAISafetyHandler;\n mediaManager?: MediaManager;\n useSystemInstruction?: boolean;\n /**\n * How to handle the Google Search tool, since the name (and format)\n * of the tool changes between Gemini 1.5 and Gemini 2.0.\n * true - Change based on the model version. (Default)\n * false - Do not change the tool name provided\n * string value - Use this as the attribute name for the search\n * tool, adapting any tool attributes if possible.\n * When the model is created, a \"true\" or default setting\n * will be changed to a string based on the model.\n */\n googleSearchToolAdjustment?: GoogleSearchToolSetting;\n}\nexport type GoogleAIAPIConfig = GeminiAPIConfig | AnthropicAPIConfig;\nexport interface GoogleAIAPIParams {\n apiName?: string;\n apiConfig?: GoogleAIAPIConfig;\n}\n/**\n * Defines the parameters required to initialize a\n * GoogleEmbeddings instance. It extends EmbeddingsParams and\n * GoogleConnectionParams.\n */\nexport interface BaseGoogleEmbeddingsParams<AuthOptions> extends EmbeddingsParams, GoogleConnectionParams<AuthOptions> {\n model: string;\n /**\n * Used to specify output embedding size.\n * If set, output embeddings will be truncated to the size specified.\n */\n dimensions?: number;\n /**\n * An alias for \"dimensions\"\n */\n outputDimensionality?: number;\n}\n/**\n * Defines additional options specific to the\n * GoogleEmbeddingsInstance. It extends AsyncCallerCallOptions.\n */\nexport interface BaseGoogleEmbeddingsOptions extends AsyncCallerCallOptions {\n}\nexport type GoogleEmbeddingsTaskType = \"RETRIEVAL_QUERY\" | \"RETRIEVAL_DOCUMENT\" | \"SEMANTIC_SIMILARITY\" | \"CLASSIFICATION\" | \"CLUSTERING\" | \"QUESTION_ANSWERING\" | \"FACT_VERIFICATION\" | \"CODE_RETRIEVAL_QUERY\" | string;\n/**\n * Represents an instance for generating embeddings using the Google\n * Vertex AI API. It contains the content to be embedded.\n */\nexport interface VertexEmbeddingsInstance {\n content: string;\n taskType?: GoogleEmbeddingsTaskType;\n title?: string;\n}\nexport interface VertexEmbeddingsParameters extends GoogleModelParams {\n autoTruncate?: boolean;\n outputDimensionality?: number;\n}\nexport interface VertexEmbeddingsRequest {\n instances: VertexEmbeddingsInstance[];\n parameters?: VertexEmbeddingsParameters;\n}\nexport interface AIStudioEmbeddingsRequest {\n content: {\n parts: GeminiPartText[];\n };\n model?: string;\n taskType?: GoogleEmbeddingsTaskType;\n title?: string;\n outputDimensionality?: number;\n}\nexport type GoogleEmbeddingsRequest = VertexEmbeddingsRequest | AIStudioEmbeddingsRequest;\nexport interface VertexEmbeddingsResponsePrediction {\n embeddings: {\n statistics: {\n token_count: number;\n truncated: boolean;\n };\n values: number[];\n };\n}\n/**\n * Defines the structure of the embeddings results returned by the Google\n * Vertex AI API. It extends GoogleBasePrediction and contains the\n * embeddings and their statistics.\n */\nexport interface VertexEmbeddingsResponse extends GoogleResponse {\n data: {\n predictions: VertexEmbeddingsResponsePrediction[];\n };\n}\nexport interface AIStudioEmbeddingsResponse extends GoogleResponse {\n data: {\n embedding: {\n values: number[];\n };\n };\n}\nexport type GoogleEmbeddingsResponse = VertexEmbeddingsResponse | AIStudioEmbeddingsResponse;\n//# sourceMappingURL=types.d.ts.map"],"mappings":";;;;;;;;;;;;;AAeA;AAUA;AACA;;AAamBgB,UAxBFF,kBAwBEE,CAAAA,WAAAA,CAAAA,CAAAA;EAb0CF,WAAAA,CAAAA,EAV3CC,WAU2CD;EAAkB;EAoB1DI,MAAAA,CAAAA,EAAAA,MAAAA;AAiBrB;AACA;AAiBA;AACA;AAIA;AACA;AACcA,KA/DFF,kBAAAA,GA+DEE,KAAAA,GAAAA,KAAAA;AACCC,UA/DEF,sBA+DFE,CAAAA,WAAAA,CAAAA,SA/D8CL,kBA+D9CK,CA/DiEJ,WA+DjEI,CAAAA,CAAAA;EACFC;EAAoB,QAAA,CAAA,EAAA,MAAA;EAErBE;EACAC,QAAAA,CAAAA,EAAAA,MAAAA;EACKC;EAILC,UAAAA,CAAAA,EAAAA,MAAAA;EACKC;AAGjB;AAGA;AAIA;AAGA;AA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