Returns Promise<
| null
| {
description?: null
| string;
id: string;
invocation_parameters:
| {
anthropic: {
max_tokens: number;
stop_sequences?: string[];
temperature?: number;
top_p?: number;
};
type: "anthropic";
}
| {
azure_openai: {
frequency_penalty?: number;
max_completion_tokens?: number;
max_tokens?: number;
presence_penalty?: number;
reasoning_effort?: "low"
| "medium"
| "high";
seed?: number;
temperature?: number;
top_p?: number;
};
type: "azure_openai";
}
| {
google: {
frequency_penalty?: number;
max_output_tokens?: number;
presence_penalty?: number;
stop_sequences?: string[];
temperature?: number;
top_k?: number;
top_p?: number;
};
type: "google";
}
| {
openai: {
frequency_penalty?: number;
max_completion_tokens?: number;
max_tokens?: number;
presence_penalty?: number;
reasoning_effort?: "low"
| "medium"
| "high";
seed?: number;
temperature?: number;
top_p?: number;
};
type: "openai";
};
model_name: string;
model_provider: "OPENAI"
| "AZURE_OPENAI"
| "ANTHROPIC"
| "GOOGLE";
response_format?:
| null
| {
json_schema: {
description?: string;
name: string;
schema?: Record<string, unknown>;
strict?: boolean;
};
type: "json_schema";
};
template: | {
messages: {
content: | string
| (
| { text: ...; type: ... }
| { tool_call: ...; tool_call_id: ...; type: ... }
| { tool_call_id: ...; tool_result: ...; type: ... }
)[];
role:
| "user"
| "assistant"
| "model"
| "ai"
| "tool"
| "system"
| "developer";
}[];
type: "chat";
}
| { template: string; type: "string" };
template_format: "MUSTACHE" | "F_STRING" | "NONE";
template_type: "STR" | "CHAT";
tools?:
| null
| {
disable_parallel_tool_calls?: boolean;
tool_choice?: | { type: "none" }
| { type: "one_or_more" }
| { function_name: string; type: "specific_function" }
| { type: "zero_or_more" };
tools: {
function: {
description?: string;
name: string;
parameters?: Record<string, unknown>;
strict?: boolean;
};
type: "function";
}[];
type: "tools";
};
},
>
The prompt version, or null if it does not exist.
Get a prompt from the Phoenix API.