Skip to content

core[minor]: StructuredPrompt #4773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 15, 2024
Merged

core[minor]: StructuredPrompt #4773

merged 2 commits into from
Mar 15, 2024

Conversation

nfcampos
Copy link
Collaborator

Fixes # (issue)

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 15, 2024
Copy link

vercel bot commented Mar 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 15, 2024 6:00pm
langchainjs-docs ✅ Ready (Inspect) Visit Preview Mar 15, 2024 6:00pm

get lc_aliases(): Record<string, string> {
return {
...super.lc_aliases,
schema: "schema_",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a typo?

return super.pipe(coerceable.withStructuredOutput(this.schema));
} else {
throw new Error(
"Structured prompts need to be piped to a language model."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to beef up this error message

@jacoblee93
Copy link
Collaborator

Thank you!

@jacoblee93 jacoblee93 changed the title StructuredPrompt core[minor]: StructuredPrompt Mar 15, 2024
@jacoblee93 jacoblee93 merged commit 9924a4a into main Mar 15, 2024
23 checks passed
@jacoblee93 jacoblee93 deleted the nc/14mar/struct-prompt branch March 15, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:improvement Medium size change to existing code to handle new use-cases size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants