@langchain/xai 0.1.0 → 1.0.0

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,52 +1,55 @@
1
+ import { ChatOpenAICompletions, OpenAIClient, OpenAICoreRequestOptions, OpenAIToolChoice } from "@langchain/openai";
2
+ import * as _langchain_core_messages0 from "@langchain/core/messages";
3
+ import { AIMessageChunk, BaseMessage } from "@langchain/core/messages";
1
4
  import { BaseLanguageModelInput, StructuredOutputMethodOptions } from "@langchain/core/language_models/base";
2
- import { BaseChatModelCallOptions, BindToolsInput, LangSmithParams, type BaseChatModelParams } from "@langchain/core/language_models/chat_models";
5
+ import { BaseChatModelCallOptions, BaseChatModelParams, BindToolsInput, LangSmithParams } from "@langchain/core/language_models/chat_models";
3
6
  import { Serialized } from "@langchain/core/load/serializable";
4
- import { AIMessageChunk, BaseMessage } from "@langchain/core/messages";
5
7
  import { Runnable } from "@langchain/core/runnables";
6
8
  import { InteropZodType } from "@langchain/core/utils/types";
7
- import { type OpenAICoreRequestOptions, type OpenAIClient, OpenAIToolChoice, ChatOpenAICompletions } from "@langchain/openai";
9
+
10
+ //#region src/chat_models.d.ts
8
11
  type ChatXAIToolType = BindToolsInput | OpenAIClient.ChatCompletionTool;
