Create a prompt and store it in Phoenix.
If a prompt with the same name exists, a new version of the prompt will be appended to the history.
The parameters to create a prompt, including optional metadata.
The created prompt version.
await createPrompt({ name: "my-prompt", description: "A helpful prompt", metadata: { environment: "production", team: "ai" }, version: promptVersion({ modelProvider: "OPENAI", modelName: "gpt-4", template: [{ role: "user", content: "Hello {{name}}" }] })}); Copy
await createPrompt({ name: "my-prompt", description: "A helpful prompt", metadata: { environment: "production", team: "ai" }, version: promptVersion({ modelProvider: "OPENAI", modelName: "gpt-4", template: [{ role: "user", content: "Hello {{name}}" }] })});
Create a prompt and store it in Phoenix.
If a prompt with the same name exists, a new version of the prompt will be appended to the history.