@langchain/core 1.1.5-dev-1765431816670 → 1.1.5-dev-1765433794876
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat_models.d.ts","names":["ZodType","ZodTypeV3","$ZodType","ZodTypeV4","BaseMessage","BaseMessageChunk","BaseMessageLike","AIMessageChunk","MessageOutputVersion","BasePromptValueInterface","LLMResult","ChatGenerationChunk","ChatResult","Generation","BaseLanguageModel","StructuredOutputMethodOptions","ToolDefinition","BaseLanguageModelCallOptions","BaseLanguageModelInput","BaseLanguageModelParams","CallbackManagerForLLMRun","Callbacks","RunnableConfig","BaseCache","StructuredToolInterface","StructuredToolParams","Runnable","RunnableToolLike","ToolChoice","Record","SerializedChatModel","SerializedLLM","BaseChatModelParams","BaseChatModelCallOptions","LangSmithParams","Array","BindToolsInput","BaseChatModel","RunOutput","CallOptions","OutputMessageType","Exclude","Omit","Partial","Promise","AsyncGenerator","messages","cache","llmStringKey","parsedOptions","handledOptions","SimpleChatModel"],"sources":["../../src/language_models/chat_models.d.ts"],"sourcesContent":["import type { ZodType as ZodTypeV3 } from \"zod/v3\";\nimport type { $ZodType as ZodTypeV4 } from \"zod/v4/core\";\nimport { type BaseMessage, BaseMessageChunk, type BaseMessageLike, AIMessageChunk, MessageOutputVersion } from \"../messages/index.js\";\nimport type { BasePromptValueInterface } from \"../prompt_values.js\";\nimport { LLMResult, ChatGenerationChunk, type ChatResult, type Generation } from \"../outputs.js\";\nimport { BaseLanguageModel, type StructuredOutputMethodOptions, type ToolDefinition, type BaseLanguageModelCallOptions, type BaseLanguageModelInput, type BaseLanguageModelParams } from \"./base.js\";\nimport { type CallbackManagerForLLMRun, type Callbacks } from \"../callbacks/manager.js\";\nimport type { RunnableConfig } from \"../runnables/config.js\";\nimport type { BaseCache } from \"../caches/index.js\";\nimport { StructuredToolInterface, StructuredToolParams } from \"../tools/index.js\";\nimport { Runnable, RunnableToolLike } from \"../runnables/base.js\";\nexport type ToolChoice = string | Record<string, any> | \"auto\" | \"any\";\n/**\n * Represents a serialized chat model.\n */\nexport type SerializedChatModel = {\n _model: string;\n _type: string;\n} & Record<string, any>;\n/**\n * Represents a serialized large language model.\n */\nexport type SerializedLLM = {\n _model: string;\n _type: string;\n} & Record<string, any>;\n/**\n * Represents the parameters for a base chat model.\n */\nexport type BaseChatModelParams = BaseLanguageModelParams & {\n /**\n * Whether to disable streaming.\n *\n * If streaming is bypassed, then `stream()` will defer to\n * `invoke()`.\n *\n * - If true, will always bypass streaming case.\n * - If false (default), will always use streaming case if available.\n */\n disableStreaming?: boolean;\n /**\n * Version of `AIMessage` output format to store in message content.\n *\n * `AIMessage.contentBlocks` will lazily parse the contents of `content` into a\n * standard format. This flag can be used to additionally store the standard format\n * as the message content, e.g., for serialization purposes.\n *\n * - \"v0\": provider-specific format in content (can lazily parse with `.contentBlocks`)\n * - \"v1\": standardized format in content (consistent with `.contentBlocks`)\n *\n * You can also set `LC_OUTPUT_VERSION` as an environment variable to \"v1\" to\n * enable this by default.\n *\n * @default \"v0\"\n */\n outputVersion?: MessageOutputVersion;\n};\n/**\n * Represents the call options for a base chat model.\n */\nexport type BaseChatModelCallOptions = BaseLanguageModelCallOptions & {\n /**\n * Specifies how the chat model should use tools.\n * @default undefined\n *\n * Possible values:\n * - \"auto\": The model may choose to use any of the provided tools, or none.\n * - \"any\": The model must use one of the provided tools.\n * - \"none\": The model must not use any tools.\n * - A string (not \"auto\", \"any\", or \"none\"): The name of a specific tool the model must use.\n * - An object: A custom schema specifying tool choice parameters. Specific to the provider.\n *\n * Note: Not all providers support tool_choice. An error will be thrown\n * if used with an unsupported model.\n */\n tool_choice?: ToolChoice;\n /**\n * Version of `AIMessage` output format to store in message content.\n *\n * `AIMessage.contentBlocks` will lazily parse the contents of `content` into a\n * standard format. This flag can be used to additionally store the standard format\n * as the message content, e.g., for serialization purposes.\n *\n * - \"v0\": provider-specific format in content (can lazily parse with `.contentBlocks`)\n * - \"v1\": standardized format in content (consistent with `.contentBlocks`)\n *\n * You can also set `LC_OUTPUT_VERSION` as an environment variable to \"v1\" to\n * enable this by default.\n *\n * @default \"v0\"\n */\n outputVersion?: MessageOutputVersion;\n};\nexport type LangSmithParams = {\n ls_provider?: string;\n ls_model_name?: string;\n ls_model_type: \"chat\";\n ls_temperature?: number;\n ls_max_tokens?: number;\n ls_stop?: Array<string>;\n};\nexport type BindToolsInput = StructuredToolInterface | Record<string, any> | ToolDefinition | RunnableToolLike | StructuredToolParams;\n/**\n * Base class for chat models. It extends the BaseLanguageModel class and\n * provides methods for generating chat based on input messages.\n */\nexport declare abstract class BaseChatModel<CallOptions extends BaseChatModelCallOptions = BaseChatModelCallOptions, OutputMessageType extends BaseMessageChunk = AIMessageChunk> extends BaseLanguageModel<OutputMessageType, CallOptions> {\n ParsedCallOptions: Omit<CallOptions, Exclude<keyof RunnableConfig, \"signal\" | \"timeout\" | \"maxConcurrency\">>;\n lc_namespace: string[];\n disableStreaming: boolean;\n outputVersion?: MessageOutputVersion;\n get callKeys(): string[];\n constructor(fields: BaseChatModelParams);\n _combineLLMOutput?(...llmOutputs: LLMResult[\"llmOutput\"][]): LLMResult[\"llmOutput\"];\n protected _separateRunnableConfigFromCallOptionsCompat(options?: Partial<CallOptions>): [RunnableConfig, this[\"ParsedCallOptions\"]];\n /**\n * Bind tool-like objects to this chat model.\n *\n * @param tools A list of tool definitions to bind to this chat model.\n * Can be a structured tool, an OpenAI formatted tool, or an object\n * matching the provider's specific tool schema.\n * @param kwargs Any additional parameters to bind.\n */\n bindTools?(tools: BindToolsInput[], kwargs?: Partial<CallOptions>): Runnable<BaseLanguageModelInput, OutputMessageType, CallOptions>;\n /**\n * Invokes the chat model with a single input.\n * @param input The input for the language model.\n * @param options The call options.\n * @returns A Promise that resolves to a BaseMessageChunk.\n */\n invoke(input: BaseLanguageModelInput, options?: CallOptions): Promise<OutputMessageType>;\n _streamResponseChunks(_messages: BaseMessage[], _options: this[\"ParsedCallOptions\"], _runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;\n _streamIterator(input: BaseLanguageModelInput, options?: CallOptions): AsyncGenerator<OutputMessageType>;\n getLsParams(options: this[\"ParsedCallOptions\"]): LangSmithParams;\n /** @ignore */\n _generateUncached(messages: BaseMessageLike[][], parsedOptions: this[\"ParsedCallOptions\"], handledOptions: RunnableConfig, startedRunManagers?: CallbackManagerForLLMRun[]): Promise<LLMResult>;\n _generateCached({ messages, cache, llmStringKey, parsedOptions, handledOptions }: {\n messages: BaseMessageLike[][];\n cache: BaseCache<Generation[]>;\n llmStringKey: string;\n parsedOptions: any;\n handledOptions: RunnableConfig;\n }): Promise<LLMResult & {\n missingPromptIndices: number[];\n startedRunManagers?: CallbackManagerForLLMRun[];\n }>;\n /**\n * Generates chat based on the input messages.\n * @param messages An array of arrays of BaseMessage instances.\n * @param options The call options or an array of stop sequences.\n * @param callbacks The callbacks for the language model.\n * @returns A Promise that resolves to an LLMResult.\n */\n generate(messages: BaseMessageLike[][], options?: string[] | CallOptions, callbacks?: Callbacks): Promise<LLMResult>;\n /**\n * Get the parameters used to invoke the model\n */\n invocationParams(_options?: this[\"ParsedCallOptions\"]): any;\n _modelType(): string;\n abstract _llmType(): string;\n /**\n * Generates a prompt based on the input prompt values.\n * @param promptValues An array of BasePromptValue instances.\n * @param options The call options or an array of stop sequences.\n * @param callbacks The callbacks for the language model.\n * @returns A Promise that resolves to an LLMResult.\n */\n generatePrompt(promptValues: BasePromptValueInterface[], options?: string[] | CallOptions, callbacks?: Callbacks): Promise<LLMResult>;\n abstract _generate(messages: BaseMessage[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;\n withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: ZodTypeV4<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;\n withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: ZodTypeV4<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {\n raw: BaseMessage;\n parsed: RunOutput;\n }>;\n withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: ZodTypeV3<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;\n withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: ZodTypeV3<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {\n raw: BaseMessage;\n parsed: RunOutput;\n }>;\n}\n/**\n * An abstract class that extends BaseChatModel and provides a simple\n * implementation of _generate.\n */\nexport declare abstract class SimpleChatModel<CallOptions extends BaseChatModelCallOptions = BaseChatModelCallOptions> extends BaseChatModel<CallOptions> {\n abstract _call(messages: BaseMessage[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<string>;\n _generate(messages: BaseMessage[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;\n}\n//# sourceMappingURL=chat_models.d.ts.map"],"mappings":";;;;;;;;;;;;;;;;;;KAWY4B,UAAAA,YAAsBC;;;;KAItBC,mBAAAA;;;AAJZ,CAAA,GAOID,MAPQD,CAAAA,MAAU,EAAA,GAAA,CAAA;AAItB;AAOA;AAOA;AA+BYK,KAtCAF,aAAAA,GAsCAE;EAA2BhB,MAAAA,EAAAA,MAAAA;EAerBW,KAAAA,EAAAA,MAAAA;CAgBEpB,GAlEhBqB,MAkEgBrB,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA;AAAoB;AAExC;AAQA;AAA6BgB,KAxEjBQ,mBAAAA,GAAsBb,uBAwELK,GAAAA;EAA0BK;;;;AAA8E;AAKrI;;;;EAAkKtB,gBAAAA,CAAAA,EAAAA,OAAAA;EAA0CiC;;;;;;;;;;;;;;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T,sBAAsBA,mCAAmC1B,SAAUmC,aAAaT,8BAA8Bd,sCAAsCW,SAASR;SAC3Ld;YACGkC;;yCAE2BT,sBAAsBA,mCAAmC5B,QAAUqC,aAAaT,8BAA8Bd,uCAAuCW,SAASR,wBAAwBoB;yCACtLT,sBAAsBA,mCAAmC5B,QAAUqC,aAAaT,8BAA8Bd,sCAAsCW,SAASR;SAC3Ld;YACGkC;;;;;;;uBAOca,oCAAoClB,2BAA2BA,kCAAkCI,cAAcE;2BAChHnC,gEAAgEgB,2BAA2BwB;sBAChGxC,gEAAgEgB,2BAA2BwB,QAAQhC"}
|
|
1
|
+
{"version":3,"file":"chat_models.d.ts","names":["ZodType","ZodTypeV3","$ZodType","ZodTypeV4","BaseMessage","BaseMessageChunk","BaseMessageLike","AIMessageChunk","MessageOutputVersion","BasePromptValueInterface","LLMResult","ChatGenerationChunk","ChatResult","Generation","BaseLanguageModel","StructuredOutputMethodOptions","ToolDefinition","BaseLanguageModelCallOptions","BaseLanguageModelInput","BaseLanguageModelParams","CallbackManagerForLLMRun","Callbacks","RunnableConfig","BaseCache","StructuredToolInterface","StructuredToolParams","Runnable","RunnableToolLike","ToolChoice","Record","SerializedChatModel","SerializedLLM","BaseChatModelParams","BaseChatModelCallOptions","LangSmithParams","Array","BindToolsInput","BaseChatModel","RunOutput","CallOptions","OutputMessageType","Exclude","Omit","Partial","Promise","AsyncGenerator","messages","cache","llmStringKey","parsedOptions","handledOptions","SimpleChatModel"],"sources":["../../src/language_models/chat_models.d.ts"],"sourcesContent":["import type { ZodType as ZodTypeV3 } from \"zod/v3\";\nimport type { $ZodType as ZodTypeV4 } from \"zod/v4/core\";\nimport { type BaseMessage, BaseMessageChunk, type BaseMessageLike, AIMessageChunk, MessageOutputVersion } from \"../messages/index.js\";\nimport type { BasePromptValueInterface } from \"../prompt_values.js\";\nimport { LLMResult, ChatGenerationChunk, type ChatResult, type Generation } from \"../outputs.js\";\nimport { BaseLanguageModel, type StructuredOutputMethodOptions, type ToolDefinition, type BaseLanguageModelCallOptions, type BaseLanguageModelInput, type BaseLanguageModelParams } from \"./base.js\";\nimport { type CallbackManagerForLLMRun, type Callbacks } from \"../callbacks/manager.js\";\nimport type { RunnableConfig } from \"../runnables/config.js\";\nimport type { BaseCache } from \"../caches/index.js\";\nimport { StructuredToolInterface, StructuredToolParams } from \"../tools/index.js\";\nimport { Runnable, RunnableToolLike } from \"../runnables/base.js\";\nexport type ToolChoice = string | Record<string, any> | \"auto\" | \"any\";\n/**\n * Represents a serialized chat model.\n */\nexport type SerializedChatModel = {\n _model: string;\n _type: string;\n} & Record<string, any>;\n/**\n * Represents a serialized large language model.\n */\nexport type SerializedLLM = {\n _model: string;\n _type: string;\n} & Record<string, any>;\n/**\n * Represents the parameters for a base chat model.\n */\nexport type BaseChatModelParams = BaseLanguageModelParams & {\n /**\n * Whether to disable streaming.\n *\n * If streaming is bypassed, then `stream()` will defer to\n * `invoke()`.\n *\n * - If true, will always bypass streaming case.\n * - If false (default), will always use streaming case if available.\n */\n disableStreaming?: boolean;\n /**\n * Version of `AIMessage` output format to store in message content.\n *\n * `AIMessage.contentBlocks` will lazily parse the contents of `content` into a\n * standard format. This flag can be used to additionally store the standard format\n * as the message content, e.g., for serialization purposes.\n *\n * - \"v0\": provider-specific format in content (can lazily parse with `.contentBlocks`)\n * - \"v1\": standardized format in content (consistent with `.contentBlocks`)\n *\n * You can also set `LC_OUTPUT_VERSION` as an environment variable to \"v1\" to\n * enable this by default.\n *\n * @default \"v0\"\n */\n outputVersion?: MessageOutputVersion;\n};\n/**\n * Represents the call options for a base chat model.\n */\nexport type BaseChatModelCallOptions = BaseLanguageModelCallOptions & {\n /**\n * Specifies how the chat model should use tools.\n * @default undefined\n *\n * Possible values:\n * - \"auto\": The model may choose to use any of the provided tools, or none.\n * - \"any\": The model must use one of the provided tools.\n * - \"none\": The model must not use any tools.\n * - A string (not \"auto\", \"any\", or \"none\"): The name of a specific tool the model must use.\n * - An object: A custom schema specifying tool choice parameters. Specific to the provider.\n *\n * Note: Not all providers support tool_choice. An error will be thrown\n * if used with an unsupported model.\n */\n tool_choice?: ToolChoice;\n /**\n * Version of `AIMessage` output format to store in message content.\n *\n * `AIMessage.contentBlocks` will lazily parse the contents of `content` into a\n * standard format. This flag can be used to additionally store the standard format\n * as the message content, e.g., for serialization purposes.\n *\n * - \"v0\": provider-specific format in content (can lazily parse with `.contentBlocks`)\n * - \"v1\": standardized format in content (consistent with `.contentBlocks`)\n *\n * You can also set `LC_OUTPUT_VERSION` as an environment variable to \"v1\" to\n * enable this by default.\n *\n * @default \"v0\"\n */\n outputVersion?: MessageOutputVersion;\n};\nexport type LangSmithParams = {\n ls_provider?: string;\n ls_model_name?: string;\n ls_model_type: \"chat\";\n ls_temperature?: number;\n ls_max_tokens?: number;\n ls_stop?: Array<string>;\n};\nexport type BindToolsInput = StructuredToolInterface | Record<string, any> | ToolDefinition | RunnableToolLike | StructuredToolParams;\n/**\n * Base class for chat models. It extends the BaseLanguageModel class and\n * provides methods for generating chat based on input messages.\n */\nexport declare abstract class BaseChatModel<CallOptions extends BaseChatModelCallOptions = BaseChatModelCallOptions, OutputMessageType extends BaseMessageChunk = AIMessageChunk> extends BaseLanguageModel<OutputMessageType, CallOptions> {\n ParsedCallOptions: Omit<CallOptions, Exclude<keyof RunnableConfig, \"signal\" | \"timeout\" | \"maxConcurrency\">>;\n lc_namespace: string[];\n disableStreaming: boolean;\n outputVersion?: MessageOutputVersion;\n get callKeys(): string[];\n constructor(fields: BaseChatModelParams);\n _combineLLMOutput?(...llmOutputs: LLMResult[\"llmOutput\"][]): LLMResult[\"llmOutput\"];\n protected _separateRunnableConfigFromCallOptionsCompat(options?: Partial<CallOptions>): [RunnableConfig, this[\"ParsedCallOptions\"]];\n /**\n * Bind tool-like objects to this chat model.\n *\n * @param tools A list of tool definitions to bind to this chat model.\n * Can be a structured tool, an OpenAI formatted tool, or an object\n * matching the provider's specific tool schema.\n * @param kwargs Any additional parameters to bind.\n */\n bindTools?(tools: BindToolsInput[], kwargs?: Partial<CallOptions>): Runnable<BaseLanguageModelInput, OutputMessageType, CallOptions>;\n /**\n * Invokes the chat model with a single input.\n * @param input The input for the language model.\n * @param options The call options.\n * @returns A Promise that resolves to a BaseMessageChunk.\n */\n invoke(input: BaseLanguageModelInput, options?: CallOptions): Promise<OutputMessageType>;\n _streamResponseChunks(_messages: BaseMessage[], _options: this[\"ParsedCallOptions\"], _runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;\n _streamIterator(input: BaseLanguageModelInput, options?: CallOptions): AsyncGenerator<OutputMessageType>;\n getLsParams(options: this[\"ParsedCallOptions\"]): LangSmithParams;\n /** @ignore */\n _generateUncached(messages: BaseMessageLike[][], parsedOptions: this[\"ParsedCallOptions\"], handledOptions: RunnableConfig, startedRunManagers?: CallbackManagerForLLMRun[]): Promise<LLMResult>;\n _generateCached({ messages, cache, llmStringKey, parsedOptions, handledOptions }: {\n messages: BaseMessageLike[][];\n cache: BaseCache<Generation[]>;\n llmStringKey: string;\n parsedOptions: any;\n handledOptions: RunnableConfig;\n }): Promise<LLMResult & {\n missingPromptIndices: number[];\n startedRunManagers?: CallbackManagerForLLMRun[];\n }>;\n /**\n * Generates chat based on the input messages.\n * @param messages An array of arrays of BaseMessage instances.\n * @param options The call options or an array of stop sequences.\n * @param callbacks The callbacks for the language model.\n * @returns A Promise that resolves to an LLMResult.\n */\n generate(messages: BaseMessageLike[][], options?: string[] | CallOptions, callbacks?: Callbacks): Promise<LLMResult>;\n /**\n * Get the parameters used to invoke the model\n */\n invocationParams(_options?: this[\"ParsedCallOptions\"]): any;\n _modelType(): string;\n abstract _llmType(): string;\n /**\n * Generates a prompt based on the input prompt values.\n * @param promptValues An array of BasePromptValue instances.\n * @param options The call options or an array of stop sequences.\n * @param callbacks The callbacks for the language model.\n * @returns A Promise that resolves to an LLMResult.\n */\n generatePrompt(promptValues: BasePromptValueInterface[], options?: string[] | CallOptions, callbacks?: Callbacks): Promise<LLMResult>;\n abstract _generate(messages: BaseMessage[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;\n withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: ZodTypeV4<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;\n withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: ZodTypeV4<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {\n raw: BaseMessage;\n parsed: RunOutput;\n }>;\n withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: ZodTypeV3<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;\n withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: ZodTypeV3<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {\n raw: BaseMessage;\n parsed: RunOutput;\n }>;\n}\n/**\n * An abstract class that extends BaseChatModel and provides a simple\n * implementation of _generate.\n */\nexport declare abstract class SimpleChatModel<CallOptions extends BaseChatModelCallOptions = BaseChatModelCallOptions> extends BaseChatModel<CallOptions> {\n abstract _call(messages: BaseMessage[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<string>;\n _generate(messages: BaseMessage[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;\n}\n//# sourceMappingURL=chat_models.d.ts.map"],"mappings":";;;;;;;;;;;;;;;;;;KAWY4B,UAAAA,YAAsBC;;;;KAItBC,mBAAAA;;;AAJZ,CAAA,GAOID,MAPQD,CAAAA,MAAU,EAAA,GAAA,CAAA;AAItB;AAOA;AAOA;AA+BYK,KAtCAF,aAAAA,GAsCAE;EAA2BhB,MAAAA,EAAAA,MAAAA;EAerBW,KAAAA,EAAAA,MAAAA;CAgBE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CAjCbF,SAiCaE,CAAAA;EAARgC;;AAFyB;;;;;;;;;;;+BAjB3GnC,iDAAiD8B,yBAAyBlB,YAAYuB,QAAQlC;+BAC9FN,gEAAgEgB,2BAA2BwB,QAAQhC;yCACzFiB,sBAAsBA,mCAAmC1B,SAAUmC,aAAaT,8BAA8Bd,uCAAuCW,SAASR,wBAAwBoB;yCACtLT,sBAAsBA,mCAAmC1B,SAAUmC,aAAaT,8BAA8Bd,sCAAsCW,SAASR;SAC3Ld;YACGkC;;yCAE2BT,sBAAsBA,mCAAmC5B,QAAUqC,aAAaT,8BAA8Bd,uCAAuCW,SAASR,wBAAwBoB;yCACtLT,sBAAsBA,mCAAmC5B,QAAUqC,aAAaT,8BAA8Bd,sCAAsCW,SAASR;SAC3Ld;YACGkC;;;;;;;uBAOca,oCAAoClB,2BAA2BA,kCAAkCI,cAAcE;2BAChHnC,gEAAgEgB,2BAA2BwB;sBAChGxC,gEAAgEgB,2BAA2BwB,QAAQhC"}
|
package/dist/memory.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.d.ts","names":["InputValues","Record","OutputValues","MemoryVariables","BaseMemory","Promise","getInputValue","getOutputValue","getPromptInputKey"],"sources":["../src/memory.d.ts"],"sourcesContent":["/**\n * Type alias for a record where the keys are strings and the values can\n * be any type. This is used to represent the input values for a Chain.\n */\nexport type InputValues = Record<string, any>;\n/**\n * Type alias for a record where the keys are strings and the values can\n * be any type. This is used to represent the output values from a Chain.\n */\nexport type OutputValues = Record<string, any>;\n/**\n * Type alias for a record where the keys are strings and the values can\n * be any type. This is used to represent the memory variables in a Chain.\n */\nexport type MemoryVariables = Record<string, any>;\n/**\n * Abstract base class for memory in LangChain's Chains. Memory refers to\n * the state in Chains. It can be used to store information about past\n * executions of a Chain and inject that information into the inputs of\n * future executions of the Chain.\n */\nexport declare abstract class BaseMemory {\n abstract get memoryKeys(): string[];\n /**\n * Abstract method that should take an object of input values and return a\n * Promise that resolves with an object of memory variables. The\n * implementation of this method should load the memory variables from the\n * provided input values.\n * @param values An object of input values.\n * @returns Promise that resolves with an object of memory variables.\n */\n abstract loadMemoryVariables(values: InputValues): Promise<MemoryVariables>;\n /**\n * Abstract method that should take two objects, one of input values and\n * one of output values, and return a Promise that resolves when the\n * context has been saved. The implementation of this method should save\n * the context based on the provided input and output values.\n * @param inputValues An object of input values.\n * @param outputValues An object of output values.\n * @returns Promise that resolves when the context has been saved.\n */\n abstract saveContext(inputValues: InputValues, outputValues: OutputValues): Promise<void>;\n}\n/**\n * This function is used by memory classes to select the input value\n * to use for the memory. If there is only one input value, it is used.\n * If there are multiple input values, the inputKey must be specified.\n */\nexport declare const getInputValue: (inputValues: InputValues, inputKey?: string | undefined) => any;\n/**\n * This function is used by memory classes to select the output value\n * to use for the memory. If there is only one output value, it is used.\n * If there are multiple output values, the outputKey must be specified.\n * If no outputKey is specified, an error is thrown.\n */\nexport declare const getOutputValue: (outputValues: OutputValues, outputKey?: string | undefined) => any;\n/**\n * Function used by memory classes to get the key of the prompt input,\n * excluding any keys that are memory variables or the \"stop\" key. If\n * there is not exactly one prompt input key, an error is thrown.\n */\nexport declare function getPromptInputKey(inputs: Record<string, unknown>, memoryVariables: string[]): string;\n//# sourceMappingURL=memory.d.ts.map"],"mappings":";;AAIA;AAKA;AAKA;AAO8BI,KAjBlBJ,WAAAA,GAAcC,MAiBc,CAAA,MAAA,EAAA,GAAA,CAAA;;;;;AAoByBC,KAhCrDA,YAAAA,GAAeD,MAgCsCC,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA;;AAAsB;AAOvF;AAOA;AAMwBM,KA/CZL,eAAAA,GAAkBF,MA+
|
|
1
|
+
{"version":3,"file":"memory.d.ts","names":["InputValues","Record","OutputValues","MemoryVariables","BaseMemory","Promise","getInputValue","getOutputValue","getPromptInputKey"],"sources":["../src/memory.d.ts"],"sourcesContent":["/**\n * Type alias for a record where the keys are strings and the values can\n * be any type. This is used to represent the input values for a Chain.\n */\nexport type InputValues = Record<string, any>;\n/**\n * Type alias for a record where the keys are strings and the values can\n * be any type. This is used to represent the output values from a Chain.\n */\nexport type OutputValues = Record<string, any>;\n/**\n * Type alias for a record where the keys are strings and the values can\n * be any type. This is used to represent the memory variables in a Chain.\n */\nexport type MemoryVariables = Record<string, any>;\n/**\n * Abstract base class for memory in LangChain's Chains. Memory refers to\n * the state in Chains. It can be used to store information about past\n * executions of a Chain and inject that information into the inputs of\n * future executions of the Chain.\n */\nexport declare abstract class BaseMemory {\n abstract get memoryKeys(): string[];\n /**\n * Abstract method that should take an object of input values and return a\n * Promise that resolves with an object of memory variables. The\n * implementation of this method should load the memory variables from the\n * provided input values.\n * @param values An object of input values.\n * @returns Promise that resolves with an object of memory variables.\n */\n abstract loadMemoryVariables(values: InputValues): Promise<MemoryVariables>;\n /**\n * Abstract method that should take two objects, one of input values and\n * one of output values, and return a Promise that resolves when the\n * context has been saved. The implementation of this method should save\n * the context based on the provided input and output values.\n * @param inputValues An object of input values.\n * @param outputValues An object of output values.\n * @returns Promise that resolves when the context has been saved.\n */\n abstract saveContext(inputValues: InputValues, outputValues: OutputValues): Promise<void>;\n}\n/**\n * This function is used by memory classes to select the input value\n * to use for the memory. If there is only one input value, it is used.\n * If there are multiple input values, the inputKey must be specified.\n */\nexport declare const getInputValue: (inputValues: InputValues, inputKey?: string | undefined) => any;\n/**\n * This function is used by memory classes to select the output value\n * to use for the memory. If there is only one output value, it is used.\n * If there are multiple output values, the outputKey must be specified.\n * If no outputKey is specified, an error is thrown.\n */\nexport declare const getOutputValue: (outputValues: OutputValues, outputKey?: string | undefined) => any;\n/**\n * Function used by memory classes to get the key of the prompt input,\n * excluding any keys that are memory variables or the \"stop\" key. If\n * there is not exactly one prompt input key, an error is thrown.\n */\nexport declare function getPromptInputKey(inputs: Record<string, unknown>, memoryVariables: string[]): string;\n//# sourceMappingURL=memory.d.ts.map"],"mappings":";;AAIA;AAKA;AAKA;AAO8BI,KAjBlBJ,WAAAA,GAAcC,MAiBc,CAAA,MAAA,EAAA,GAAA,CAAA;;;;;AAoByBC,KAhCrDA,YAAAA,GAAeD,MAgCsCC,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA;;AAAsB;AAOvF;AAOA;AAMwBM,KA/CZL,eAAAA,GAAkBF,MA+CW,CAASA,MAAM,EAAA,GAAA,CAAA;;;;;;;uBAxC1BG,UAAAA;;;;;;;;;;uCAUWJ,cAAcK,QAAQF;;;;;;;;;;oCAUzBH,2BAA2BE,eAAeG;;;;;;;cAO3DC,6BAA6BN;;;;;;;cAO7BO,+BAA+BL;;;;;;iBAM5BM,iBAAAA,SAA0BP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracer_langchain.d.cts","names":["LangSmithTracingClientInterface","RunTree","RunTreeConfig","BaseRun","RunCreate","RunUpdate","BaseRunUpdate","KVMap","BaseTracer","BaseCallbackHandlerInput","Run","RunCreate2","LangChainTracerFields","LangChainTracer","Promise"],"sources":["../../src/tracers/tracer_langchain.d.ts"],"sourcesContent":["import { type LangSmithTracingClientInterface } from \"langsmith\";\nimport { RunTree, type RunTreeConfig } from \"langsmith/run_trees\";\nimport { BaseRun, RunCreate, RunUpdate as BaseRunUpdate, KVMap } from \"langsmith/schemas\";\nimport { BaseTracer } from \"./base.js\";\nimport { BaseCallbackHandlerInput } from \"../callbacks/base.js\";\nexport interface Run extends BaseRun {\n id: string;\n child_runs: this[];\n child_execution_order: number;\n dotted_order?: string;\n trace_id?: string;\n}\nexport interface RunCreate2 extends RunCreate {\n trace_id?: string;\n dotted_order?: string;\n}\nexport interface RunUpdate extends BaseRunUpdate {\n events: BaseRun[\"events\"];\n inputs: KVMap;\n trace_id?: string;\n dotted_order?: string;\n}\nexport interface LangChainTracerFields extends BaseCallbackHandlerInput {\n exampleId?: string;\n projectName?: string;\n client?: LangSmithTracingClientInterface;\n replicas?: RunTreeConfig[\"replicas\"];\n}\nexport declare class LangChainTracer extends BaseTracer implements LangChainTracerFields {\n name: string;\n projectName?: string;\n exampleId?: string;\n client: LangSmithTracingClientInterface;\n replicas?: RunTreeConfig[\"replicas\"];\n usesRunTreeMap: boolean;\n constructor(fields?: LangChainTracerFields);\n protected persistRun(_run: Run): Promise<void>;\n onRunCreate(run: Run): Promise<void>;\n onRunUpdate(run: Run): Promise<void>;\n getRun(id: string): Run | undefined;\n updateFromRunTree(runTree: RunTree): void;\n getRunTreeWithTracingConfig(id: string): RunTree | undefined;\n static getTraceableRunTree(): RunTree | undefined;\n}\n//# sourceMappingURL=tracer_langchain.d.ts.map"],"mappings":";;;;;;;UAKiBU,GAAAA,SAAYP;;EAAZO,UAAG,EAAA,IAAA,
|
|
1
|
+
{"version":3,"file":"tracer_langchain.d.cts","names":["LangSmithTracingClientInterface","RunTree","RunTreeConfig","BaseRun","RunCreate","RunUpdate","BaseRunUpdate","KVMap","BaseTracer","BaseCallbackHandlerInput","Run","RunCreate2","LangChainTracerFields","LangChainTracer","Promise"],"sources":["../../src/tracers/tracer_langchain.d.ts"],"sourcesContent":["import { type LangSmithTracingClientInterface } from \"langsmith\";\nimport { RunTree, type RunTreeConfig } from \"langsmith/run_trees\";\nimport { BaseRun, RunCreate, RunUpdate as BaseRunUpdate, KVMap } from \"langsmith/schemas\";\nimport { BaseTracer } from \"./base.js\";\nimport { BaseCallbackHandlerInput } from \"../callbacks/base.js\";\nexport interface Run extends BaseRun {\n id: string;\n child_runs: this[];\n child_execution_order: number;\n dotted_order?: string;\n trace_id?: string;\n}\nexport interface RunCreate2 extends RunCreate {\n trace_id?: string;\n dotted_order?: string;\n}\nexport interface RunUpdate extends BaseRunUpdate {\n events: BaseRun[\"events\"];\n inputs: KVMap;\n trace_id?: string;\n dotted_order?: string;\n}\nexport interface LangChainTracerFields extends BaseCallbackHandlerInput {\n exampleId?: string;\n projectName?: string;\n client?: LangSmithTracingClientInterface;\n replicas?: RunTreeConfig[\"replicas\"];\n}\nexport declare class LangChainTracer extends BaseTracer implements LangChainTracerFields {\n name: string;\n projectName?: string;\n exampleId?: string;\n client: LangSmithTracingClientInterface;\n replicas?: RunTreeConfig[\"replicas\"];\n usesRunTreeMap: boolean;\n constructor(fields?: LangChainTracerFields);\n protected persistRun(_run: Run): Promise<void>;\n onRunCreate(run: Run): Promise<void>;\n onRunUpdate(run: Run): Promise<void>;\n getRun(id: string): Run | undefined;\n updateFromRunTree(runTree: RunTree): void;\n getRunTreeWithTracingConfig(id: string): RunTree | undefined;\n static getTraceableRunTree(): RunTree | undefined;\n}\n//# sourceMappingURL=tracer_langchain.d.ts.map"],"mappings":";;;;;;;UAKiBU,GAAAA,SAAYP;;EAAZO,UAAG,EAAA,IAAA,EAAA;EAOHC,qBAAU,EAAA,MAASP;EAInBC,YAAS,CAAA,EAAA,MAAA;EACdF,QAAAA,CAAAA,EAAAA,MAAAA;;AADuBG,UAJlBK,UAAAA,SAAmBP,SAIDE,CAAAA;EAAa,QAAA,CAAA,EAAA,MAAA;EAM/BM,YAAAA,CAAAA,EAAAA,MAAAA;;AAIFV,UAVEG,SAAAA,SAAkBC,WAUpBJ,CAAAA;EAJgCO,MAAAA,EALnCN,OAKmCM,CAAAA,QAAAA,CAAAA;EAAwB,MAAA,EAJ3DF,KAI2D;EAMlDM,QAAAA,CAAAA,EAAAA,MAAAA;EAITb,YAAAA,CAAAA,EAAAA,MAAAA;;AAGaY,UAbRA,qBAAAA,SAA8BH,wBAatBG,CAAAA;EACMF,SAAAA,CAAAA,EAAAA,MAAAA;EAAMI,WAAAA,CAAAA,EAAAA,MAAAA;EAChBJ,MAAAA,CAAAA,EAZRV,+BAYQU;EAAMI,QAAAA,CAAAA,EAXZZ,aAWYY,CAAAA,UAAAA,CAAAA;;AACAA,cAVND,eAAAA,SAAwBL,UAAAA,YAAsBI,qBAUxCE,CAAAA;EACHJ,IAAAA,EAAAA,MAAAA;EACOT,WAAAA,CAAAA,EAAAA,MAAAA;EACcA,SAAAA,CAAAA,EAAAA,MAAAA;EACXA,MAAAA,EAVtBD,+BAUsBC;EAdWO,QAAAA,CAAAA,EAK9BN,aAL8BM,CAAAA,UAAAA,CAAAA;EAAsBI,cAAAA,EAAAA,OAAAA;EAAqB,WAAA,CAAA,MAAA,CAAA,EAO/DA,qBAP+D;6BAQzDF,MAAMI;mBAChBJ,MAAMI;mBACNJ,MAAMI;sBACHJ;6BACOT;2CACcA;gCACXA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.cts","names":["IterableReadableStreamInterface","IterableReadableStream","T","ReadableStreamDefaultReader","IteratorResult","Promise","Symbol","asyncIterator","asyncDispose","ReadableStream","AsyncGenerator","atee","concat","Array","Record","AsyncGeneratorWithSetup","S","TReturn","TNext","AbortSignal","PromiseLike","Error","pipeGeneratorWithSetup","A","U","UReturn","UNext","Awaited"],"sources":["../../src/utils/stream.d.ts"],"sourcesContent":["import type { IterableReadableStreamInterface } from \"../types/_internal.js\";\nexport type { IterableReadableStreamInterface };\nexport declare class IterableReadableStream<T> extends ReadableStream<T> implements IterableReadableStreamInterface<T> {\n reader: ReadableStreamDefaultReader<T>;\n ensureReader(): void;\n next(): Promise<IteratorResult<T>>;\n return(): Promise<IteratorResult<T>>;\n throw(e: any): Promise<IteratorResult<T>>;\n [Symbol.asyncIterator](): this;\n [Symbol.asyncDispose](): Promise<void>;\n static fromReadableStream<T>(stream: ReadableStream<T>): IterableReadableStream<T>;\n static fromAsyncGenerator<T>(generator: AsyncGenerator<T>): IterableReadableStream<T>;\n}\nexport declare function atee<T>(iter: AsyncGenerator<T>, length?: number): AsyncGenerator<T>[];\nexport declare function concat<T extends Array<any> | string | number | Record<string, any> | any>(first: T, second: T): T;\nexport declare class AsyncGeneratorWithSetup<S = unknown, T = unknown, TReturn = unknown, TNext = unknown> implements AsyncGenerator<T, TReturn, TNext> {\n private generator;\n setup: Promise<S>;\n config?: unknown;\n signal?: AbortSignal;\n private firstResult;\n private firstResultUsed;\n constructor(params: {\n generator: AsyncGenerator<T>;\n startSetup?: () => Promise<S>;\n config?: unknown;\n signal?: AbortSignal;\n });\n next(...args: [] | [TNext]): Promise<IteratorResult<T>>;\n return(value?: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T>>;\n throw(e: Error): Promise<IteratorResult<T>>;\n [Symbol.asyncIterator](): this;\n [Symbol.asyncDispose](): Promise<void>;\n}\nexport declare function pipeGeneratorWithSetup<S, A extends unknown[], T, TReturn, TNext, U, UReturn, UNext>(to: (g: AsyncGenerator<T, TReturn, TNext>, s: S, ...args: A) => AsyncGenerator<U, UReturn, UNext>, generator: AsyncGenerator<T, TReturn, TNext>, startSetup: () => Promise<S>, signal: AbortSignal | undefined, ...args: A): Promise<{\n output: AsyncGenerator<U, UReturn, UNext>;\n setup: Awaited<S>;\n}>;\n//# sourceMappingURL=stream.d.ts.map"],"mappings":";;;cAEqBC,kCAAkCQ,eAAeP,cAAcF,gCAAgCE;EAA/FD,MAAAA,EACTE,2BAD+BD,CACHA,
|
|
1
|
+
{"version":3,"file":"stream.d.cts","names":["IterableReadableStreamInterface","IterableReadableStream","T","ReadableStreamDefaultReader","IteratorResult","Promise","Symbol","asyncIterator","asyncDispose","ReadableStream","AsyncGenerator","atee","concat","Array","Record","AsyncGeneratorWithSetup","S","TReturn","TNext","AbortSignal","PromiseLike","Error","pipeGeneratorWithSetup","A","U","UReturn","UNext","Awaited"],"sources":["../../src/utils/stream.d.ts"],"sourcesContent":["import type { IterableReadableStreamInterface } from \"../types/_internal.js\";\nexport type { IterableReadableStreamInterface };\nexport declare class IterableReadableStream<T> extends ReadableStream<T> implements IterableReadableStreamInterface<T> {\n reader: ReadableStreamDefaultReader<T>;\n ensureReader(): void;\n next(): Promise<IteratorResult<T>>;\n return(): Promise<IteratorResult<T>>;\n throw(e: any): Promise<IteratorResult<T>>;\n [Symbol.asyncIterator](): this;\n [Symbol.asyncDispose](): Promise<void>;\n static fromReadableStream<T>(stream: ReadableStream<T>): IterableReadableStream<T>;\n static fromAsyncGenerator<T>(generator: AsyncGenerator<T>): IterableReadableStream<T>;\n}\nexport declare function atee<T>(iter: AsyncGenerator<T>, length?: number): AsyncGenerator<T>[];\nexport declare function concat<T extends Array<any> | string | number | Record<string, any> | any>(first: T, second: T): T;\nexport declare class AsyncGeneratorWithSetup<S = unknown, T = unknown, TReturn = unknown, TNext = unknown> implements AsyncGenerator<T, TReturn, TNext> {\n private generator;\n setup: Promise<S>;\n config?: unknown;\n signal?: AbortSignal;\n private firstResult;\n private firstResultUsed;\n constructor(params: {\n generator: AsyncGenerator<T>;\n startSetup?: () => Promise<S>;\n config?: unknown;\n signal?: AbortSignal;\n });\n next(...args: [] | [TNext]): Promise<IteratorResult<T>>;\n return(value?: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T>>;\n throw(e: Error): Promise<IteratorResult<T>>;\n [Symbol.asyncIterator](): this;\n [Symbol.asyncDispose](): Promise<void>;\n}\nexport declare function pipeGeneratorWithSetup<S, A extends unknown[], T, TReturn, TNext, U, UReturn, UNext>(to: (g: AsyncGenerator<T, TReturn, TNext>, s: S, ...args: A) => AsyncGenerator<U, UReturn, UNext>, generator: AsyncGenerator<T, TReturn, TNext>, startSetup: () => Promise<S>, signal: AbortSignal | undefined, ...args: A): Promise<{\n output: AsyncGenerator<U, UReturn, UNext>;\n setup: Awaited<S>;\n}>;\n//# sourceMappingURL=stream.d.ts.map"],"mappings":";;;cAEqBC,kCAAkCQ,eAAeP,cAAcF,gCAAgCE;EAA/FD,MAAAA,EACTE,2BAD+BD,CACHA,CADGA,CAAA;EAA2BA,YAAAA,CAAAA,CAAAA,EAAAA,IAAAA;EAA8CA,IAAAA,CAAAA,CAAAA,EAGxGG,OAHwGH,CAGhGE,cAHgGF,CAGjFA,CAHiFA,CAAAA,CAAAA;EAC5EA,MAAAA,CAAAA,CAAAA,EAG1BG,OAH0BH,CAGlBE,cAHkBF,CAGHA,CAHGA,CAAAA,CAAAA;EAA5BC,KAAAA,CAAAA,CAAAA,EAAAA,GAAAA,CAAAA,EAIOE,OAJPF,CAIeC,cAJfD,CAI8BD,CAJ9BC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