Features
Prompts
Manage and use dynamic prompts
Ultra AI’s Prompts Manager allows you to store, version control, and efficiently use predefined prompts in your AI applications.
Using Prompts
To use a predefined prompt in your API calls:
- Create a prompt in the Ultra AI dashboard
- Use the prompt’s unique identifier in your API request
Example:
import OpenAI from "openai"
const openai = new OpenAI({
apiKey: "your-ultraai-api-key",
baseURL: "https://api.ultraai.app/v1",
})
const completion = await openai.chat.completions.create({
model: JSON.stringify({
models: ["openai:gpt-4o", "anthropic:claude-3-5-sonnet-20240620"],
}),
messages: [
{
role: "user",
content: JSON.stringify({
id: "d7ead027-eda1-47e3-bab1-0036de617b84", // prompt id
variables: {
greeting: "Namaste",
},
}),
},
],
})
This approach allows for consistent and efficient prompt management across your applications.