9
- export interface ChatXAICallOptions extends BaseChatModelCallOptions {
10
- headers?: Record<string, string>;
11
- tools?: ChatXAIToolType[];
12
- tool_choice?: OpenAIToolChoice | string | "auto" | "any";
12
+ interface ChatXAICallOptions extends BaseChatModelCallOptions {
13
+ headers?: Record<string, string>;
14
+ tools?: ChatXAIToolType[];
15
+ tool_choice?: OpenAIToolChoice | string | "auto" | "any";
13
16
  }
14
- export interface ChatXAIInput extends BaseChatModelParams {
15
- /**
16
- * The xAI API key to use for requests.
17
- * @default process.env.XAI_API_KEY
18
- */
19
- apiKey?: string;
20
- /**
21
- * The name of the model to use.
22
- * @default "grok-beta"
23
- */
24
- model?: string;
25
- /**
26
- * Up to 4 sequences where the API will stop generating further tokens. The
27
- * returned text will not contain the stop sequence.
28
- * Alias for `stopSequences`
29
- */
30
- stop?: Array<string>;
31
- /**
32
- * Up to 4 sequences where the API will stop generating further tokens. The
33
- * returned text will not contain the stop sequence.
34
- */
35
- stopSequences?: Array<string>;
36
- /**
37
- * Whether or not to stream responses.
38
- */
39
- streaming?: boolean;
40
- /**
41
- * The temperature to use for sampling.
42
- * @default 0.7
43
- */
44
- temperature?: number;
45
- /**
46
- * The maximum number of tokens that the model can process in a single response.
47
- * This limits ensures computational efficiency and resource management.
48
- */
49
- maxTokens?: number;
17
+ interface ChatXAIInput extends BaseChatModelParams {
18
+ /**
19
+ * The xAI API key to use for requests.
20
+ * @default process.env.XAI_API_KEY
21
+ */
22
+ apiKey?: string;
23
+ /**
24
+ * The name of the model to use.
25
+ * @default "grok-beta"
26
+ */
27
+ model?: string;
28
+ /**
29
+ * Up to 4 sequences where the API will stop generating further tokens. The
30
+ * returned text will not contain the stop sequence.
31
+ * Alias for `stopSequences`
32
+ */
33
+ stop?: Array<string>;
34
+ /**
35
+ * Up to 4 sequences where the API will stop generating further tokens. The
36
+ * returned text will not contain the stop sequence.
37
+ */
38
+ stopSequences?: Array<string>;
39
+ /**
40
+ * Whether or not to stream responses.
41
+ */
42
+ streaming?: boolean;
43
+ /**
44
+ * The temperature to use for sampling.
45
+ * @default 0.7
46
+ */
47
+ temperature?: number;
48
+ /**
49
+ * The maximum number of tokens that the model can process in a single response.
50
+ * This limits ensures computational efficiency and resource management.
51
+ */
52
+ maxTokens?: number;
50
53
  }
51
54
  /**
52
55
  * xAI chat model integration.
@@ -374,29 +377,45 @@ export interface ChatXAIInput extends BaseChatModelParams {
374
377
  *
375
378
  * <br />
376
379
  */
377
- export declare class ChatXAI extends ChatOpenAICompletions<ChatXAICallOptions> {
378
- static lc_name(): string;
379
- _llmType(): string;
380
- get lc_secrets(): {
381
- [key: string]: string;
382
- } | undefined;
383
- lc_serializable: boolean;
384
- lc_namespace: string[];
385
- constructor(fields?: Partial<ChatXAIInput>);
386
- toJSON(): Serialized;
387
- getLsParams(options: this["ParsedCallOptions"]): LangSmithParams;
388
- completionWithRetry(request: OpenAIClient.Chat.ChatCompletionCreateParamsStreaming, options?: OpenAICoreRequestOptions): Promise<AsyncIterable<OpenAIClient.Chat.Completions.ChatCompletionChunk>>;
389
- completionWithRetry(request: OpenAIClient.Chat.ChatCompletionCreateParamsNonStreaming, options?: OpenAICoreRequestOptions): Promise<OpenAIClient.Chat.Completions.ChatCompletion>;
390
- protected _convertCompletionsDeltaToBaseMessageChunk(delta: Record<string, any>, rawResponse: OpenAIClient.ChatCompletionChunk, defaultRole?: "function" | "user" | "system" | "developer" | "assistant" | "tool"): AIMessageChunk;
391
- protected _convertCompletionsMessageToBaseMessage(message: OpenAIClient.ChatCompletionMessage, rawResponse: OpenAIClient.ChatCompletion): BaseMessage;
392
- withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: InteropZodType<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;
393
- withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: InteropZodType<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {
394
- raw: BaseMessage;
395
- parsed: RunOutput;
396
- }>;
397
- withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: InteropZodType<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<boolean>): Runnable<BaseLanguageModelInput, RunOutput> | Runnable<BaseLanguageModelInput, {
398
- raw: BaseMessage;
399
- parsed: RunOutput;
400
- }>;
380
+ declare class ChatXAI extends ChatOpenAICompletions<ChatXAICallOptions> {
381
+ static lc_name(): string;
382
+ _llmType(): string;
383
+ get lc_secrets(): {
384
+ [key: string]: string;
385
+ } | undefined;
386
+ lc_serializable: boolean;
387
+ lc_namespace: string[];
388
+ constructor(fields?: Partial<ChatXAIInput>);
389
+ toJSON(): Serialized;
390
+ getLsParams(options: this["ParsedCallOptions"]): LangSmithParams;
391
+ completionWithRetry(request: OpenAIClient.Chat.ChatCompletionCreateParamsStreaming, options?: OpenAICoreRequestOptions): Promise<AsyncIterable<OpenAIClient.Chat.Completions.ChatCompletionChunk>>;
392
+ completionWithRetry(request: OpenAIClient.Chat.ChatCompletionCreateParamsNonStreaming, options?: OpenAICoreRequestOptions): Promise<OpenAIClient.Chat.Completions.ChatCompletion>;
393
+ protected _convertCompletionsDeltaToBaseMessageChunk(
394
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
395
+ delta: Record<string, any>, rawResponse: OpenAIClient.ChatCompletionChunk, defaultRole?: "function" | "user" | "system" | "developer" | "assistant" | "tool"): AIMessageChunk<_langchain_core_messages0.MessageStructure>;
396
+ protected _convertCompletionsMessageToBaseMessage(message: OpenAIClient.ChatCompletionMessage, rawResponse: OpenAIClient.ChatCompletion): BaseMessage<_langchain_core_messages0.MessageStructure, _langchain_core_messages0.MessageType>;
397
+ withStructuredOutput<
398
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
399
+ RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: InteropZodType<RunOutput>
400
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
401
+ | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;
402
+ withStructuredOutput<
403
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
404
+ RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: InteropZodType<RunOutput>
405
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
406
+ | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {
407
+ raw: BaseMessage;
408
+ parsed: RunOutput;
409
+ }>;
410
+ withStructuredOutput<
411
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
412
+ RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: InteropZodType<RunOutput>
413
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
414
+ | Record<string, any>, config?: StructuredOutputMethodOptions<boolean>): Runnable<BaseLanguageModelInput, RunOutput> | Runnable<BaseLanguageModelInput, {
415
+ raw: BaseMessage;
416
+ parsed: RunOutput;
417
+ }>;
401
418
  }
402
- export {};
419
+ //#endregion
420
+ export { ChatXAI, ChatXAICallOptions, ChatXAIInput };
421
+ //# sourceMappingURL=chat_models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat_models.d.ts","names":["BaseLanguageModelInput","StructuredOutputMethodOptions","BaseChatModelCallOptions","BindToolsInput","LangSmithParams","BaseChatModelParams","Serialized","AIMessageChunk","BaseMessage","Runnable","InteropZodType","OpenAICoreRequestOptions","OpenAIClient","OpenAIToolChoice","ChatOpenAICompletions","ChatXAIToolType","ChatCompletionTool","ChatXAICallOptions","Record","ChatXAIInput","Array","ChatXAI","Partial","Chat","ChatCompletionCreateParamsStreaming","Completions","ChatCompletionChunk","AsyncIterable","Promise","ChatCompletionCreateParamsNonStreaming","ChatCompletion","_langchain_core_messages0","MessageStructure","ChatCompletionMessage","MessageType","RunOutput"],"sources":["../src/chat_models.d.ts"],"sourcesContent":["import { BaseLanguageModelInput, StructuredOutputMethodOptions } from \"@langchain/core/language_models/base\";\nimport { BaseChatModelCallOptions, BindToolsInput, LangSmithParams, type BaseChatModelParams } from \"@langchain/core/language_models/chat_models\";\nimport { Serialized } from \"@langchain/core/load/serializable\";\nimport { AIMessageChunk, BaseMessage } from \"@langchain/core/messages\";\nimport { Runnable } from \"@langchain/core/runnables\";\nimport { InteropZodType } from \"@langchain/core/utils/types\";\nimport { type OpenAICoreRequestOptions, type OpenAIClient, OpenAIToolChoice, ChatOpenAICompletions } from \"@langchain/openai\";\ntype ChatXAIToolType = BindToolsInput | OpenAIClient.ChatCompletionTool;\nexport interface ChatXAICallOptions extends BaseChatModelCallOptions {\n headers?: Record<string, string>;\n tools?: ChatXAIToolType[];\n tool_choice?: OpenAIToolChoice | string | \"auto\" | \"any\";\n}\nexport interface ChatXAIInput extends BaseChatModelParams {\n /**\n * The xAI API key to use for requests.\n * @default process.env.XAI_API_KEY\n */\n apiKey?: string;\n /**\n * The name of the model to use.\n * @default \"grok-beta\"\n */\n model?: string;\n /**\n * Up to 4 sequences where the API will stop generating further tokens. The\n * returned text will not contain the stop sequence.\n * Alias for `stopSequences`\n */\n stop?: Array<string>;\n /**\n * Up to 4 sequences where the API will stop generating further tokens. The\n * returned text will not contain the stop sequence.\n */\n stopSequences?: Array<string>;\n /**\n * Whether or not to stream responses.\n */\n streaming?: boolean;\n /**\n * The temperature to use for sampling.\n * @default 0.7\n */\n temperature?: number;\n /**\n * The maximum number of tokens that the model can process in a single response.\n * This limits ensures computational efficiency and resource management.\n */\n maxTokens?: number;\n}\n/**\n * xAI chat model integration.\n *\n * The xAI API is compatible to the OpenAI API with some limitations.\n *\n * Setup:\n * Install `@langchain/xai` and set an environment variable named `XAI_API_KEY`.\n *\n * ```bash\n * npm install @langchain/xai\n * export XAI_API_KEY=\"your-api-key\"\n * ```\n *\n * ## [Constructor args](https://api.js.langchain.com/classes/_langchain_xai.ChatXAI.html#constructor)\n *\n * ## [Runtime args](https://api.js.langchain.com/interfaces/_langchain_xai.ChatXAICallOptions.html)\n *\n * Runtime args can be passed as the second argument to any of the base runnable methods `.invoke`. `.stream`, `.batch`, etc.\n * They can also be passed via `.withConfig`, or the second arg in `.bindTools`, like shown in the examples below:\n *\n * ```typescript\n * // When calling `.withConfig`, call options should be passed via the first argument\n * const llmWithArgsBound = llm.withConfig({\n * stop: [\"\\n\"],\n * tools: [...],\n * });\n *\n * // When calling `.bindTools`, call options should be passed via the second argument\n * const llmWithTools = llm.bindTools(\n * [...],\n * {\n * tool_choice: \"auto\",\n * }\n * );\n * ```\n *\n * ## Examples\n *\n * <details open>\n * <summary><strong>Instantiate</strong></summary>\n *\n * ```typescript\n * import { ChatXAI } from '@langchain/xai';\n *\n * const llm = new ChatXAI({\n * model: \"grok-beta\",\n * temperature: 0,\n * // other params...\n * });\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Invoking</strong></summary>\n *\n * ```typescript\n * const input = `Translate \"I love programming\" into French.`;\n *\n * // Models also accept a list of chat messages or a formatted prompt\n * const result = await llm.invoke(input);\n * console.log(result);\n * ```\n *\n * ```txt\n * AIMessage {\n * \"content\": \"The French translation of \\\"I love programming\\\" is \\\"J'aime programmer\\\". In this sentence, \\\"J'aime\\\" is the first person singular conjugation of the French verb \\\"aimer\\\" which means \\\"to love\\\", and \\\"programmer\\\" is the French infinitive for \\\"to program\\\". I hope this helps! Let me know if you have any other questions.\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {\n * \"tokenUsage\": {\n * \"completionTokens\": 82,\n * \"promptTokens\": 20,\n * \"totalTokens\": 102\n * },\n * \"finish_reason\": \"stop\"\n * },\n * \"tool_calls\": [],\n * \"invalid_tool_calls\": []\n * }\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Streaming Chunks</strong></summary>\n *\n * ```typescript\n * for await (const chunk of await llm.stream(input)) {\n * console.log(chunk);\n * }\n * ```\n *\n * ```txt\n * AIMessageChunk {\n * \"content\": \"\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {\n * \"finishReason\": null\n * },\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": []\n * }\n * AIMessageChunk {\n * \"content\": \"The\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {\n * \"finishReason\": null\n * },\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": []\n * }\n * AIMessageChunk {\n * \"content\": \" French\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {\n * \"finishReason\": null\n * },\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": []\n * }\n * AIMessageChunk {\n * \"content\": \" translation\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {\n * \"finishReason\": null\n * },\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": []\n * }\n * AIMessageChunk {\n * \"content\": \" of\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {\n * \"finishReason\": null\n * },\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": []\n * }\n * AIMessageChunk {\n * \"content\": \" \\\"\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {\n * \"finishReason\": null\n * },\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": []\n * }\n * AIMessageChunk {\n * \"content\": \"I\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {\n * \"finishReason\": null\n * },\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": []\n * }\n * AIMessageChunk {\n * \"content\": \" love\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {\n * \"finishReason\": null\n * },\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": []\n * }\n * ...\n * AIMessageChunk {\n * \"content\": \".\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {\n * \"finishReason\": null\n * },\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": []\n * }\n * AIMessageChunk {\n * \"content\": \"\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {\n * \"finishReason\": \"stop\"\n * },\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": []\n * }\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Aggregate Streamed Chunks</strong></summary>\n *\n * ```typescript\n * import { AIMessageChunk } from '@langchain/core/messages';\n * import { concat } from '@langchain/core/utils/stream';\n *\n * const stream = await llm.stream(input);\n * let full: AIMessageChunk | undefined;\n * for await (const chunk of stream) {\n * full = !full ? chunk : concat(full, chunk);\n * }\n * console.log(full);\n * ```\n *\n * ```txt\n * AIMessageChunk {\n * \"content\": \"The French translation of \\\"I love programming\\\" is \\\"J'aime programmer\\\". In this sentence, \\\"J'aime\\\" is the first person singular conjugation of the French verb \\\"aimer\\\" which means \\\"to love\\\", and \\\"programmer\\\" is the French infinitive for \\\"to program\\\". I hope this helps! Let me know if you have any other questions.\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {\n * \"finishReason\": \"stop\"\n * },\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": []\n * }\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Bind tools</strong></summary>\n *\n * ```typescript\n * import { z } from 'zod';\n *\n * const llmForToolCalling = new ChatXAI({\n * model: \"grok-beta\",\n * temperature: 0,\n * // other params...\n * });\n *\n * const GetWeather = {\n * name: \"GetWeather\",\n * description: \"Get the current weather in a given location\",\n * schema: z.object({\n * location: z.string().describe(\"The city and state, e.g. San Francisco, CA\")\n * }),\n * }\n *\n * const GetPopulation = {\n * name: \"GetPopulation\",\n * description: \"Get the current population in a given location\",\n * schema: z.object({\n * location: z.string().describe(\"The city and state, e.g. San Francisco, CA\")\n * }),\n * }\n *\n * const llmWithTools = llmForToolCalling.bindTools([GetWeather, GetPopulation]);\n * const aiMsg = await llmWithTools.invoke(\n * \"Which city is hotter today and which is bigger: LA or NY?\"\n * );\n * console.log(aiMsg.tool_calls);\n * ```\n *\n * ```txt\n * [\n * {\n * name: 'GetWeather',\n * args: { location: 'Los Angeles, CA' },\n * type: 'tool_call',\n * id: 'call_cd34'\n * },\n * {\n * name: 'GetWeather',\n * args: { location: 'New York, NY' },\n * type: 'tool_call',\n * id: 'call_68rf'\n * },\n * {\n * name: 'GetPopulation',\n * args: { location: 'Los Angeles, CA' },\n * type: 'tool_call',\n * id: 'call_f81z'\n * },\n * {\n * name: 'GetPopulation',\n * args: { location: 'New York, NY' },\n * type: 'tool_call',\n * id: 'call_8byt'\n * }\n * ]\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Structured Output</strong></summary>\n *\n * ```typescript\n * import { z } from 'zod';\n *\n * const Joke = z.object({\n * setup: z.string().describe(\"The setup of the joke\"),\n * punchline: z.string().describe(\"The punchline to the joke\"),\n * rating: z.number().optional().describe(\"How funny the joke is, from 1 to 10\")\n * }).describe('Joke to tell user.');\n *\n * const structuredLlm = llmForToolCalling.withStructuredOutput(Joke, { name: \"Joke\" });\n * const jokeResult = await structuredLlm.invoke(\"Tell me a joke about cats\");\n * console.log(jokeResult);\n * ```\n *\n * ```txt\n * {\n * setup: \"Why don't cats play poker in the wild?\",\n * punchline: 'Because there are too many cheetahs.'\n * }\n * ```\n * </details>\n *\n * <br />\n */\nexport declare class ChatXAI extends ChatOpenAICompletions<ChatXAICallOptions> {\n static lc_name(): string;\n _llmType(): string;\n get lc_secrets(): {\n [key: string]: string;\n } | undefined;\n lc_serializable: boolean;\n lc_namespace: string[];\n constructor(fields?: Partial<ChatXAIInput>);\n toJSON(): Serialized;\n getLsParams(options: this[\"ParsedCallOptions\"]): LangSmithParams;\n completionWithRetry(request: OpenAIClient.Chat.ChatCompletionCreateParamsStreaming, options?: OpenAICoreRequestOptions): Promise<AsyncIterable<OpenAIClient.Chat.Completions.ChatCompletionChunk>>;\n completionWithRetry(request: OpenAIClient.Chat.ChatCompletionCreateParamsNonStreaming, options?: OpenAICoreRequestOptions): Promise<OpenAIClient.Chat.Completions.ChatCompletion>;\n protected _convertCompletionsDeltaToBaseMessageChunk(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n delta: Record<string, any>, rawResponse: OpenAIClient.ChatCompletionChunk, defaultRole?: \"function\" | \"user\" | \"system\" | \"developer\" | \"assistant\" | \"tool\"): AIMessageChunk<import(\"@langchain/core/messages\").MessageStructure>;\n protected _convertCompletionsMessageToBaseMessage(message: OpenAIClient.ChatCompletionMessage, rawResponse: OpenAIClient.ChatCompletion): BaseMessage<import(\"@langchain/core/messages\").MessageStructure, import(\"@langchain/core/messages\").MessageType>;\n withStructuredOutput<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: InteropZodType<RunOutput>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;\n withStructuredOutput<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: InteropZodType<RunOutput>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {\n raw: BaseMessage;\n parsed: RunOutput;\n }>;\n withStructuredOutput<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: InteropZodType<RunOutput>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n | Record<string, any>, config?: StructuredOutputMethodOptions<boolean>): Runnable<BaseLanguageModelInput, RunOutput> | Runnable<BaseLanguageModelInput, {\n raw: BaseMessage;\n parsed: RunOutput;\n }>;\n}\nexport {};\n"],"mappings":";;;;;;;;;;KAOKe,eAAAA,GAAkBZ,iBAAiBS,YAAAA,CAAaI;UACpCC,kBAAAA,SAA2Bf;YAC9BgB;EAFTH,KAAAA,CAAAA,EAGOA,eAHQ,EAAA;EAAA,WAAA,CAAA,EAIFF,gBAJE,GAAA,MAAA,GAAA,MAAA,GAAA,KAAA;;AAAoBD,UAMvBO,YAAAA,SAAqBd,mBANeW,CAAAA;EAAkB;AACvE;;;EACoB,MACRD,CAAAA,EAAAA,MAAAA;EAAe;;AAFyC;AAKpE;EAA6B,KAAA,CAAA,EAAA,MAAA;EAAA;;;AAA4B;AA2WzD;EAA4B,IAAA,CAAA,EA3VjBK,KA2ViB,CAAA,MAAA,CAAA;EAAA;;;;EASJ,aAC6BhB,CAAAA,EAhWjCgB,KAgWiChB,CAAAA,MAAAA,CAAAA;EAAe;;;EACgI,SAA/DuB,CAAAA,EAAAA,OAAAA;EAAa;;;;EACkC,WAApDC,CAAAA,EAAAA,MAAAA;EAAO;;;;EAG0C,SAClHhB,CAAAA,EAAAA,MAAaqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhBlB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAArCZ,OAAAA,SAAgBP,sBAAsBG;;;;;;;;uBAQlCK,QAAQH;YACnBb;mDACuCF;+BACpBQ,YAAAA,CAAaW,IAAAA,CAAKC,+CAA+Cb,2BAA2BiB,QAAQD,cAAcf,YAAAA,CAAaW,IAAAA,CAAKE,WAAAA,CAAYC;+BAChJd,YAAAA,CAAaW,IAAAA,CAAKM,kDAAkDlB,2BAA2BiB,QAAQhB,YAAAA,CAAaW,IAAAA,CAAKE,WAAAA,CAAYK;;;SAG3JZ,kCAAkCN,YAAAA,CAAac,yGAAyGnB,eAAtFwB,yBAAAA,CAAwIC,gBAAAA;6DACtJpB,YAAAA,CAAaqB,oCAAoCrB,YAAAA,CAAakB,iBAAiBtB,YAAHuB,yBAAAA,CAAkDC,gBAAAA,EAAgBD,yBAAAA,CAAqCG,WAAAA;;;oBAG5NhB,sBAAsBA,mCAAmCR,eAAeyB;;IAEvFjB,8BAA8BjB,uCAAuCQ,SAAST,wBAAwBmC;;;oBAGvFjB,sBAAsBA,mCAAmCR,eAAeyB;;IAEvFjB,8BAA8BjB,sCAAsCQ,SAAST;SACvEQ;YACG2B;;;;oBAIMjB,sBAAsBA,mCAAmCR,eAAeyB;;IAEvFjB,8BAA8BjB,yCAAyCQ,SAAST,wBAAwBmC,aAAa1B,SAAST;SACxHQ;YACG2B"}