Class Response
Assembly: Glitch9.AIDevKit.dll
Syntax
public sealed class Response : IHasId<string>, IDeletionStatus
Properties
|
Edit this page
View Source
Background
Optional. Whether to run the model response in the background.
Declaration
[JsonProperty("background")]
public bool? Background { get; set; }
Property Value
|
Edit this page
View Source
Conversation
Optional. The conversation that this response belongs to.
Input items and output items from this response are automatically added
to this conversation.
Declaration
[JsonProperty("conversation")]
public ConversationReference Conversation { get; set; }
Property Value
|
Edit this page
View Source
CreatedAt
Required. Unix timestamp (in seconds) of when this Response was created.
Declaration
[JsonProperty("created_at")]
public UnixTime CreatedAt { get; set; }
Property Value
|
Edit this page
View Source
Error
Optional. An error object returned when the model fails to generate a Response.
Declaration
[JsonProperty("error")]
public ResponseError Error { get; set; }
Property Value
|
Edit this page
View Source
Id
Required. Unique identifier for this Response.
Declaration
[JsonProperty("id")]
public string Id { get; set; }
Property Value
|
Edit this page
View Source
IncompleteDetails
Optional. Details about why the response is incomplete.
Declaration
[JsonProperty("incomplete_details")]
public IncompleteDetails IncompleteDetails { get; set; }
Property Value
|
Edit this page
View Source
Instructions
Optional. A system (or developer) message inserted into the model's context.
When using along with previous_response_id, the instructions from a previous
response will not be carried over to the next response.
Declaration
[JsonConverter(typeof(StringOrConverter<ConversationItem>))]
[JsonProperty("instructions")]
public StringOr<ConversationItem> Instructions { get; set; }
Property Value
|
Edit this page
View Source
MaxOutputTokens
Optional. An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
Declaration
[JsonProperty("max_output_tokens")]
public int? MaxOutputTokens { get; set; }
Property Value
|
Edit this page
View Source
Optional. The maximum number of total calls to built-in tools that can be processed in a response.
This maximum number applies across all built-in tool calls, not per individual tool.
Any further attempts to call a tool by the model will be ignored.
Declaration
[JsonProperty("max_tool_calls")]
public int? MaxToolCalls { get; set; }
Property Value
|
Edit this page
View Source
Optional. Set of 16 key-value pairs that can be attached to an object.
This can be useful for storing additional information about the object in a structured format,
and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters.
Values are strings with a maximum length of 512 characters.
Declaration
[JsonProperty("metadata")]
public ServerDictionary Metadata { get; set; }
Property Value
|
Edit this page
View Source
Model
Required. Model ID used to generate the response.
Declaration
[JsonProperty("model")]
public string Model { get; set; }
Property Value
|
Edit this page
View Source
Output
An array of content items generated by the model.
-
The length and order of items in the output array is dependent
on the model's response.
-
Rather than accessing the first item in the output array and assuming it's an
assistant message with the content generated by the model, you might consider
using the output_text property where supported in SDKs.
Declaration
[JsonProperty("output")]
public ConversationItem[] Output { get; set; }
Property Value
|
Edit this page
View Source
Optional. Whether to allow the model to run tool calls in parallel.
Declaration
[JsonProperty("parallel_tool_calls")]
public bool? ParallelToolCalls { get; set; }
Property Value
|
Edit this page
View Source
PreviousResponseId
Optional. Unique ID of the previous response to use for multi-turn threading.
Declaration
[JsonProperty("previous_response_id")]
public string PreviousResponseId { get; set; }
Property Value
|
Edit this page
View Source
Prompt
Optional. Reference to prompt and template used.
Declaration
[JsonProperty("prompt")]
public PromptTemplate Prompt { get; set; }
Property Value
|
Edit this page
View Source
PromptCacheKey
Optional. Cache key for prompts to assist with caching optimizations.
Declaration
[JsonProperty("prompt_cache_key")]
public string PromptCacheKey { get; set; }
Property Value
|
Edit this page
View Source
ReasoningOptions
Optional. Configuration options for reasoning models.
Declaration
[JsonProperty("reasoning")]
public ReasoningOptions ReasoningOptions { get; set; }
Property Value
|
Edit this page
View Source
SafetyIdentifier
Optional. Identifier for monitoring policy or abuse detection.
Declaration
[JsonProperty("safety_identifier")]
public SafetyIdentifier SafetyIdentifier { get; set; }
Property Value
|
Edit this page
View Source
ServiceTier
Optional. Processing tier used?遊엞to, default, flex, or priority.
Declaration
[JsonProperty("service_tier")]
public ServiceTier? ServiceTier { get; set; }
Property Value
|
Edit this page
View Source
Status
Required. Status of the response generation.
Declaration
[JsonProperty("status")]
public ResponseStatus Status { get; set; }
Property Value
|
Edit this page
View Source
Temperature
Optional. Sampling temperature, between 0 and 2.
Declaration
[JsonProperty("temperature")]
public Temperature Temperature { get; set; }
Property Value
|
Edit this page
View Source
TextResponseOptions
Optional. Configuration options for a text response from the model.
Declaration
[JsonProperty("text")]
public TextResponseOptions TextResponseOptions { get; set; }
Property Value
|
Edit this page
View Source
Optional. How the model should select which tool (or tools) to use when generating a response.
Declaration
[JsonConverter(typeof(ResponseToolChoiceConverter))]
[JsonProperty("tool_choice")]
public ToolChoice ToolChoice { get; set; }
Property Value
|
Edit this page
View Source
Optional. An array of tools the model may call while generating a response.
Declaration
[JsonProperty("tools")]
public List<Tool> Tools { get; set; }
Property Value
|
Edit this page
View Source
TopLogprobs
Optional. An integer between 0 and 20 specifying the number of most likely tokens to return.
Declaration
[JsonProperty("top_logprobs")]
public Logprobs TopLogprobs { get; set; }
Property Value
|
Edit this page
View Source
TopP
Optional. Defaults to 1
Nucleus sampling parameter.
Declaration
[JsonProperty("top_p")]
public TopP TopP { get; set; }
Property Value
|
Edit this page
View Source
Truncation
Optional. Defaults to disabled
The truncation strategy to use for the model response.
Declaration
[JsonProperty("truncation")]
public TruncationStrategy Truncation { get; set; }
Property Value
|
Edit this page
View Source
Type
Required. The object type of this resource - always 'response'.
Declaration
[JsonProperty("object")]
public string Type { get; set; }
Property Value
|
Edit this page
View Source
Usage
Optional. Token usage information including input/output counts.
Declaration
[JsonProperty("usage")]
public Usage Usage { get; set; }
Property Value
Methods
|
Edit this page
View Source
IsDeleted()
Declaration
Returns
Implements
Extension Methods