Table of Contents

Class Prompt

Namespace
OpenAI.Responses
Assembly
OpenAI-DotNet.dll
public sealed class Prompt
Inheritance
Prompt
Inherited Members

Constructors

Prompt(string, IReadOnlyDictionary<string, object>, string)

[JsonConstructor]
public Prompt(string id, IReadOnlyDictionary<string, object> variables = null, string version = null)

Parameters

id string
variables IReadOnlyDictionary<string, object>
version string

Properties

Id

The unique identifier of the prompt template to use.

[JsonPropertyName("id")]
public string Id { get; }

Property Value

string

Variables

Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files.

[JsonPropertyName("variables")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public IReadOnlyDictionary<string, object> Variables { get; }

Property Value

IReadOnlyDictionary<string, object>

Version

Optional version of the prompt template.

[JsonPropertyName("version")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Version { get; }

Property Value

string