Skip to content

Commit 90b3703

Browse files
authored
fix(docs): correct typos in TypeScript examples in structured-output.mdx (#1358)
## Overview <!-- Brief description of what documentation is being added/updated --> ## Type of change **Type:** [Replace with: New documentation page / Update existing documentation / Fix typo/bug/link/formatting / Remove outdated content / Other] ## Related issues/PRs <!-- Link to related issues, feature PRs, or discussions (if applicable) To automatically close an issue when this PR is merged, use closing keywords: - "closes #123" or "fixes #123" or "resolves #123" For regular references without auto-closing, just use: - "#123" or "See issue #123" Examples: - closes #456 (will auto-close issue #456 when PR is merged) - See #789 for context (will reference but not auto-close issue #789) --> - GitHub issue: - Feature PR: <!-- For LangChain employees, if applicable: --> - Linear issue: - Slack thread: ## Checklist <!-- Put an 'x' in all boxes that apply --> - [x] I have read the [contributing guidelines](README.md) - [ ] I have tested my changes locally using `docs dev` - [ ] All code examples have been tested and work correctly - [ ] I have used **root relative** paths for internal links - [ ] I have updated navigation in `src/docs.json` if needed - I have gotten approval from the relevant reviewers - (Internal team members only / optional) I have created a preview deployment using the [Create Preview Branch workflow](https://github.com/langchain-ai/docs/actions/workflows/create-preview-branch.yml) ## Additional notes <!-- Any other information that would be helpful for reviewers -->
1 parent c8253f1 commit 90b3703

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/oss/langchain/structured-output.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ LangChain automatically uses `ProviderStrategy` when you pass a schema type dire
235235
messages: [{"role": "user", "content": "Extract contact info from: John Doe, john@example.com, (555) 123-4567"}]
236236
});
237237
238-
result.structuredResponse;
238+
console.log(result.structuredResponse);
239239
// { name: "John Doe", email: "john@example.com", phone: "(555) 123-4567" }
240240
```
241241

@@ -263,7 +263,7 @@ LangChain automatically uses `ProviderStrategy` when you pass a schema type dire
263263
messages: [{"role": "user", "content": "Extract contact info from: John Doe, john@example.com, (555) 123-4567"}]
264264
});
265265
266-
result.structuredResponse;
266+
console.log(result.structuredResponse);
267267
// { name: "John Doe", email: "john@example.com", phone: "(555) 123-4567" }
268268
```
269269
</CodeGroup>
@@ -586,7 +586,7 @@ function toolStrategy<StructuredResponseT>(
586586
responseFormat: toolStrategy(ProductReview)
587587
})
588588

589-
result = agent.invoke({
589+
const result = await agent.invoke({
590590
"messages": [{"role": "user", "content": "Analyze this review: 'Great product: 5 out of 5 stars. Fast shipping, but expensive'"}]
591591
})
592592

0 commit comments

Comments
 (0)