diff --git a/libs/langchain-aws/src/chat_models.ts b/libs/langchain-aws/src/chat_models.ts index ee0a4fcc6634..10e6f35d2afa 100644 --- a/libs/langchain-aws/src/chat_models.ts +++ b/libs/langchain-aws/src/chat_models.ts @@ -487,8 +487,8 @@ export interface ChatBedrockConverseCallOptions * rating: z.number().optional().describe("How funny the joke is, from 1 to 10") * }).describe('Joke to tell user.'); * - * const structuredLlm = llm.withStructuredOutput(Joke); - * const jokeResult = await structuredLlm.invoke("Tell me a joke about cats", { name: "Joke" }); + * const structuredLlm = llm.withStructuredOutput(Joke, { name: "Joke" }); + * const jokeResult = await structuredLlm.invoke("Tell me a joke about cats"); * console.log(jokeResult); * ``` * diff --git a/libs/langchain-openai/src/azure/chat_models.ts b/libs/langchain-openai/src/azure/chat_models.ts index 21ce1ebe4c81..e9a460e0f9f6 100644 --- a/libs/langchain-openai/src/azure/chat_models.ts +++ b/libs/langchain-openai/src/azure/chat_models.ts @@ -267,8 +267,8 @@ import { * rating: z.number().optional().describe("How funny the joke is, from 1 to 10") * }).describe('Joke to tell user.'); * - * const structuredLlm = llm.withStructuredOutput(Joke); - * const jokeResult = await structuredLlm.invoke("Tell me a joke about cats", { name: "Joke" }); + * const structuredLlm = llm.withStructuredOutput(Joke, { name: "Joke" }); + * const jokeResult = await structuredLlm.invoke("Tell me a joke about cats"); * console.log(jokeResult); * ``` * diff --git a/libs/langchain-openai/src/chat_models.ts b/libs/langchain-openai/src/chat_models.ts index 22113d5235ab..381f05aaef77 100644 --- a/libs/langchain-openai/src/chat_models.ts +++ b/libs/langchain-openai/src/chat_models.ts @@ -629,8 +629,8 @@ export interface ChatOpenAIFields * rating: z.number().optional().describe("How funny the joke is, from 1 to 10") * }).describe('Joke to tell user.'); * - * const structuredLlm = llm.withStructuredOutput(Joke); - * const jokeResult = await structuredLlm.invoke("Tell me a joke about cats", { name: "Joke" }); + * const structuredLlm = llm.withStructuredOutput(Joke, { name: "Joke" }); + * const jokeResult = await structuredLlm.invoke("Tell me a joke about cats"); * console.log(jokeResult); * ``` *