diff --git a/OpenAI.SDK/ObjectModels/RequestModels/ToolDefinition.cs b/OpenAI.SDK/ObjectModels/RequestModels/ToolDefinition.cs index 7ca8526c..fe455bf1 100644 --- a/OpenAI.SDK/ObjectModels/RequestModels/ToolDefinition.cs +++ b/OpenAI.SDK/ObjectModels/RequestModels/ToolDefinition.cs @@ -130,5 +130,5 @@ public class RankingOptions /// The score threshold for the file search. All values must be a floating point number between 0 and 1. /// [JsonPropertyName("score_threshold")] - public int ScoreThreshold { get; set; } + public float ScoreThreshold { get; set; } } \ No newline at end of file diff --git a/OpenAI.SDK/ObjectModels/SharedModels/AssistantResponse.cs b/OpenAI.SDK/ObjectModels/SharedModels/AssistantResponse.cs index 98ca7968..1a6be99a 100644 --- a/OpenAI.SDK/ObjectModels/SharedModels/AssistantResponse.cs +++ b/OpenAI.SDK/ObjectModels/SharedModels/AssistantResponse.cs @@ -33,6 +33,31 @@ public record AssistantResponse : BaseResponse, IOpenAiModels.IId, IOpenAiModels [JsonPropertyName("file_ids")] public List FileIds { get; set; } + /// + /// A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For + /// example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of + /// vector store IDs. + /// + [JsonPropertyName("tool_resources")] + public ToolResources? ToolResources { get; set; } + + /// + /// Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 Turbo, and all GPT-3.5 Turbo models + /// since gpt-3.5-turbo-1106. + /// Setting to { "type": "json_schema", "json_schema": { ...} } + /// enables Structured Outputs which ensures the model will match your supplied JSON schema.Learn more in the + /// Structured Outputs guide. + /// Setting to { "type": "json_object" } + /// enables JSON mode, which ensures the message the model generates is valid JSON. + /// Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user + /// message.Without this, the model may generate an unending stream of whitespace until the generation reaches the + /// token limit, resulting in a long-running and seemingly "stuck" request.Also note that the message content may be + /// partially cut off if finish_reason= "length", which indicates the generation exceeded max_tokens or the + /// conversation exceeded the max context length. + /// + [JsonPropertyName("response_format")] + public ResponseFormatOneOfType ResponseFormatOneOfType { get; set; } + /// /// The Unix timestamp (in seconds) for when the assistant was created. /// @@ -63,10 +88,4 @@ public record AssistantResponse : BaseResponse, IOpenAiModels.IId, IOpenAiModels /// [JsonPropertyName("tools")] public List Tools { get; set; } - - /// - /// A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs. - /// - [JsonPropertyName("tool_resources")] - public ToolResources? ToolResources { get; set; } } \ No newline at end of file