You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched existing ideas and did not find a similar one
I added a very descriptive title
I've clearly described the feature request and motivation for it
Feature request
Currently the createPrompt method in the LangChain JavaScript SDK only allows creating prompts by name, without any additional configuration such as model, template, etc...
It would be helpful if createPrompt accepted additional parameters to define a complete prompt in a single step.
Motivation
When working with LangSmith programmatically, it’s frustrating to only be able to create a barebones prompt by name and then have to manually update its configuration afterward—especially for the output schema, which is often generated directly from the codebase (e.g a Zod object converted to JSON Schema).
Proposal (If applicable)
import{Client}from'langsmith';constclient=newClient();awaitclient.createPrompt('extract-contact-info',{description: 'Extracts name and email from a block of text.',model: newChatOpenAI({modelName: "gpt-4o-mini"}),template: ChatPromptTemplate.fromMessages([["system","You extract structured contact info from user input."],["user","Extract name and email from this text:\n\n{input}"],]),outputSchema: {type: "object",properties: {name: {type: "string"},email: {type: "string",format: "email"}},required: ["name","email"]},});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked
Feature request
Currently the
createPrompt
method in the LangChain JavaScript SDK only allows creating prompts by name, without any additional configuration such as model, template, etc...It would be helpful if
createPrompt
accepted additional parameters to define a complete prompt in a single step.Motivation
When working with LangSmith programmatically, it’s frustrating to only be able to create a barebones prompt by name and then have to manually update its configuration afterward—especially for the output schema, which is often generated directly from the codebase (e.g a Zod object converted to JSON Schema).
Proposal (If applicable)
Beta Was this translation helpful? Give feedback.
All reactions