openai/openai-dotnet
Publicmirrored from https://github.com/openai/openai-dotnetAvailable
api/OpenAI.netstandard2.0.cs
3760lines · modecode
| 1 | namespace OpenAI { |
| 2 | public class OpenAIClient { |
| 3 | protected OpenAIClient(); |
| 4 | public OpenAIClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 5 | public OpenAIClient(ApiKeyCredential credential); |
| 6 | protected internal OpenAIClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 7 | public OpenAIClient(string apiKey); |
| 8 | public ClientPipeline Pipeline { get; } |
| 9 | public virtual AssistantClient GetAssistantClient(); |
| 10 | public virtual AudioClient GetAudioClient(string model); |
| 11 | public virtual BatchClient GetBatchClient(); |
| 12 | public virtual ChatClient GetChatClient(string model); |
| 13 | public virtual EmbeddingClient GetEmbeddingClient(string model); |
| 14 | public virtual FineTuningClient GetFineTuningClient(); |
| 15 | public virtual ImageClient GetImageClient(string model); |
| 16 | public virtual ModerationClient GetModerationClient(string model); |
| 17 | public virtual OpenAIFileClient GetOpenAIFileClient(); |
| 18 | public virtual OpenAIModelClient GetOpenAIModelClient(); |
| 19 | public virtual Responses.OpenAIResponseClient GetOpenAIResponseClient(); |
| 20 | public virtual Responses.OpenAIResponseClient GetOpenAIResponseClient(string model); |
| 21 | public virtual RealtimeConversation.RealtimeConversationClient GetRealtimeConversationClient(string model); |
| 22 | public virtual VectorStoreClient GetVectorStoreClient(); |
| 23 | } |
| 24 | public class OpenAIClientOptions : ClientPipelineOptions { |
| 25 | public Uri Endpoint { get; set; } |
| 26 | public string OrganizationId { get; set; } |
| 27 | public string ProjectId { get; set; } |
| 28 | public string UserAgentApplicationId { get; set; } |
| 29 | } |
| 30 | } |
| 31 | namespace OpenAI.Assistants { |
| 32 | public class Assistant : IJsonModel<Assistant>, IPersistableModel<Assistant> { |
| 33 | public DateTimeOffset CreatedAt { get; } |
| 34 | public string Description { get; } |
| 35 | public string Id { get; } |
| 36 | public string Instructions { get; } |
| 37 | public IReadOnlyDictionary<string, string> Metadata { get; } |
| 38 | public string Model { get; } |
| 39 | public string Name { get; } |
| 40 | public float? NucleusSamplingFactor { get; } |
| 41 | public AssistantResponseFormat ResponseFormat { get; } |
| 42 | public float? Temperature { get; } |
| 43 | public ToolResources ToolResources { get; } |
| 44 | public IReadOnlyList<ToolDefinition> Tools { get; } |
| 45 | public static explicit operator Assistant(ClientResult result); |
| 46 | public static implicit operator BinaryContent(Assistant assistant); |
| 47 | } |
| 48 | public class AssistantClient { |
| 49 | protected AssistantClient(); |
| 50 | public AssistantClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 51 | public AssistantClient(ApiKeyCredential credential); |
| 52 | protected internal AssistantClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 53 | public AssistantClient(string apiKey); |
| 54 | public ClientPipeline Pipeline { get; } |
| 55 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 56 | public virtual ClientResult CancelRun(string threadId, string runId, RequestOptions options); |
| 57 | public virtual ClientResult<ThreadRun> CancelRun(string threadId, string runId, CancellationToken cancellationToken = default); |
| 58 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 59 | public virtual Task<ClientResult> CancelRunAsync(string threadId, string runId, RequestOptions options); |
| 60 | public virtual Task<ClientResult<ThreadRun>> CancelRunAsync(string threadId, string runId, CancellationToken cancellationToken = default); |
| 61 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 62 | public virtual ClientResult CreateAssistant(BinaryContent content, RequestOptions options = null); |
| 63 | public virtual ClientResult<Assistant> CreateAssistant(string model, AssistantCreationOptions options = null, CancellationToken cancellationToken = default); |
| 64 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 65 | public virtual Task<ClientResult> CreateAssistantAsync(BinaryContent content, RequestOptions options = null); |
| 66 | public virtual Task<ClientResult<Assistant>> CreateAssistantAsync(string model, AssistantCreationOptions options = null, CancellationToken cancellationToken = default); |
| 67 | public virtual ClientResult<ThreadMessage> CreateMessage(string threadId, MessageRole role, IEnumerable<MessageContent> content, MessageCreationOptions options = null, CancellationToken cancellationToken = default); |
| 68 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 69 | public virtual ClientResult CreateMessage(string threadId, BinaryContent content, RequestOptions options = null); |
| 70 | public virtual Task<ClientResult<ThreadMessage>> CreateMessageAsync(string threadId, MessageRole role, IEnumerable<MessageContent> content, MessageCreationOptions options = null, CancellationToken cancellationToken = default); |
| 71 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 72 | public virtual Task<ClientResult> CreateMessageAsync(string threadId, BinaryContent content, RequestOptions options = null); |
| 73 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 74 | public virtual ClientResult CreateRun(string threadId, BinaryContent content, RequestOptions options = null); |
| 75 | public virtual ClientResult<ThreadRun> CreateRun(string threadId, string assistantId, RunCreationOptions options = null, CancellationToken cancellationToken = default); |
| 76 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 77 | public virtual Task<ClientResult> CreateRunAsync(string threadId, BinaryContent content, RequestOptions options = null); |
| 78 | public virtual Task<ClientResult<ThreadRun>> CreateRunAsync(string threadId, string assistantId, RunCreationOptions options = null, CancellationToken cancellationToken = default); |
| 79 | public virtual CollectionResult<StreamingUpdate> CreateRunStreaming(string threadId, string assistantId, RunCreationOptions options = null, CancellationToken cancellationToken = default); |
| 80 | public virtual AsyncCollectionResult<StreamingUpdate> CreateRunStreamingAsync(string threadId, string assistantId, RunCreationOptions options = null, CancellationToken cancellationToken = default); |
| 81 | public virtual ClientResult<AssistantThread> CreateThread(ThreadCreationOptions options = null, CancellationToken cancellationToken = default); |
| 82 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 83 | public virtual ClientResult CreateThread(BinaryContent content, RequestOptions options = null); |
| 84 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 85 | public virtual ClientResult CreateThreadAndRun(BinaryContent content, RequestOptions options = null); |
| 86 | public virtual ClientResult<ThreadRun> CreateThreadAndRun(string assistantId, ThreadCreationOptions threadOptions = null, RunCreationOptions runOptions = null, CancellationToken cancellationToken = default); |
| 87 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 88 | public virtual Task<ClientResult> CreateThreadAndRunAsync(BinaryContent content, RequestOptions options = null); |
| 89 | public virtual Task<ClientResult<ThreadRun>> CreateThreadAndRunAsync(string assistantId, ThreadCreationOptions threadOptions = null, RunCreationOptions runOptions = null, CancellationToken cancellationToken = default); |
| 90 | public virtual CollectionResult<StreamingUpdate> CreateThreadAndRunStreaming(string assistantId, ThreadCreationOptions threadOptions = null, RunCreationOptions runOptions = null, CancellationToken cancellationToken = default); |
| 91 | public virtual AsyncCollectionResult<StreamingUpdate> CreateThreadAndRunStreamingAsync(string assistantId, ThreadCreationOptions threadOptions = null, RunCreationOptions runOptions = null, CancellationToken cancellationToken = default); |
| 92 | public virtual Task<ClientResult<AssistantThread>> CreateThreadAsync(ThreadCreationOptions options = null, CancellationToken cancellationToken = default); |
| 93 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 94 | public virtual Task<ClientResult> CreateThreadAsync(BinaryContent content, RequestOptions options = null); |
| 95 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 96 | public virtual ClientResult DeleteAssistant(string assistantId, RequestOptions options); |
| 97 | public virtual ClientResult<AssistantDeletionResult> DeleteAssistant(string assistantId, CancellationToken cancellationToken = default); |
| 98 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 99 | public virtual Task<ClientResult> DeleteAssistantAsync(string assistantId, RequestOptions options); |
| 100 | public virtual Task<ClientResult<AssistantDeletionResult>> DeleteAssistantAsync(string assistantId, CancellationToken cancellationToken = default); |
| 101 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 102 | public virtual ClientResult DeleteMessage(string threadId, string messageId, RequestOptions options); |
| 103 | public virtual ClientResult<MessageDeletionResult> DeleteMessage(string threadId, string messageId, CancellationToken cancellationToken = default); |
| 104 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 105 | public virtual Task<ClientResult> DeleteMessageAsync(string threadId, string messageId, RequestOptions options); |
| 106 | public virtual Task<ClientResult<MessageDeletionResult>> DeleteMessageAsync(string threadId, string messageId, CancellationToken cancellationToken = default); |
| 107 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 108 | public virtual ClientResult DeleteThread(string threadId, RequestOptions options); |
| 109 | public virtual ClientResult<ThreadDeletionResult> DeleteThread(string threadId, CancellationToken cancellationToken = default); |
| 110 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 111 | public virtual Task<ClientResult> DeleteThreadAsync(string threadId, RequestOptions options); |
| 112 | public virtual Task<ClientResult<ThreadDeletionResult>> DeleteThreadAsync(string threadId, CancellationToken cancellationToken = default); |
| 113 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 114 | public virtual ClientResult GetAssistant(string assistantId, RequestOptions options); |
| 115 | public virtual ClientResult<Assistant> GetAssistant(string assistantId, CancellationToken cancellationToken = default); |
| 116 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 117 | public virtual Task<ClientResult> GetAssistantAsync(string assistantId, RequestOptions options); |
| 118 | public virtual Task<ClientResult<Assistant>> GetAssistantAsync(string assistantId, CancellationToken cancellationToken = default); |
| 119 | public virtual CollectionResult<Assistant> GetAssistants(AssistantCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 120 | public virtual CollectionResult<Assistant> GetAssistants(ContinuationToken firstPageToken, CancellationToken cancellationToken = default); |
| 121 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 122 | public virtual CollectionResult GetAssistants(int? limit, string order, string after, string before, RequestOptions options); |
| 123 | public virtual AsyncCollectionResult<Assistant> GetAssistantsAsync(AssistantCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 124 | public virtual AsyncCollectionResult<Assistant> GetAssistantsAsync(ContinuationToken firstPageToken, CancellationToken cancellationToken = default); |
| 125 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 126 | public virtual AsyncCollectionResult GetAssistantsAsync(int? limit, string order, string after, string before, RequestOptions options); |
| 127 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 128 | public virtual ClientResult GetMessage(string threadId, string messageId, RequestOptions options); |
| 129 | public virtual ClientResult<ThreadMessage> GetMessage(string threadId, string messageId, CancellationToken cancellationToken = default); |
| 130 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 131 | public virtual Task<ClientResult> GetMessageAsync(string threadId, string messageId, RequestOptions options); |
| 132 | public virtual Task<ClientResult<ThreadMessage>> GetMessageAsync(string threadId, string messageId, CancellationToken cancellationToken = default); |
| 133 | public virtual CollectionResult<ThreadMessage> GetMessages(ContinuationToken firstPageToken, CancellationToken cancellationToken = default); |
| 134 | public virtual CollectionResult<ThreadMessage> GetMessages(string threadId, MessageCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 135 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 136 | public virtual CollectionResult GetMessages(string threadId, int? limit, string order, string after, string before, RequestOptions options); |
| 137 | public virtual AsyncCollectionResult<ThreadMessage> GetMessagesAsync(ContinuationToken firstPageToken, CancellationToken cancellationToken = default); |
| 138 | public virtual AsyncCollectionResult<ThreadMessage> GetMessagesAsync(string threadId, MessageCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 139 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 140 | public virtual AsyncCollectionResult GetMessagesAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options); |
| 141 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 142 | public virtual ClientResult GetRun(string threadId, string runId, RequestOptions options); |
| 143 | public virtual ClientResult<ThreadRun> GetRun(string threadId, string runId, CancellationToken cancellationToken = default); |
| 144 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 145 | public virtual Task<ClientResult> GetRunAsync(string threadId, string runId, RequestOptions options); |
| 146 | public virtual Task<ClientResult<ThreadRun>> GetRunAsync(string threadId, string runId, CancellationToken cancellationToken = default); |
| 147 | public virtual CollectionResult<ThreadRun> GetRuns(ContinuationToken firstPageToken, CancellationToken cancellationToken = default); |
| 148 | public virtual CollectionResult<ThreadRun> GetRuns(string threadId, RunCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 149 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 150 | public virtual CollectionResult GetRuns(string threadId, int? limit, string order, string after, string before, RequestOptions options); |
| 151 | public virtual AsyncCollectionResult<ThreadRun> GetRunsAsync(ContinuationToken firstPageToken, CancellationToken cancellationToken = default); |
| 152 | public virtual AsyncCollectionResult<ThreadRun> GetRunsAsync(string threadId, RunCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 153 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 154 | public virtual AsyncCollectionResult GetRunsAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options); |
| 155 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 156 | public virtual ClientResult GetRunStep(string threadId, string runId, string stepId, RequestOptions options); |
| 157 | public virtual ClientResult<RunStep> GetRunStep(string threadId, string runId, string stepId, CancellationToken cancellationToken = default); |
| 158 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 159 | public virtual Task<ClientResult> GetRunStepAsync(string threadId, string runId, string stepId, RequestOptions options); |
| 160 | public virtual Task<ClientResult<RunStep>> GetRunStepAsync(string threadId, string runId, string stepId, CancellationToken cancellationToken = default); |
| 161 | public virtual CollectionResult<RunStep> GetRunSteps(ContinuationToken firstPageToken, CancellationToken cancellationToken = default); |
| 162 | public virtual CollectionResult<RunStep> GetRunSteps(string threadId, string runId, RunStepCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 163 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 164 | public virtual CollectionResult GetRunSteps(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options); |
| 165 | public virtual AsyncCollectionResult<RunStep> GetRunStepsAsync(ContinuationToken firstPageToken, CancellationToken cancellationToken = default); |
| 166 | public virtual AsyncCollectionResult<RunStep> GetRunStepsAsync(string threadId, string runId, RunStepCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 167 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 168 | public virtual AsyncCollectionResult GetRunStepsAsync(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options); |
| 169 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 170 | public virtual ClientResult GetThread(string threadId, RequestOptions options); |
| 171 | public virtual ClientResult<AssistantThread> GetThread(string threadId, CancellationToken cancellationToken = default); |
| 172 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 173 | public virtual Task<ClientResult> GetThreadAsync(string threadId, RequestOptions options); |
| 174 | public virtual Task<ClientResult<AssistantThread>> GetThreadAsync(string threadId, CancellationToken cancellationToken = default); |
| 175 | public virtual ClientResult<Assistant> ModifyAssistant(string assistantId, AssistantModificationOptions options, CancellationToken cancellationToken = default); |
| 176 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 177 | public virtual ClientResult ModifyAssistant(string assistantId, BinaryContent content, RequestOptions options = null); |
| 178 | public virtual Task<ClientResult<Assistant>> ModifyAssistantAsync(string assistantId, AssistantModificationOptions options, CancellationToken cancellationToken = default); |
| 179 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 180 | public virtual Task<ClientResult> ModifyAssistantAsync(string assistantId, BinaryContent content, RequestOptions options = null); |
| 181 | public virtual ClientResult<ThreadMessage> ModifyMessage(string threadId, string messageId, MessageModificationOptions options, CancellationToken cancellationToken = default); |
| 182 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 183 | public virtual ClientResult ModifyMessage(string threadId, string messageId, BinaryContent content, RequestOptions options = null); |
| 184 | public virtual Task<ClientResult<ThreadMessage>> ModifyMessageAsync(string threadId, string messageId, MessageModificationOptions options, CancellationToken cancellationToken = default); |
| 185 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 186 | public virtual Task<ClientResult> ModifyMessageAsync(string threadId, string messageId, BinaryContent content, RequestOptions options = null); |
| 187 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 188 | public virtual ClientResult ModifyRun(string threadId, string runId, BinaryContent content, RequestOptions options = null); |
| 189 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 190 | public virtual Task<ClientResult> ModifyRunAsync(string threadId, string runId, BinaryContent content, RequestOptions options = null); |
| 191 | public virtual ClientResult<AssistantThread> ModifyThread(string threadId, ThreadModificationOptions options, CancellationToken cancellationToken = default); |
| 192 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 193 | public virtual ClientResult ModifyThread(string threadId, BinaryContent content, RequestOptions options = null); |
| 194 | public virtual Task<ClientResult<AssistantThread>> ModifyThreadAsync(string threadId, ThreadModificationOptions options, CancellationToken cancellationToken = default); |
| 195 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 196 | public virtual Task<ClientResult> ModifyThreadAsync(string threadId, BinaryContent content, RequestOptions options = null); |
| 197 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 198 | public virtual ClientResult SubmitToolOutputsToRun(string threadId, string runId, BinaryContent content, RequestOptions options = null); |
| 199 | public virtual ClientResult<ThreadRun> SubmitToolOutputsToRun(string threadId, string runId, IEnumerable<ToolOutput> toolOutputs, CancellationToken cancellationToken = default); |
| 200 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 201 | public virtual Task<ClientResult> SubmitToolOutputsToRunAsync(string threadId, string runId, BinaryContent content, RequestOptions options = null); |
| 202 | public virtual Task<ClientResult<ThreadRun>> SubmitToolOutputsToRunAsync(string threadId, string runId, IEnumerable<ToolOutput> toolOutputs, CancellationToken cancellationToken = default); |
| 203 | public virtual CollectionResult<StreamingUpdate> SubmitToolOutputsToRunStreaming(string threadId, string runId, IEnumerable<ToolOutput> toolOutputs, CancellationToken cancellationToken = default); |
| 204 | public virtual AsyncCollectionResult<StreamingUpdate> SubmitToolOutputsToRunStreamingAsync(string threadId, string runId, IEnumerable<ToolOutput> toolOutputs, CancellationToken cancellationToken = default); |
| 205 | } |
| 206 | public class AssistantCollectionOptions { |
| 207 | public string AfterId { get; set; } |
| 208 | public string BeforeId { get; set; } |
| 209 | public AssistantCollectionOrder? Order { get; set; } |
| 210 | public int? PageSizeLimit { get; set; } |
| 211 | } |
| 212 | public readonly partial struct AssistantCollectionOrder : IEquatable<AssistantCollectionOrder> { |
| 213 | public AssistantCollectionOrder(string value); |
| 214 | public static AssistantCollectionOrder Ascending { get; } |
| 215 | public static AssistantCollectionOrder Descending { get; } |
| 216 | public readonly bool Equals(AssistantCollectionOrder other); |
| 217 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 218 | public override readonly bool Equals(object obj); |
| 219 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 220 | public override readonly int GetHashCode(); |
| 221 | public static bool operator ==(AssistantCollectionOrder left, AssistantCollectionOrder right); |
| 222 | public static implicit operator AssistantCollectionOrder(string value); |
| 223 | public static bool operator !=(AssistantCollectionOrder left, AssistantCollectionOrder right); |
| 224 | public override readonly string ToString(); |
| 225 | } |
| 226 | public class AssistantCreationOptions : IJsonModel<AssistantCreationOptions>, IPersistableModel<AssistantCreationOptions> { |
| 227 | public string Description { get; set; } |
| 228 | public string Instructions { get; set; } |
| 229 | public IDictionary<string, string> Metadata { get; } |
| 230 | public string Name { get; set; } |
| 231 | public float? NucleusSamplingFactor { get; set; } |
| 232 | public AssistantResponseFormat ResponseFormat { get; set; } |
| 233 | public float? Temperature { get; set; } |
| 234 | public ToolResources ToolResources { get; set; } |
| 235 | public IList<ToolDefinition> Tools { get; } |
| 236 | public static explicit operator AssistantCreationOptions(ClientResult result); |
| 237 | public static implicit operator BinaryContent(AssistantCreationOptions assistantCreationOptions); |
| 238 | } |
| 239 | public class AssistantDeletionResult : IJsonModel<AssistantDeletionResult>, IPersistableModel<AssistantDeletionResult> { |
| 240 | public string AssistantId { get; } |
| 241 | public bool Deleted { get; } |
| 242 | public static explicit operator AssistantDeletionResult(ClientResult result); |
| 243 | public static implicit operator BinaryContent(AssistantDeletionResult assistantDeletionResult); |
| 244 | } |
| 245 | public class AssistantModificationOptions : IJsonModel<AssistantModificationOptions>, IPersistableModel<AssistantModificationOptions> { |
| 246 | public IList<ToolDefinition> DefaultTools { get; } |
| 247 | public string Description { get; set; } |
| 248 | public string Instructions { get; set; } |
| 249 | public IDictionary<string, string> Metadata { get; } |
| 250 | public string Model { get; set; } |
| 251 | public string Name { get; set; } |
| 252 | public float? NucleusSamplingFactor { get; set; } |
| 253 | public AssistantResponseFormat ResponseFormat { get; set; } |
| 254 | public float? Temperature { get; set; } |
| 255 | public ToolResources ToolResources { get; set; } |
| 256 | public static explicit operator AssistantModificationOptions(ClientResult result); |
| 257 | public static implicit operator BinaryContent(AssistantModificationOptions assistantModificationOptions); |
| 258 | } |
| 259 | public class AssistantResponseFormat : IEquatable<AssistantResponseFormat>, IEquatable<string>, IJsonModel<AssistantResponseFormat>, IPersistableModel<AssistantResponseFormat> { |
| 260 | public static AssistantResponseFormat Auto { get; } |
| 261 | public static AssistantResponseFormat JsonObject { get; } |
| 262 | public static AssistantResponseFormat Text { get; } |
| 263 | public static AssistantResponseFormat CreateAutoFormat(); |
| 264 | public static AssistantResponseFormat CreateJsonObjectFormat(); |
| 265 | public static AssistantResponseFormat CreateJsonSchemaFormat(string name, BinaryData jsonSchema, string description = null, bool? strictSchemaEnabled = null); |
| 266 | public static AssistantResponseFormat CreateTextFormat(); |
| 267 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 268 | public override bool Equals(object obj); |
| 269 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 270 | public override int GetHashCode(); |
| 271 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 272 | public static bool operator ==(AssistantResponseFormat first, AssistantResponseFormat second); |
| 273 | public static explicit operator AssistantResponseFormat(ClientResult result); |
| 274 | public static implicit operator BinaryContent(AssistantResponseFormat assistantResponseFormat); |
| 275 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 276 | public static implicit operator AssistantResponseFormat(string plainTextFormat); |
| 277 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 278 | public static bool operator !=(AssistantResponseFormat first, AssistantResponseFormat second); |
| 279 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 280 | bool IEquatable<AssistantResponseFormat>.Equals(AssistantResponseFormat other); |
| 281 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 282 | bool IEquatable<string>.Equals(string other); |
| 283 | public override string ToString(); |
| 284 | } |
| 285 | public class AssistantThread : IJsonModel<AssistantThread>, IPersistableModel<AssistantThread> { |
| 286 | public DateTimeOffset CreatedAt { get; } |
| 287 | public string Id { get; } |
| 288 | public IReadOnlyDictionary<string, string> Metadata { get; } |
| 289 | public ToolResources ToolResources { get; } |
| 290 | public static explicit operator AssistantThread(ClientResult result); |
| 291 | public static implicit operator BinaryContent(AssistantThread assistantThread); |
| 292 | } |
| 293 | public class CodeInterpreterToolDefinition : ToolDefinition, IJsonModel<CodeInterpreterToolDefinition>, IPersistableModel<CodeInterpreterToolDefinition> { |
| 294 | public new static explicit operator CodeInterpreterToolDefinition(ClientResult result); |
| 295 | public static implicit operator BinaryContent(CodeInterpreterToolDefinition codeInterpreterToolDefinition); |
| 296 | } |
| 297 | public class CodeInterpreterToolResources : IJsonModel<CodeInterpreterToolResources>, IPersistableModel<CodeInterpreterToolResources> { |
| 298 | public IList<string> FileIds { get; } |
| 299 | public static explicit operator CodeInterpreterToolResources(ClientResult result); |
| 300 | public static implicit operator BinaryContent(CodeInterpreterToolResources codeInterpreterToolResources); |
| 301 | } |
| 302 | public readonly partial struct FileSearchRanker : IEquatable<FileSearchRanker> { |
| 303 | public FileSearchRanker(string value); |
| 304 | public static FileSearchRanker Auto { get; } |
| 305 | public static FileSearchRanker Default20240821 { get; } |
| 306 | public readonly bool Equals(FileSearchRanker other); |
| 307 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 308 | public override readonly bool Equals(object obj); |
| 309 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 310 | public override readonly int GetHashCode(); |
| 311 | public static bool operator ==(FileSearchRanker left, FileSearchRanker right); |
| 312 | public static implicit operator FileSearchRanker(string value); |
| 313 | public static bool operator !=(FileSearchRanker left, FileSearchRanker right); |
| 314 | public override readonly string ToString(); |
| 315 | } |
| 316 | public class FileSearchRankingOptions : IJsonModel<FileSearchRankingOptions>, IPersistableModel<FileSearchRankingOptions> { |
| 317 | public FileSearchRankingOptions(float scoreThreshold); |
| 318 | public FileSearchRanker? Ranker { get; set; } |
| 319 | public float ScoreThreshold { get; set; } |
| 320 | public static explicit operator FileSearchRankingOptions(ClientResult result); |
| 321 | public static implicit operator BinaryContent(FileSearchRankingOptions fileSearchRankingOptions); |
| 322 | } |
| 323 | public class FileSearchToolDefinition : ToolDefinition, IJsonModel<FileSearchToolDefinition>, IPersistableModel<FileSearchToolDefinition> { |
| 324 | public int? MaxResults { get; set; } |
| 325 | public FileSearchRankingOptions RankingOptions { get; set; } |
| 326 | public new static explicit operator FileSearchToolDefinition(ClientResult result); |
| 327 | public static implicit operator BinaryContent(FileSearchToolDefinition fileSearchToolDefinition); |
| 328 | } |
| 329 | public class FileSearchToolResources : IJsonModel<FileSearchToolResources>, IPersistableModel<FileSearchToolResources> { |
| 330 | public IList<VectorStoreCreationHelper> NewVectorStores { get; } |
| 331 | public IList<string> VectorStoreIds { get; } |
| 332 | public static explicit operator FileSearchToolResources(ClientResult result); |
| 333 | public static implicit operator BinaryContent(FileSearchToolResources fileSearchToolResources); |
| 334 | } |
| 335 | public class FunctionToolDefinition : ToolDefinition, IJsonModel<FunctionToolDefinition>, IPersistableModel<FunctionToolDefinition> { |
| 336 | public FunctionToolDefinition(string name); |
| 337 | public string Description { get; set; } |
| 338 | public string FunctionName { get; set; } |
| 339 | public BinaryData Parameters { get; set; } |
| 340 | public bool? StrictParameterSchemaEnabled { get; set; } |
| 341 | public new static explicit operator FunctionToolDefinition(ClientResult result); |
| 342 | public static implicit operator BinaryContent(FunctionToolDefinition functionToolDefinition); |
| 343 | } |
| 344 | public class MessageCollectionOptions { |
| 345 | public string AfterId { get; set; } |
| 346 | public string BeforeId { get; set; } |
| 347 | public MessageCollectionOrder? Order { get; set; } |
| 348 | public int? PageSizeLimit { get; set; } |
| 349 | } |
| 350 | public readonly partial struct MessageCollectionOrder : IEquatable<MessageCollectionOrder> { |
| 351 | public MessageCollectionOrder(string value); |
| 352 | public static MessageCollectionOrder Ascending { get; } |
| 353 | public static MessageCollectionOrder Descending { get; } |
| 354 | public readonly bool Equals(MessageCollectionOrder other); |
| 355 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 356 | public override readonly bool Equals(object obj); |
| 357 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 358 | public override readonly int GetHashCode(); |
| 359 | public static bool operator ==(MessageCollectionOrder left, MessageCollectionOrder right); |
| 360 | public static implicit operator MessageCollectionOrder(string value); |
| 361 | public static bool operator !=(MessageCollectionOrder left, MessageCollectionOrder right); |
| 362 | public override readonly string ToString(); |
| 363 | } |
| 364 | public abstract class MessageContent : IJsonModel<MessageContent>, IPersistableModel<MessageContent> { |
| 365 | public MessageImageDetail? ImageDetail { get; } |
| 366 | public string ImageFileId { get; } |
| 367 | public Uri ImageUri { get; } |
| 368 | public string Refusal { get; } |
| 369 | public string Text { get; } |
| 370 | public IReadOnlyList<TextAnnotation> TextAnnotations { get; } |
| 371 | public static MessageContent FromImageFileId(string imageFileId, MessageImageDetail? detail = null); |
| 372 | public static MessageContent FromImageUri(Uri imageUri, MessageImageDetail? detail = null); |
| 373 | public static MessageContent FromText(string text); |
| 374 | public static explicit operator MessageContent(ClientResult result); |
| 375 | public static implicit operator BinaryContent(MessageContent messageContent); |
| 376 | public static implicit operator MessageContent(string value); |
| 377 | } |
| 378 | public class MessageContentUpdate : StreamingUpdate { |
| 379 | public MessageImageDetail? ImageDetail { get; } |
| 380 | public string ImageFileId { get; } |
| 381 | public string MessageId { get; } |
| 382 | public int MessageIndex { get; } |
| 383 | public string RefusalUpdate { get; } |
| 384 | public MessageRole? Role { get; } |
| 385 | public string Text { get; } |
| 386 | public TextAnnotationUpdate TextAnnotation { get; } |
| 387 | } |
| 388 | public class MessageCreationAttachment : IJsonModel<MessageCreationAttachment>, IPersistableModel<MessageCreationAttachment> { |
| 389 | public MessageCreationAttachment(string fileId, IEnumerable<ToolDefinition> tools); |
| 390 | public string FileId { get; } |
| 391 | public IReadOnlyList<ToolDefinition> Tools { get; } |
| 392 | public static explicit operator MessageCreationAttachment(ClientResult result); |
| 393 | public static implicit operator BinaryContent(MessageCreationAttachment messageCreationAttachment); |
| 394 | } |
| 395 | public class MessageCreationOptions : IJsonModel<MessageCreationOptions>, IPersistableModel<MessageCreationOptions> { |
| 396 | public IList<MessageCreationAttachment> Attachments { get; set; } |
| 397 | public IDictionary<string, string> Metadata { get; } |
| 398 | public static explicit operator MessageCreationOptions(ClientResult result); |
| 399 | public static implicit operator BinaryContent(MessageCreationOptions messageCreationOptions); |
| 400 | } |
| 401 | public class MessageDeletionResult : IJsonModel<MessageDeletionResult>, IPersistableModel<MessageDeletionResult> { |
| 402 | public bool Deleted { get; } |
| 403 | public string MessageId { get; } |
| 404 | public static explicit operator MessageDeletionResult(ClientResult result); |
| 405 | public static implicit operator BinaryContent(MessageDeletionResult messageDeletionResult); |
| 406 | } |
| 407 | public class MessageFailureDetails : IJsonModel<MessageFailureDetails>, IPersistableModel<MessageFailureDetails> { |
| 408 | public MessageFailureReason Reason { get; } |
| 409 | public static explicit operator MessageFailureDetails(ClientResult result); |
| 410 | public static implicit operator BinaryContent(MessageFailureDetails messageFailureDetails); |
| 411 | } |
| 412 | public readonly partial struct MessageFailureReason : IEquatable<MessageFailureReason> { |
| 413 | public MessageFailureReason(string value); |
| 414 | public static MessageFailureReason ContentFilter { get; } |
| 415 | public static MessageFailureReason MaxTokens { get; } |
| 416 | public static MessageFailureReason RunCancelled { get; } |
| 417 | public static MessageFailureReason RunExpired { get; } |
| 418 | public static MessageFailureReason RunFailed { get; } |
| 419 | public readonly bool Equals(MessageFailureReason other); |
| 420 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 421 | public override readonly bool Equals(object obj); |
| 422 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 423 | public override readonly int GetHashCode(); |
| 424 | public static bool operator ==(MessageFailureReason left, MessageFailureReason right); |
| 425 | public static implicit operator MessageFailureReason(string value); |
| 426 | public static bool operator !=(MessageFailureReason left, MessageFailureReason right); |
| 427 | public override readonly string ToString(); |
| 428 | } |
| 429 | public enum MessageImageDetail { |
| 430 | Auto = 0, |
| 431 | Low = 1, |
| 432 | High = 2 |
| 433 | } |
| 434 | public class MessageModificationOptions : IJsonModel<MessageModificationOptions>, IPersistableModel<MessageModificationOptions> { |
| 435 | public IDictionary<string, string> Metadata { get; } |
| 436 | public static explicit operator MessageModificationOptions(ClientResult result); |
| 437 | public static implicit operator BinaryContent(MessageModificationOptions messageModificationOptions); |
| 438 | } |
| 439 | public enum MessageRole { |
| 440 | User = 0, |
| 441 | Assistant = 1 |
| 442 | } |
| 443 | public readonly partial struct MessageStatus : IEquatable<MessageStatus> { |
| 444 | public MessageStatus(string value); |
| 445 | public static MessageStatus Completed { get; } |
| 446 | public static MessageStatus Incomplete { get; } |
| 447 | public static MessageStatus InProgress { get; } |
| 448 | public readonly bool Equals(MessageStatus other); |
| 449 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 450 | public override readonly bool Equals(object obj); |
| 451 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 452 | public override readonly int GetHashCode(); |
| 453 | public static bool operator ==(MessageStatus left, MessageStatus right); |
| 454 | public static implicit operator MessageStatus(string value); |
| 455 | public static bool operator !=(MessageStatus left, MessageStatus right); |
| 456 | public override readonly string ToString(); |
| 457 | } |
| 458 | public class MessageStatusUpdate : StreamingUpdate<ThreadMessage> { |
| 459 | } |
| 460 | public abstract class RequiredAction { |
| 461 | public string FunctionArguments { get; } |
| 462 | public string FunctionName { get; } |
| 463 | public string ToolCallId { get; } |
| 464 | } |
| 465 | public class RequiredActionUpdate : RunUpdate { |
| 466 | public string FunctionArguments { get; } |
| 467 | public string FunctionName { get; } |
| 468 | public string ToolCallId { get; } |
| 469 | public ThreadRun GetThreadRun(); |
| 470 | } |
| 471 | public class RunCollectionOptions { |
| 472 | public string AfterId { get; set; } |
| 473 | public string BeforeId { get; set; } |
| 474 | public RunCollectionOrder? Order { get; set; } |
| 475 | public int? PageSizeLimit { get; set; } |
| 476 | } |
| 477 | public readonly partial struct RunCollectionOrder : IEquatable<RunCollectionOrder> { |
| 478 | public RunCollectionOrder(string value); |
| 479 | public static RunCollectionOrder Ascending { get; } |
| 480 | public static RunCollectionOrder Descending { get; } |
| 481 | public readonly bool Equals(RunCollectionOrder other); |
| 482 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 483 | public override readonly bool Equals(object obj); |
| 484 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 485 | public override readonly int GetHashCode(); |
| 486 | public static bool operator ==(RunCollectionOrder left, RunCollectionOrder right); |
| 487 | public static implicit operator RunCollectionOrder(string value); |
| 488 | public static bool operator !=(RunCollectionOrder left, RunCollectionOrder right); |
| 489 | public override readonly string ToString(); |
| 490 | } |
| 491 | public class RunCreationOptions : IJsonModel<RunCreationOptions>, IPersistableModel<RunCreationOptions> { |
| 492 | public string AdditionalInstructions { get; set; } |
| 493 | public IList<ThreadInitializationMessage> AdditionalMessages { get; } |
| 494 | public bool? AllowParallelToolCalls { get; set; } |
| 495 | public string InstructionsOverride { get; set; } |
| 496 | public int? MaxInputTokenCount { get; set; } |
| 497 | public int? MaxOutputTokenCount { get; set; } |
| 498 | public IDictionary<string, string> Metadata { get; } |
| 499 | public string ModelOverride { get; set; } |
| 500 | public float? NucleusSamplingFactor { get; set; } |
| 501 | public AssistantResponseFormat ResponseFormat { get; set; } |
| 502 | public float? Temperature { get; set; } |
| 503 | public ToolConstraint ToolConstraint { get; set; } |
| 504 | public IList<ToolDefinition> ToolsOverride { get; } |
| 505 | public RunTruncationStrategy TruncationStrategy { get; set; } |
| 506 | public static explicit operator RunCreationOptions(ClientResult result); |
| 507 | public static implicit operator BinaryContent(RunCreationOptions runCreationOptions); |
| 508 | } |
| 509 | public class RunError : IJsonModel<RunError>, IPersistableModel<RunError> { |
| 510 | public RunErrorCode Code { get; } |
| 511 | public string Message { get; } |
| 512 | public static explicit operator RunError(ClientResult result); |
| 513 | public static implicit operator BinaryContent(RunError runError); |
| 514 | } |
| 515 | public readonly partial struct RunErrorCode : IEquatable<RunErrorCode> { |
| 516 | public RunErrorCode(string value); |
| 517 | public static RunErrorCode InvalidPrompt { get; } |
| 518 | public static RunErrorCode RateLimitExceeded { get; } |
| 519 | public static RunErrorCode ServerError { get; } |
| 520 | public readonly bool Equals(RunErrorCode other); |
| 521 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 522 | public override readonly bool Equals(object obj); |
| 523 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 524 | public override readonly int GetHashCode(); |
| 525 | public static bool operator ==(RunErrorCode left, RunErrorCode right); |
| 526 | public static implicit operator RunErrorCode(string value); |
| 527 | public static bool operator !=(RunErrorCode left, RunErrorCode right); |
| 528 | public override readonly string ToString(); |
| 529 | } |
| 530 | public class RunIncompleteDetails : IJsonModel<RunIncompleteDetails>, IPersistableModel<RunIncompleteDetails> { |
| 531 | public RunIncompleteReason? Reason { get; } |
| 532 | public static explicit operator RunIncompleteDetails(ClientResult result); |
| 533 | public static implicit operator BinaryContent(RunIncompleteDetails runIncompleteDetails); |
| 534 | } |
| 535 | public readonly partial struct RunIncompleteReason : IEquatable<RunIncompleteReason> { |
| 536 | public RunIncompleteReason(string value); |
| 537 | public static RunIncompleteReason MaxInputTokenCount { get; } |
| 538 | public static RunIncompleteReason MaxOutputTokenCount { get; } |
| 539 | public readonly bool Equals(RunIncompleteReason other); |
| 540 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 541 | public override readonly bool Equals(object obj); |
| 542 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 543 | public override readonly int GetHashCode(); |
| 544 | public static bool operator ==(RunIncompleteReason left, RunIncompleteReason right); |
| 545 | public static implicit operator RunIncompleteReason(string value); |
| 546 | public static bool operator !=(RunIncompleteReason left, RunIncompleteReason right); |
| 547 | public override readonly string ToString(); |
| 548 | } |
| 549 | public class RunModificationOptions : IJsonModel<RunModificationOptions>, IPersistableModel<RunModificationOptions> { |
| 550 | public IDictionary<string, string> Metadata { get; } |
| 551 | public static explicit operator RunModificationOptions(ClientResult result); |
| 552 | public static implicit operator BinaryContent(RunModificationOptions runModificationOptions); |
| 553 | } |
| 554 | public readonly partial struct RunStatus : IEquatable<RunStatus> { |
| 555 | public RunStatus(string value); |
| 556 | public static RunStatus Cancelled { get; } |
| 557 | public static RunStatus Cancelling { get; } |
| 558 | public static RunStatus Completed { get; } |
| 559 | public static RunStatus Expired { get; } |
| 560 | public static RunStatus Failed { get; } |
| 561 | public static RunStatus Incomplete { get; } |
| 562 | public static RunStatus InProgress { get; } |
| 563 | public bool IsTerminal { get; } |
| 564 | public static RunStatus Queued { get; } |
| 565 | public static RunStatus RequiresAction { get; } |
| 566 | public readonly bool Equals(RunStatus other); |
| 567 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 568 | public override readonly bool Equals(object obj); |
| 569 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 570 | public override readonly int GetHashCode(); |
| 571 | public static bool operator ==(RunStatus left, RunStatus right); |
| 572 | public static implicit operator RunStatus(string value); |
| 573 | public static bool operator !=(RunStatus left, RunStatus right); |
| 574 | public override readonly string ToString(); |
| 575 | } |
| 576 | public class RunStep : IJsonModel<RunStep>, IPersistableModel<RunStep> { |
| 577 | public string AssistantId { get; } |
| 578 | public DateTimeOffset? CancelledAt { get; } |
| 579 | public DateTimeOffset? CompletedAt { get; } |
| 580 | public DateTimeOffset CreatedAt { get; } |
| 581 | public RunStepDetails Details { get; } |
| 582 | public DateTimeOffset? ExpiredAt { get; } |
| 583 | public DateTimeOffset? FailedAt { get; } |
| 584 | public string Id { get; } |
| 585 | public RunStepKind Kind { get; } |
| 586 | public RunStepError LastError { get; } |
| 587 | public IReadOnlyDictionary<string, string> Metadata { get; } |
| 588 | public string RunId { get; } |
| 589 | public RunStepStatus Status { get; } |
| 590 | public string ThreadId { get; } |
| 591 | public RunStepTokenUsage Usage { get; } |
| 592 | public static explicit operator RunStep(ClientResult result); |
| 593 | public static implicit operator BinaryContent(RunStep runStep); |
| 594 | } |
| 595 | public abstract class RunStepCodeInterpreterOutput : IJsonModel<RunStepCodeInterpreterOutput>, IPersistableModel<RunStepCodeInterpreterOutput> { |
| 596 | public string ImageFileId { get; } |
| 597 | public string Logs { get; } |
| 598 | public static explicit operator RunStepCodeInterpreterOutput(ClientResult result); |
| 599 | public static implicit operator BinaryContent(RunStepCodeInterpreterOutput runStepCodeInterpreterOutput); |
| 600 | } |
| 601 | public class RunStepCollectionOptions { |
| 602 | public string AfterId { get; set; } |
| 603 | public string BeforeId { get; set; } |
| 604 | public RunStepCollectionOrder? Order { get; set; } |
| 605 | public int? PageSizeLimit { get; set; } |
| 606 | } |
| 607 | public readonly partial struct RunStepCollectionOrder : IEquatable<RunStepCollectionOrder> { |
| 608 | public RunStepCollectionOrder(string value); |
| 609 | public static RunStepCollectionOrder Ascending { get; } |
| 610 | public static RunStepCollectionOrder Descending { get; } |
| 611 | public readonly bool Equals(RunStepCollectionOrder other); |
| 612 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 613 | public override readonly bool Equals(object obj); |
| 614 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 615 | public override readonly int GetHashCode(); |
| 616 | public static bool operator ==(RunStepCollectionOrder left, RunStepCollectionOrder right); |
| 617 | public static implicit operator RunStepCollectionOrder(string value); |
| 618 | public static bool operator !=(RunStepCollectionOrder left, RunStepCollectionOrder right); |
| 619 | public override readonly string ToString(); |
| 620 | } |
| 621 | public abstract class RunStepDetails : IJsonModel<RunStepDetails>, IPersistableModel<RunStepDetails> { |
| 622 | public string CreatedMessageId { get; } |
| 623 | public IReadOnlyList<RunStepToolCall> ToolCalls { get; } |
| 624 | public static explicit operator RunStepDetails(ClientResult result); |
| 625 | public static implicit operator BinaryContent(RunStepDetails runStepDetails); |
| 626 | } |
| 627 | public class RunStepDetailsUpdate : StreamingUpdate { |
| 628 | public string CodeInterpreterInput { get; } |
| 629 | public IReadOnlyList<RunStepUpdateCodeInterpreterOutput> CodeInterpreterOutputs { get; } |
| 630 | public string CreatedMessageId { get; } |
| 631 | public FileSearchRankingOptions FileSearchRankingOptions { get; } |
| 632 | public IReadOnlyList<RunStepFileSearchResult> FileSearchResults { get; } |
| 633 | public string FunctionArguments { get; } |
| 634 | public string FunctionName { get; } |
| 635 | public string FunctionOutput { get; } |
| 636 | public string StepId { get; } |
| 637 | public string ToolCallId { get; } |
| 638 | public int? ToolCallIndex { get; } |
| 639 | } |
| 640 | public class RunStepError : IJsonModel<RunStepError>, IPersistableModel<RunStepError> { |
| 641 | public RunStepErrorCode Code { get; } |
| 642 | public string Message { get; } |
| 643 | public static explicit operator RunStepError(ClientResult result); |
| 644 | public static implicit operator BinaryContent(RunStepError runStepError); |
| 645 | } |
| 646 | public readonly partial struct RunStepErrorCode : IEquatable<RunStepErrorCode> { |
| 647 | public RunStepErrorCode(string value); |
| 648 | public static RunStepErrorCode RateLimitExceeded { get; } |
| 649 | public static RunStepErrorCode ServerError { get; } |
| 650 | public readonly bool Equals(RunStepErrorCode other); |
| 651 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 652 | public override readonly bool Equals(object obj); |
| 653 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 654 | public override readonly int GetHashCode(); |
| 655 | public static bool operator ==(RunStepErrorCode left, RunStepErrorCode right); |
| 656 | public static implicit operator RunStepErrorCode(string value); |
| 657 | public static bool operator !=(RunStepErrorCode left, RunStepErrorCode right); |
| 658 | public override readonly string ToString(); |
| 659 | } |
| 660 | public class RunStepFileSearchResult : IJsonModel<RunStepFileSearchResult>, IPersistableModel<RunStepFileSearchResult> { |
| 661 | public IReadOnlyList<RunStepFileSearchResultContent> Content { get; } |
| 662 | public string FileId { get; } |
| 663 | public string FileName { get; } |
| 664 | public float Score { get; } |
| 665 | public static explicit operator RunStepFileSearchResult(ClientResult result); |
| 666 | public static implicit operator BinaryContent(RunStepFileSearchResult runStepFileSearchResult); |
| 667 | } |
| 668 | public class RunStepFileSearchResultContent : IJsonModel<RunStepFileSearchResultContent>, IPersistableModel<RunStepFileSearchResultContent> { |
| 669 | public RunStepFileSearchResultContentKind Kind { get; } |
| 670 | public string Text { get; } |
| 671 | public static explicit operator RunStepFileSearchResultContent(ClientResult result); |
| 672 | public static implicit operator BinaryContent(RunStepFileSearchResultContent runStepFileSearchResultContent); |
| 673 | } |
| 674 | public enum RunStepFileSearchResultContentKind { |
| 675 | Text = 0 |
| 676 | } |
| 677 | public enum RunStepKind { |
| 678 | CreatedMessage = 0, |
| 679 | ToolCall = 1 |
| 680 | } |
| 681 | public readonly partial struct RunStepStatus : IEquatable<RunStepStatus> { |
| 682 | public RunStepStatus(string value); |
| 683 | public static RunStepStatus Cancelled { get; } |
| 684 | public static RunStepStatus Completed { get; } |
| 685 | public static RunStepStatus Expired { get; } |
| 686 | public static RunStepStatus Failed { get; } |
| 687 | public static RunStepStatus InProgress { get; } |
| 688 | public readonly bool Equals(RunStepStatus other); |
| 689 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 690 | public override readonly bool Equals(object obj); |
| 691 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 692 | public override readonly int GetHashCode(); |
| 693 | public static bool operator ==(RunStepStatus left, RunStepStatus right); |
| 694 | public static implicit operator RunStepStatus(string value); |
| 695 | public static bool operator !=(RunStepStatus left, RunStepStatus right); |
| 696 | public override readonly string ToString(); |
| 697 | } |
| 698 | public class RunStepTokenUsage : IJsonModel<RunStepTokenUsage>, IPersistableModel<RunStepTokenUsage> { |
| 699 | public int InputTokenCount { get; } |
| 700 | public int OutputTokenCount { get; } |
| 701 | public int TotalTokenCount { get; } |
| 702 | public static explicit operator RunStepTokenUsage(ClientResult result); |
| 703 | public static implicit operator BinaryContent(RunStepTokenUsage runStepTokenUsage); |
| 704 | } |
| 705 | public class RunStepToolCall : IJsonModel<RunStepToolCall>, IPersistableModel<RunStepToolCall> { |
| 706 | public string CodeInterpreterInput { get; } |
| 707 | public IReadOnlyList<RunStepCodeInterpreterOutput> CodeInterpreterOutputs { get; } |
| 708 | public FileSearchRankingOptions FileSearchRankingOptions { get; } |
| 709 | public IReadOnlyList<RunStepFileSearchResult> FileSearchResults { get; } |
| 710 | public string FunctionArguments { get; } |
| 711 | public string FunctionName { get; } |
| 712 | public string FunctionOutput { get; } |
| 713 | public string Id { get; } |
| 714 | public RunStepToolCallKind Kind { get; } |
| 715 | public static explicit operator RunStepToolCall(ClientResult result); |
| 716 | public static implicit operator BinaryContent(RunStepToolCall runStepToolCall); |
| 717 | } |
| 718 | public enum RunStepToolCallKind { |
| 719 | CodeInterpreter = 0, |
| 720 | FileSearch = 1, |
| 721 | Function = 2 |
| 722 | } |
| 723 | public class RunStepUpdate : StreamingUpdate<RunStep> { |
| 724 | } |
| 725 | public class RunStepUpdateCodeInterpreterOutput : IJsonModel<RunStepUpdateCodeInterpreterOutput>, IPersistableModel<RunStepUpdateCodeInterpreterOutput> { |
| 726 | public string ImageFileId { get; } |
| 727 | public string Logs { get; } |
| 728 | public int OutputIndex { get; } |
| 729 | public static explicit operator RunStepUpdateCodeInterpreterOutput(ClientResult result); |
| 730 | public static implicit operator BinaryContent(RunStepUpdateCodeInterpreterOutput runStepUpdateCodeInterpreterOutput); |
| 731 | } |
| 732 | public class RunTokenUsage : IJsonModel<RunTokenUsage>, IPersistableModel<RunTokenUsage> { |
| 733 | public int InputTokenCount { get; } |
| 734 | public int OutputTokenCount { get; } |
| 735 | public int TotalTokenCount { get; } |
| 736 | public static explicit operator RunTokenUsage(ClientResult result); |
| 737 | public static implicit operator BinaryContent(RunTokenUsage runTokenUsage); |
| 738 | } |
| 739 | public class RunTruncationStrategy : IJsonModel<RunTruncationStrategy>, IPersistableModel<RunTruncationStrategy> { |
| 740 | public static RunTruncationStrategy Auto { get; } |
| 741 | public int? LastMessages { get; } |
| 742 | public static RunTruncationStrategy CreateLastMessagesStrategy(int lastMessageCount); |
| 743 | public static explicit operator RunTruncationStrategy(ClientResult result); |
| 744 | public static implicit operator BinaryContent(RunTruncationStrategy runTruncationStrategy); |
| 745 | } |
| 746 | public class RunUpdate : StreamingUpdate<ThreadRun> { |
| 747 | } |
| 748 | public abstract class StreamingUpdate { |
| 749 | public StreamingUpdateReason UpdateKind { get; } |
| 750 | } |
| 751 | public enum StreamingUpdateReason { |
| 752 | Unknown = 0, |
| 753 | ThreadCreated = 1, |
| 754 | RunCreated = 2, |
| 755 | RunQueued = 3, |
| 756 | RunInProgress = 4, |
| 757 | RunRequiresAction = 5, |
| 758 | RunCompleted = 6, |
| 759 | RunIncomplete = 7, |
| 760 | RunFailed = 8, |
| 761 | RunCancelling = 9, |
| 762 | RunCancelled = 10, |
| 763 | RunExpired = 11, |
| 764 | RunStepCreated = 12, |
| 765 | RunStepInProgress = 13, |
| 766 | RunStepUpdated = 14, |
| 767 | RunStepCompleted = 15, |
| 768 | RunStepFailed = 16, |
| 769 | RunStepCancelled = 17, |
| 770 | RunStepExpired = 18, |
| 771 | MessageCreated = 19, |
| 772 | MessageInProgress = 20, |
| 773 | MessageUpdated = 21, |
| 774 | MessageCompleted = 22, |
| 775 | MessageFailed = 23, |
| 776 | Error = 24, |
| 777 | Done = 25 |
| 778 | } |
| 779 | public class StreamingUpdate<T> : StreamingUpdate where T : class { |
| 780 | public T Value { get; } |
| 781 | public static implicit operator T(StreamingUpdate<T> update); |
| 782 | } |
| 783 | public class TextAnnotation { |
| 784 | public int EndIndex { get; } |
| 785 | public string InputFileId { get; } |
| 786 | public string OutputFileId { get; } |
| 787 | public int StartIndex { get; } |
| 788 | public string TextToReplace { get; } |
| 789 | } |
| 790 | public class TextAnnotationUpdate { |
| 791 | public int ContentIndex { get; } |
| 792 | public int? EndIndex { get; } |
| 793 | public string InputFileId { get; } |
| 794 | public string OutputFileId { get; } |
| 795 | public int? StartIndex { get; } |
| 796 | public string TextToReplace { get; } |
| 797 | } |
| 798 | public class ThreadCreationOptions : IJsonModel<ThreadCreationOptions>, IPersistableModel<ThreadCreationOptions> { |
| 799 | public IList<ThreadInitializationMessage> InitialMessages { get; } |
| 800 | public IDictionary<string, string> Metadata { get; } |
| 801 | public ToolResources ToolResources { get; set; } |
| 802 | public static explicit operator ThreadCreationOptions(ClientResult result); |
| 803 | public static implicit operator BinaryContent(ThreadCreationOptions threadCreationOptions); |
| 804 | } |
| 805 | public class ThreadDeletionResult : IJsonModel<ThreadDeletionResult>, IPersistableModel<ThreadDeletionResult> { |
| 806 | public bool Deleted { get; } |
| 807 | public string ThreadId { get; } |
| 808 | public static explicit operator ThreadDeletionResult(ClientResult result); |
| 809 | public static implicit operator BinaryContent(ThreadDeletionResult threadDeletionResult); |
| 810 | } |
| 811 | public class ThreadInitializationMessage : MessageCreationOptions { |
| 812 | public ThreadInitializationMessage(MessageRole role, IEnumerable<MessageContent> content); |
| 813 | public static implicit operator ThreadInitializationMessage(string initializationMessage); |
| 814 | } |
| 815 | public class ThreadMessage : IJsonModel<ThreadMessage>, IPersistableModel<ThreadMessage> { |
| 816 | public string AssistantId { get; } |
| 817 | public IReadOnlyList<MessageCreationAttachment> Attachments { get; } |
| 818 | public DateTimeOffset? CompletedAt { get; } |
| 819 | public IReadOnlyList<MessageContent> Content { get; } |
| 820 | public DateTimeOffset CreatedAt { get; } |
| 821 | public string Id { get; } |
| 822 | public DateTimeOffset? IncompleteAt { get; } |
| 823 | public MessageFailureDetails IncompleteDetails { get; } |
| 824 | public IReadOnlyDictionary<string, string> Metadata { get; } |
| 825 | public MessageRole Role { get; } |
| 826 | public string RunId { get; } |
| 827 | public MessageStatus Status { get; } |
| 828 | public string ThreadId { get; } |
| 829 | public static explicit operator ThreadMessage(ClientResult result); |
| 830 | public static implicit operator BinaryContent(ThreadMessage threadMessage); |
| 831 | } |
| 832 | public class ThreadModificationOptions : IJsonModel<ThreadModificationOptions>, IPersistableModel<ThreadModificationOptions> { |
| 833 | public IDictionary<string, string> Metadata { get; } |
| 834 | public ToolResources ToolResources { get; set; } |
| 835 | public static explicit operator ThreadModificationOptions(ClientResult result); |
| 836 | public static implicit operator BinaryContent(ThreadModificationOptions threadModificationOptions); |
| 837 | } |
| 838 | public class ThreadRun : IJsonModel<ThreadRun>, IPersistableModel<ThreadRun> { |
| 839 | public bool? AllowParallelToolCalls { get; } |
| 840 | public string AssistantId { get; } |
| 841 | public DateTimeOffset? CancelledAt { get; } |
| 842 | public DateTimeOffset? CompletedAt { get; } |
| 843 | public DateTimeOffset CreatedAt { get; } |
| 844 | public DateTimeOffset? ExpiresAt { get; } |
| 845 | public DateTimeOffset? FailedAt { get; } |
| 846 | public string Id { get; } |
| 847 | public RunIncompleteDetails IncompleteDetails { get; } |
| 848 | public string Instructions { get; } |
| 849 | public RunError LastError { get; } |
| 850 | public int? MaxInputTokenCount { get; } |
| 851 | public int? MaxOutputTokenCount { get; } |
| 852 | public IReadOnlyDictionary<string, string> Metadata { get; } |
| 853 | public string Model { get; } |
| 854 | public float? NucleusSamplingFactor { get; } |
| 855 | public IReadOnlyList<RequiredAction> RequiredActions { get; } |
| 856 | public AssistantResponseFormat ResponseFormat { get; } |
| 857 | public DateTimeOffset? StartedAt { get; } |
| 858 | public RunStatus Status { get; } |
| 859 | public float? Temperature { get; } |
| 860 | public string ThreadId { get; } |
| 861 | public ToolConstraint ToolConstraint { get; } |
| 862 | public IReadOnlyList<ToolDefinition> Tools { get; } |
| 863 | public RunTruncationStrategy TruncationStrategy { get; } |
| 864 | public RunTokenUsage Usage { get; } |
| 865 | public static explicit operator ThreadRun(ClientResult result); |
| 866 | public static implicit operator BinaryContent(ThreadRun threadRun); |
| 867 | } |
| 868 | public class ThreadUpdate : StreamingUpdate<AssistantThread> { |
| 869 | public DateTimeOffset CreatedAt { get; } |
| 870 | public string Id { get; } |
| 871 | public IReadOnlyDictionary<string, string> Metadata { get; } |
| 872 | public ToolResources ToolResources { get; } |
| 873 | } |
| 874 | public class ToolConstraint : IJsonModel<ToolConstraint>, IPersistableModel<ToolConstraint> { |
| 875 | public ToolConstraint(ToolDefinition toolDefinition); |
| 876 | public static ToolConstraint Auto { get; } |
| 877 | public static ToolConstraint None { get; } |
| 878 | public static ToolConstraint Required { get; } |
| 879 | public static explicit operator ToolConstraint(ClientResult result); |
| 880 | public static implicit operator BinaryContent(ToolConstraint toolConstraint); |
| 881 | } |
| 882 | public abstract class ToolDefinition : IJsonModel<ToolDefinition>, IPersistableModel<ToolDefinition> { |
| 883 | protected ToolDefinition(); |
| 884 | protected ToolDefinition(string type); |
| 885 | public static CodeInterpreterToolDefinition CreateCodeInterpreter(); |
| 886 | public static FileSearchToolDefinition CreateFileSearch(int? maxResults = null); |
| 887 | public static FunctionToolDefinition CreateFunction(string name, string description = null, BinaryData parameters = null, bool? strictParameterSchemaEnabled = null); |
| 888 | public static explicit operator ToolDefinition(ClientResult result); |
| 889 | public static implicit operator BinaryContent(ToolDefinition toolDefinition); |
| 890 | } |
| 891 | public class ToolOutput : IJsonModel<ToolOutput>, IPersistableModel<ToolOutput> { |
| 892 | public ToolOutput(); |
| 893 | public ToolOutput(string toolCallId, string output); |
| 894 | public string Output { get; set; } |
| 895 | public string ToolCallId { get; set; } |
| 896 | public static explicit operator ToolOutput(ClientResult result); |
| 897 | public static implicit operator BinaryContent(ToolOutput toolOutput); |
| 898 | } |
| 899 | public class ToolResources : IJsonModel<ToolResources>, IPersistableModel<ToolResources> { |
| 900 | public CodeInterpreterToolResources CodeInterpreter { get; set; } |
| 901 | public FileSearchToolResources FileSearch { get; set; } |
| 902 | public static explicit operator ToolResources(ClientResult result); |
| 903 | public static implicit operator BinaryContent(ToolResources toolResources); |
| 904 | } |
| 905 | public class VectorStoreCreationHelper : IJsonModel<VectorStoreCreationHelper>, IPersistableModel<VectorStoreCreationHelper> { |
| 906 | public VectorStoreCreationHelper(); |
| 907 | public VectorStoreCreationHelper(IEnumerable<OpenAIFile> files); |
| 908 | public VectorStoreCreationHelper(IEnumerable<string> fileIds); |
| 909 | public FileChunkingStrategy ChunkingStrategy { get; set; } |
| 910 | public IList<string> FileIds { get; } |
| 911 | public IDictionary<string, string> Metadata { get; } |
| 912 | public static explicit operator VectorStoreCreationHelper(ClientResult result); |
| 913 | public static implicit operator BinaryContent(VectorStoreCreationHelper vectorStoreCreationHelper); |
| 914 | } |
| 915 | } |
| 916 | namespace OpenAI.Audio { |
| 917 | public class AudioClient { |
| 918 | protected AudioClient(); |
| 919 | protected internal AudioClient(ClientPipeline pipeline, string model, OpenAIClientOptions options); |
| 920 | public AudioClient(string model, ApiKeyCredential credential, OpenAIClientOptions options); |
| 921 | public AudioClient(string model, ApiKeyCredential credential); |
| 922 | public AudioClient(string model, string apiKey); |
| 923 | public ClientPipeline Pipeline { get; } |
| 924 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 925 | public virtual ClientResult GenerateSpeech(BinaryContent content, RequestOptions options = null); |
| 926 | public virtual ClientResult<BinaryData> GenerateSpeech(string text, GeneratedSpeechVoice voice, SpeechGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 927 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 928 | public virtual Task<ClientResult> GenerateSpeechAsync(BinaryContent content, RequestOptions options = null); |
| 929 | public virtual Task<ClientResult<BinaryData>> GenerateSpeechAsync(string text, GeneratedSpeechVoice voice, SpeechGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 930 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 931 | public virtual ClientResult TranscribeAudio(BinaryContent content, string contentType, RequestOptions options = null); |
| 932 | public virtual ClientResult<AudioTranscription> TranscribeAudio(Stream audio, string audioFilename, AudioTranscriptionOptions options = null, CancellationToken cancellationToken = default); |
| 933 | public virtual ClientResult<AudioTranscription> TranscribeAudio(string audioFilePath, AudioTranscriptionOptions options = null); |
| 934 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 935 | public virtual Task<ClientResult> TranscribeAudioAsync(BinaryContent content, string contentType, RequestOptions options = null); |
| 936 | public virtual Task<ClientResult<AudioTranscription>> TranscribeAudioAsync(Stream audio, string audioFilename, AudioTranscriptionOptions options = null, CancellationToken cancellationToken = default); |
| 937 | public virtual Task<ClientResult<AudioTranscription>> TranscribeAudioAsync(string audioFilePath, AudioTranscriptionOptions options = null); |
| 938 | public virtual ClientResult TranslateAudio(BinaryContent content, string contentType, RequestOptions options = null); |
| 939 | public virtual ClientResult<AudioTranslation> TranslateAudio(Stream audio, string audioFilename, AudioTranslationOptions options = null, CancellationToken cancellationToken = default); |
| 940 | public virtual ClientResult<AudioTranslation> TranslateAudio(string audioFilePath, AudioTranslationOptions options = null); |
| 941 | public virtual Task<ClientResult> TranslateAudioAsync(BinaryContent content, string contentType, RequestOptions options = null); |
| 942 | public virtual Task<ClientResult<AudioTranslation>> TranslateAudioAsync(Stream audio, string audioFilename, AudioTranslationOptions options = null, CancellationToken cancellationToken = default); |
| 943 | public virtual Task<ClientResult<AudioTranslation>> TranslateAudioAsync(string audioFilePath, AudioTranslationOptions options = null); |
| 944 | } |
| 945 | [Flags] |
| 946 | public enum AudioTimestampGranularities { |
| 947 | Default = 0, |
| 948 | Word = 1, |
| 949 | Segment = 2 |
| 950 | } |
| 951 | public class AudioTranscription : IJsonModel<AudioTranscription>, IPersistableModel<AudioTranscription> { |
| 952 | public TimeSpan? Duration { get; } |
| 953 | public string Language { get; } |
| 954 | public IReadOnlyList<TranscribedSegment> Segments { get; } |
| 955 | public string Text { get; } |
| 956 | public IReadOnlyList<TranscribedWord> Words { get; } |
| 957 | public static explicit operator AudioTranscription(ClientResult result); |
| 958 | public static implicit operator BinaryContent(AudioTranscription audioTranscription); |
| 959 | } |
| 960 | public readonly partial struct AudioTranscriptionFormat : IEquatable<AudioTranscriptionFormat> { |
| 961 | public AudioTranscriptionFormat(string value); |
| 962 | public static AudioTranscriptionFormat Simple { get; } |
| 963 | public static AudioTranscriptionFormat Srt { get; } |
| 964 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 965 | public static AudioTranscriptionFormat Text { get; } |
| 966 | public static AudioTranscriptionFormat Verbose { get; } |
| 967 | public static AudioTranscriptionFormat Vtt { get; } |
| 968 | public readonly bool Equals(AudioTranscriptionFormat other); |
| 969 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 970 | public override readonly bool Equals(object obj); |
| 971 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 972 | public override readonly int GetHashCode(); |
| 973 | public static bool operator ==(AudioTranscriptionFormat left, AudioTranscriptionFormat right); |
| 974 | public static implicit operator AudioTranscriptionFormat(string value); |
| 975 | public static bool operator !=(AudioTranscriptionFormat left, AudioTranscriptionFormat right); |
| 976 | public override readonly string ToString(); |
| 977 | } |
| 978 | public class AudioTranscriptionOptions : IJsonModel<AudioTranscriptionOptions>, IPersistableModel<AudioTranscriptionOptions> { |
| 979 | public string Language { get; set; } |
| 980 | public string Prompt { get; set; } |
| 981 | public AudioTranscriptionFormat? ResponseFormat { get; set; } |
| 982 | public float? Temperature { get; set; } |
| 983 | public AudioTimestampGranularities TimestampGranularities { get; set; } |
| 984 | public static explicit operator AudioTranscriptionOptions(ClientResult result); |
| 985 | public static implicit operator BinaryContent(AudioTranscriptionOptions audioTranscriptionOptions); |
| 986 | } |
| 987 | public class AudioTranslation : IJsonModel<AudioTranslation>, IPersistableModel<AudioTranslation> { |
| 988 | public TimeSpan? Duration { get; } |
| 989 | public string Language { get; } |
| 990 | public IReadOnlyList<TranscribedSegment> Segments { get; } |
| 991 | public string Text { get; } |
| 992 | public static explicit operator AudioTranslation(ClientResult result); |
| 993 | public static implicit operator BinaryContent(AudioTranslation audioTranslation); |
| 994 | } |
| 995 | public readonly partial struct AudioTranslationFormat : IEquatable<AudioTranslationFormat> { |
| 996 | public AudioTranslationFormat(string value); |
| 997 | public static AudioTranslationFormat Simple { get; } |
| 998 | public static AudioTranslationFormat Srt { get; } |
| 999 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1000 | public static AudioTranslationFormat Text { get; } |
| 1001 | public static AudioTranslationFormat Verbose { get; } |
| 1002 | public static AudioTranslationFormat Vtt { get; } |
| 1003 | public readonly bool Equals(AudioTranslationFormat other); |
| 1004 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1005 | public override readonly bool Equals(object obj); |
| 1006 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1007 | public override readonly int GetHashCode(); |
| 1008 | public static bool operator ==(AudioTranslationFormat left, AudioTranslationFormat right); |
| 1009 | public static implicit operator AudioTranslationFormat(string value); |
| 1010 | public static bool operator !=(AudioTranslationFormat left, AudioTranslationFormat right); |
| 1011 | public override readonly string ToString(); |
| 1012 | } |
| 1013 | public class AudioTranslationOptions : IJsonModel<AudioTranslationOptions>, IPersistableModel<AudioTranslationOptions> { |
| 1014 | public string Prompt { get; set; } |
| 1015 | public AudioTranslationFormat? ResponseFormat { get; set; } |
| 1016 | public float? Temperature { get; set; } |
| 1017 | public static explicit operator AudioTranslationOptions(ClientResult result); |
| 1018 | public static implicit operator BinaryContent(AudioTranslationOptions audioTranslationOptions); |
| 1019 | } |
| 1020 | public readonly partial struct GeneratedSpeechFormat : IEquatable<GeneratedSpeechFormat> { |
| 1021 | public GeneratedSpeechFormat(string value); |
| 1022 | public static GeneratedSpeechFormat Aac { get; } |
| 1023 | public static GeneratedSpeechFormat Flac { get; } |
| 1024 | public static GeneratedSpeechFormat Mp3 { get; } |
| 1025 | public static GeneratedSpeechFormat Opus { get; } |
| 1026 | public static GeneratedSpeechFormat Pcm { get; } |
| 1027 | public static GeneratedSpeechFormat Wav { get; } |
| 1028 | public readonly bool Equals(GeneratedSpeechFormat other); |
| 1029 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1030 | public override readonly bool Equals(object obj); |
| 1031 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1032 | public override readonly int GetHashCode(); |
| 1033 | public static bool operator ==(GeneratedSpeechFormat left, GeneratedSpeechFormat right); |
| 1034 | public static implicit operator GeneratedSpeechFormat(string value); |
| 1035 | public static bool operator !=(GeneratedSpeechFormat left, GeneratedSpeechFormat right); |
| 1036 | public override readonly string ToString(); |
| 1037 | } |
| 1038 | public readonly partial struct GeneratedSpeechVoice : IEquatable<GeneratedSpeechVoice> { |
| 1039 | public GeneratedSpeechVoice(string value); |
| 1040 | public static GeneratedSpeechVoice Alloy { get; } |
| 1041 | public static GeneratedSpeechVoice Ash { get; } |
| 1042 | public static GeneratedSpeechVoice Coral { get; } |
| 1043 | public static GeneratedSpeechVoice Echo { get; } |
| 1044 | public static GeneratedSpeechVoice Fable { get; } |
| 1045 | public static GeneratedSpeechVoice Nova { get; } |
| 1046 | public static GeneratedSpeechVoice Onyx { get; } |
| 1047 | public static GeneratedSpeechVoice Sage { get; } |
| 1048 | public static GeneratedSpeechVoice Shimmer { get; } |
| 1049 | public readonly bool Equals(GeneratedSpeechVoice other); |
| 1050 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1051 | public override readonly bool Equals(object obj); |
| 1052 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1053 | public override readonly int GetHashCode(); |
| 1054 | public static bool operator ==(GeneratedSpeechVoice left, GeneratedSpeechVoice right); |
| 1055 | public static implicit operator GeneratedSpeechVoice(string value); |
| 1056 | public static bool operator !=(GeneratedSpeechVoice left, GeneratedSpeechVoice right); |
| 1057 | public override readonly string ToString(); |
| 1058 | } |
| 1059 | public static class OpenAIAudioModelFactory { |
| 1060 | public static AudioTranscription AudioTranscription(string language = null, TimeSpan? duration = null, string text = null, IEnumerable<TranscribedWord> words = null, IEnumerable<TranscribedSegment> segments = null); |
| 1061 | public static AudioTranslation AudioTranslation(string language = null, TimeSpan? duration = null, string text = null, IEnumerable<TranscribedSegment> segments = null); |
| 1062 | public static TranscribedSegment TranscribedSegment(int id = 0, int seekOffset = 0, TimeSpan startTime = default, TimeSpan endTime = default, string text = null, ReadOnlyMemory<int> tokenIds = default, float temperature = 0, float averageLogProbability = 0, float compressionRatio = 0, float noSpeechProbability = 0); |
| 1063 | public static TranscribedWord TranscribedWord(string word = null, TimeSpan startTime = default, TimeSpan endTime = default); |
| 1064 | } |
| 1065 | public class SpeechGenerationOptions : IJsonModel<SpeechGenerationOptions>, IPersistableModel<SpeechGenerationOptions> { |
| 1066 | public GeneratedSpeechFormat? ResponseFormat { get; set; } |
| 1067 | public float? SpeedRatio { get; set; } |
| 1068 | public static explicit operator SpeechGenerationOptions(ClientResult result); |
| 1069 | public static implicit operator BinaryContent(SpeechGenerationOptions speechGenerationOptions); |
| 1070 | } |
| 1071 | public readonly partial struct TranscribedSegment : IJsonModel<TranscribedSegment>, IPersistableModel<TranscribedSegment>, IJsonModel<object>, IPersistableModel<object> { |
| 1072 | public float AverageLogProbability { get; } |
| 1073 | public float CompressionRatio { get; } |
| 1074 | public TimeSpan EndTime { get; } |
| 1075 | public int Id { get; } |
| 1076 | public float NoSpeechProbability { get; } |
| 1077 | public int SeekOffset { get; } |
| 1078 | public TimeSpan StartTime { get; } |
| 1079 | public float Temperature { get; } |
| 1080 | public string Text { get; } |
| 1081 | public ReadOnlyMemory<int> TokenIds { get; } |
| 1082 | public static explicit operator TranscribedSegment(ClientResult result); |
| 1083 | public static implicit operator BinaryContent(TranscribedSegment transcribedSegment); |
| 1084 | } |
| 1085 | public readonly partial struct TranscribedWord : IJsonModel<TranscribedWord>, IPersistableModel<TranscribedWord>, IJsonModel<object>, IPersistableModel<object> { |
| 1086 | public TimeSpan EndTime { get; } |
| 1087 | public TimeSpan StartTime { get; } |
| 1088 | public string Word { get; } |
| 1089 | public static explicit operator TranscribedWord(ClientResult result); |
| 1090 | public static implicit operator BinaryContent(TranscribedWord transcribedWord); |
| 1091 | } |
| 1092 | } |
| 1093 | namespace OpenAI.Batch { |
| 1094 | public class BatchClient { |
| 1095 | protected BatchClient(); |
| 1096 | public BatchClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 1097 | public BatchClient(ApiKeyCredential credential); |
| 1098 | protected internal BatchClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 1099 | public BatchClient(string apiKey); |
| 1100 | public ClientPipeline Pipeline { get; } |
| 1101 | public virtual CreateBatchOperation CreateBatch(BinaryContent content, bool waitUntilCompleted, RequestOptions options = null); |
| 1102 | public virtual Task<CreateBatchOperation> CreateBatchAsync(BinaryContent content, bool waitUntilCompleted, RequestOptions options = null); |
| 1103 | public virtual CollectionResult GetBatches(string after, int? limit, RequestOptions options); |
| 1104 | public virtual AsyncCollectionResult GetBatchesAsync(string after, int? limit, RequestOptions options); |
| 1105 | } |
| 1106 | public class CreateBatchOperation : OperationResult { |
| 1107 | public string BatchId { get; } |
| 1108 | public override ContinuationToken? RehydrationToken { get; protected set; } |
| 1109 | public virtual ClientResult Cancel(RequestOptions? options); |
| 1110 | public virtual Task<ClientResult> CancelAsync(RequestOptions? options); |
| 1111 | public virtual ClientResult GetBatch(RequestOptions? options); |
| 1112 | public virtual Task<ClientResult> GetBatchAsync(RequestOptions? options); |
| 1113 | public static CreateBatchOperation Rehydrate(BatchClient client, ContinuationToken rehydrationToken, CancellationToken cancellationToken = default); |
| 1114 | public static Task<CreateBatchOperation> RehydrateAsync(BatchClient client, ContinuationToken rehydrationToken, CancellationToken cancellationToken = default); |
| 1115 | public override ClientResult UpdateStatus(RequestOptions? options = null); |
| 1116 | public override ValueTask<ClientResult> UpdateStatusAsync(RequestOptions? options = null); |
| 1117 | } |
| 1118 | } |
| 1119 | namespace OpenAI.Chat { |
| 1120 | public class AssistantChatMessage : ChatMessage, IJsonModel<AssistantChatMessage>, IPersistableModel<AssistantChatMessage> { |
| 1121 | public AssistantChatMessage(ChatCompletion chatCompletion); |
| 1122 | [Obsolete("This constructor is obsolete. Please use the constructor that takes an IEnumerable<ChatToolCall> parameter instead.")] |
| 1123 | public AssistantChatMessage(ChatFunctionCall functionCall); |
| 1124 | public AssistantChatMessage(params ChatMessageContentPart[] contentParts); |
| 1125 | public AssistantChatMessage(ChatOutputAudioReference outputAudioReference); |
| 1126 | public AssistantChatMessage(IEnumerable<ChatMessageContentPart> contentParts); |
| 1127 | public AssistantChatMessage(IEnumerable<ChatToolCall> toolCalls); |
| 1128 | public AssistantChatMessage(string content); |
| 1129 | [Obsolete("This property is obsolete. Please use ToolCalls instead.")] |
| 1130 | public ChatFunctionCall FunctionCall { get; set; } |
| 1131 | public ChatOutputAudioReference OutputAudioReference { get; set; } |
| 1132 | public string ParticipantName { get; set; } |
| 1133 | public string Refusal { get; set; } |
| 1134 | public IList<ChatToolCall> ToolCalls { get; } |
| 1135 | public new static explicit operator AssistantChatMessage(ClientResult result); |
| 1136 | public static implicit operator BinaryContent(AssistantChatMessage assistantChatMessage); |
| 1137 | } |
| 1138 | public class ChatAudioOptions : IJsonModel<ChatAudioOptions>, IPersistableModel<ChatAudioOptions> { |
| 1139 | public ChatAudioOptions(ChatOutputAudioVoice outputAudioVoice, ChatOutputAudioFormat outputAudioFormat); |
| 1140 | public ChatOutputAudioFormat OutputAudioFormat { get; } |
| 1141 | public ChatOutputAudioVoice OutputAudioVoice { get; } |
| 1142 | public static explicit operator ChatAudioOptions(ClientResult result); |
| 1143 | public static implicit operator BinaryContent(ChatAudioOptions chatAudioOptions); |
| 1144 | } |
| 1145 | public class ChatClient { |
| 1146 | protected ChatClient(); |
| 1147 | protected internal ChatClient(ClientPipeline pipeline, string model, OpenAIClientOptions options); |
| 1148 | public ChatClient(string model, ApiKeyCredential credential, OpenAIClientOptions options); |
| 1149 | public ChatClient(string model, ApiKeyCredential credential); |
| 1150 | public ChatClient(string model, string apiKey); |
| 1151 | public ClientPipeline Pipeline { get; } |
| 1152 | public virtual ClientResult<ChatCompletion> CompleteChat(params ChatMessage[] messages); |
| 1153 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1154 | public virtual ClientResult CompleteChat(BinaryContent content, RequestOptions options = null); |
| 1155 | public virtual ClientResult<ChatCompletion> CompleteChat(IEnumerable<ChatMessage> messages, ChatCompletionOptions options = null, CancellationToken cancellationToken = default); |
| 1156 | public virtual Task<ClientResult<ChatCompletion>> CompleteChatAsync(params ChatMessage[] messages); |
| 1157 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1158 | public virtual Task<ClientResult> CompleteChatAsync(BinaryContent content, RequestOptions options = null); |
| 1159 | public virtual Task<ClientResult<ChatCompletion>> CompleteChatAsync(IEnumerable<ChatMessage> messages, ChatCompletionOptions options = null, CancellationToken cancellationToken = default); |
| 1160 | public virtual CollectionResult<StreamingChatCompletionUpdate> CompleteChatStreaming(params ChatMessage[] messages); |
| 1161 | public virtual CollectionResult<StreamingChatCompletionUpdate> CompleteChatStreaming(IEnumerable<ChatMessage> messages, ChatCompletionOptions options = null, CancellationToken cancellationToken = default); |
| 1162 | public virtual AsyncCollectionResult<StreamingChatCompletionUpdate> CompleteChatStreamingAsync(params ChatMessage[] messages); |
| 1163 | public virtual AsyncCollectionResult<StreamingChatCompletionUpdate> CompleteChatStreamingAsync(IEnumerable<ChatMessage> messages, ChatCompletionOptions options = null, CancellationToken cancellationToken = default); |
| 1164 | } |
| 1165 | public class ChatCompletion : IJsonModel<ChatCompletion>, IPersistableModel<ChatCompletion> { |
| 1166 | public IReadOnlyList<ChatMessageAnnotation> Annotations { get; } |
| 1167 | public ChatMessageContent Content { get; } |
| 1168 | public IReadOnlyList<ChatTokenLogProbabilityDetails> ContentTokenLogProbabilities { get; } |
| 1169 | public DateTimeOffset CreatedAt { get; } |
| 1170 | public ChatFinishReason FinishReason { get; } |
| 1171 | [Obsolete("This property is obsolete. Please use ToolCalls instead.")] |
| 1172 | public ChatFunctionCall FunctionCall { get; } |
| 1173 | public string Id { get; } |
| 1174 | public string Model { get; } |
| 1175 | public ChatOutputAudio OutputAudio { get; } |
| 1176 | public string Refusal { get; } |
| 1177 | public IReadOnlyList<ChatTokenLogProbabilityDetails> RefusalTokenLogProbabilities { get; } |
| 1178 | public ChatMessageRole Role { get; } |
| 1179 | public string SystemFingerprint { get; } |
| 1180 | public IReadOnlyList<ChatToolCall> ToolCalls { get; } |
| 1181 | public ChatTokenUsage Usage { get; } |
| 1182 | public static explicit operator ChatCompletion(ClientResult result); |
| 1183 | public static implicit operator BinaryContent(ChatCompletion chatCompletion); |
| 1184 | } |
| 1185 | public class ChatCompletionOptions : IJsonModel<ChatCompletionOptions>, IPersistableModel<ChatCompletionOptions> { |
| 1186 | public bool? AllowParallelToolCalls { get; set; } |
| 1187 | public ChatAudioOptions AudioOptions { get; set; } |
| 1188 | public string EndUserId { get; set; } |
| 1189 | public float? FrequencyPenalty { get; set; } |
| 1190 | [Obsolete("This property is obsolete. Please use ToolChoice instead.")] |
| 1191 | public ChatFunctionChoice FunctionChoice { get; set; } |
| 1192 | [Obsolete("This property is obsolete. Please use Tools instead.")] |
| 1193 | public IList<ChatFunction> Functions { get; } |
| 1194 | public bool? IncludeLogProbabilities { get; set; } |
| 1195 | public IDictionary<int, int> LogitBiases { get; } |
| 1196 | public int? MaxOutputTokenCount { get; set; } |
| 1197 | public IDictionary<string, string> Metadata { get; } |
| 1198 | public ChatOutputPrediction OutputPrediction { get; set; } |
| 1199 | public float? PresencePenalty { get; set; } |
| 1200 | public ChatReasoningEffortLevel? ReasoningEffortLevel { get; set; } |
| 1201 | public ChatResponseFormat ResponseFormat { get; set; } |
| 1202 | public ChatResponseModalities ResponseModalities { get; set; } |
| 1203 | public long? Seed { get; set; } |
| 1204 | public IList<string> StopSequences { get; } |
| 1205 | public bool? StoredOutputEnabled { get; set; } |
| 1206 | public float? Temperature { get; set; } |
| 1207 | public ChatToolChoice ToolChoice { get; set; } |
| 1208 | public IList<ChatTool> Tools { get; } |
| 1209 | public int? TopLogProbabilityCount { get; set; } |
| 1210 | public float? TopP { get; set; } |
| 1211 | public ChatWebSearchOptions WebSearchOptions { get; set; } |
| 1212 | public static explicit operator ChatCompletionOptions(ClientResult result); |
| 1213 | public static implicit operator BinaryContent(ChatCompletionOptions chatCompletionOptions); |
| 1214 | } |
| 1215 | public enum ChatFinishReason { |
| 1216 | Stop = 0, |
| 1217 | Length = 1, |
| 1218 | ContentFilter = 2, |
| 1219 | ToolCalls = 3, |
| 1220 | FunctionCall = 4 |
| 1221 | } |
| 1222 | [Obsolete("This class is obsolete. Please use ChatTool instead.")] |
| 1223 | public class ChatFunction : IJsonModel<ChatFunction>, IPersistableModel<ChatFunction> { |
| 1224 | public ChatFunction(string functionName); |
| 1225 | public string FunctionDescription { get; set; } |
| 1226 | public string FunctionName { get; } |
| 1227 | public BinaryData FunctionParameters { get; set; } |
| 1228 | public static explicit operator ChatFunction(ClientResult result); |
| 1229 | public static implicit operator BinaryContent(ChatFunction chatFunction); |
| 1230 | } |
| 1231 | [Obsolete("This class is obsolete. Please use ChatToolCall instead.")] |
| 1232 | public class ChatFunctionCall : IJsonModel<ChatFunctionCall>, IPersistableModel<ChatFunctionCall> { |
| 1233 | public ChatFunctionCall(string functionName, BinaryData functionArguments); |
| 1234 | public BinaryData FunctionArguments { get; } |
| 1235 | public string FunctionName { get; } |
| 1236 | public static explicit operator ChatFunctionCall(ClientResult result); |
| 1237 | public static implicit operator BinaryContent(ChatFunctionCall chatFunctionCall); |
| 1238 | } |
| 1239 | [Obsolete("This class is obsolete. Please use ChatToolChoice instead.")] |
| 1240 | public class ChatFunctionChoice : IJsonModel<ChatFunctionChoice>, IPersistableModel<ChatFunctionChoice> { |
| 1241 | public static ChatFunctionChoice CreateAutoChoice(); |
| 1242 | public static ChatFunctionChoice CreateNamedChoice(string functionName); |
| 1243 | public static ChatFunctionChoice CreateNoneChoice(); |
| 1244 | public static explicit operator ChatFunctionChoice(ClientResult result); |
| 1245 | public static implicit operator BinaryContent(ChatFunctionChoice chatFunctionChoice); |
| 1246 | } |
| 1247 | public readonly partial struct ChatImageDetailLevel : IEquatable<ChatImageDetailLevel> { |
| 1248 | public ChatImageDetailLevel(string value); |
| 1249 | public static ChatImageDetailLevel Auto { get; } |
| 1250 | public static ChatImageDetailLevel High { get; } |
| 1251 | public static ChatImageDetailLevel Low { get; } |
| 1252 | public readonly bool Equals(ChatImageDetailLevel other); |
| 1253 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1254 | public override readonly bool Equals(object obj); |
| 1255 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1256 | public override readonly int GetHashCode(); |
| 1257 | public static bool operator ==(ChatImageDetailLevel left, ChatImageDetailLevel right); |
| 1258 | public static implicit operator ChatImageDetailLevel(string value); |
| 1259 | public static bool operator !=(ChatImageDetailLevel left, ChatImageDetailLevel right); |
| 1260 | public override readonly string ToString(); |
| 1261 | } |
| 1262 | public readonly partial struct ChatInputAudioFormat : IEquatable<ChatInputAudioFormat> { |
| 1263 | public ChatInputAudioFormat(string value); |
| 1264 | public static ChatInputAudioFormat Mp3 { get; } |
| 1265 | public static ChatInputAudioFormat Wav { get; } |
| 1266 | public readonly bool Equals(ChatInputAudioFormat other); |
| 1267 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1268 | public override readonly bool Equals(object obj); |
| 1269 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1270 | public override readonly int GetHashCode(); |
| 1271 | public static bool operator ==(ChatInputAudioFormat left, ChatInputAudioFormat right); |
| 1272 | public static implicit operator ChatInputAudioFormat(string value); |
| 1273 | public static bool operator !=(ChatInputAudioFormat left, ChatInputAudioFormat right); |
| 1274 | public override readonly string ToString(); |
| 1275 | } |
| 1276 | public class ChatInputTokenUsageDetails : IJsonModel<ChatInputTokenUsageDetails>, IPersistableModel<ChatInputTokenUsageDetails> { |
| 1277 | public int AudioTokenCount { get; } |
| 1278 | public int CachedTokenCount { get; } |
| 1279 | public static explicit operator ChatInputTokenUsageDetails(ClientResult result); |
| 1280 | public static implicit operator BinaryContent(ChatInputTokenUsageDetails chatInputTokenUsageDetails); |
| 1281 | } |
| 1282 | public class ChatMessage : IJsonModel<ChatMessage>, IPersistableModel<ChatMessage> { |
| 1283 | public ChatMessageContent Content { get; } |
| 1284 | public static AssistantChatMessage CreateAssistantMessage(ChatCompletion chatCompletion); |
| 1285 | public static AssistantChatMessage CreateAssistantMessage(ChatFunctionCall functionCall); |
| 1286 | public static AssistantChatMessage CreateAssistantMessage(params ChatMessageContentPart[] contentParts); |
| 1287 | public static AssistantChatMessage CreateAssistantMessage(ChatOutputAudioReference outputAudioReference); |
| 1288 | public static AssistantChatMessage CreateAssistantMessage(IEnumerable<ChatMessageContentPart> contentParts); |
| 1289 | public static AssistantChatMessage CreateAssistantMessage(IEnumerable<ChatToolCall> toolCalls); |
| 1290 | public static AssistantChatMessage CreateAssistantMessage(string content); |
| 1291 | public static DeveloperChatMessage CreateDeveloperMessage(params ChatMessageContentPart[] contentParts); |
| 1292 | public static DeveloperChatMessage CreateDeveloperMessage(IEnumerable<ChatMessageContentPart> contentParts); |
| 1293 | public static DeveloperChatMessage CreateDeveloperMessage(string content); |
| 1294 | [Obsolete("This method is obsolete. Please use CreateToolMessage instead.")] |
| 1295 | public static FunctionChatMessage CreateFunctionMessage(string functionName, string content); |
| 1296 | public static SystemChatMessage CreateSystemMessage(params ChatMessageContentPart[] contentParts); |
| 1297 | public static SystemChatMessage CreateSystemMessage(IEnumerable<ChatMessageContentPart> contentParts); |
| 1298 | public static SystemChatMessage CreateSystemMessage(string content); |
| 1299 | public static ToolChatMessage CreateToolMessage(string toolCallId, params ChatMessageContentPart[] contentParts); |
| 1300 | public static ToolChatMessage CreateToolMessage(string toolCallId, IEnumerable<ChatMessageContentPart> contentParts); |
| 1301 | public static ToolChatMessage CreateToolMessage(string toolCallId, string content); |
| 1302 | public static UserChatMessage CreateUserMessage(params ChatMessageContentPart[] contentParts); |
| 1303 | public static UserChatMessage CreateUserMessage(IEnumerable<ChatMessageContentPart> contentParts); |
| 1304 | public static UserChatMessage CreateUserMessage(string content); |
| 1305 | public static explicit operator ChatMessage(ClientResult result); |
| 1306 | public static implicit operator BinaryContent(ChatMessage chatMessage); |
| 1307 | public static implicit operator ChatMessage(string content); |
| 1308 | } |
| 1309 | public class ChatMessageAnnotation : IJsonModel<ChatMessageAnnotation>, IPersistableModel<ChatMessageAnnotation> { |
| 1310 | public int EndIndex { get; } |
| 1311 | public int StartIndex { get; } |
| 1312 | public string WebResourceTitle { get; } |
| 1313 | public Uri WebResourceUri { get; } |
| 1314 | public static explicit operator ChatMessageAnnotation(ClientResult result); |
| 1315 | public static implicit operator BinaryContent(ChatMessageAnnotation chatMessageAnnotation); |
| 1316 | } |
| 1317 | public class ChatMessageContent : ObjectModel.Collection<ChatMessageContentPart> { |
| 1318 | public ChatMessageContent(); |
| 1319 | public ChatMessageContent(params ChatMessageContentPart[] contentParts); |
| 1320 | public ChatMessageContent(IEnumerable<ChatMessageContentPart> contentParts); |
| 1321 | public ChatMessageContent(string content); |
| 1322 | } |
| 1323 | public class ChatMessageContentPart : IJsonModel<ChatMessageContentPart>, IPersistableModel<ChatMessageContentPart> { |
| 1324 | public BinaryData FileBytes { get; } |
| 1325 | public string FileBytesMediaType { get; } |
| 1326 | public string FileId { get; } |
| 1327 | public string Filename { get; } |
| 1328 | public BinaryData ImageBytes { get; } |
| 1329 | public string ImageBytesMediaType { get; } |
| 1330 | public ChatImageDetailLevel? ImageDetailLevel { get; } |
| 1331 | public Uri ImageUri { get; } |
| 1332 | public BinaryData InputAudioBytes { get; } |
| 1333 | public ChatInputAudioFormat? InputAudioFormat { get; } |
| 1334 | public ChatMessageContentPartKind Kind { get; } |
| 1335 | public string Refusal { get; } |
| 1336 | public string Text { get; } |
| 1337 | public static ChatMessageContentPart CreateFilePart(BinaryData fileBytes, string fileBytesMediaType, string filename); |
| 1338 | public static ChatMessageContentPart CreateFilePart(string fileId); |
| 1339 | public static ChatMessageContentPart CreateImagePart(BinaryData imageBytes, string imageBytesMediaType, ChatImageDetailLevel? imageDetailLevel = null); |
| 1340 | public static ChatMessageContentPart CreateImagePart(Uri imageUri, ChatImageDetailLevel? imageDetailLevel = null); |
| 1341 | public static ChatMessageContentPart CreateInputAudioPart(BinaryData inputAudioBytes, ChatInputAudioFormat inputAudioFormat); |
| 1342 | public static ChatMessageContentPart CreateRefusalPart(string refusal); |
| 1343 | public static ChatMessageContentPart CreateTextPart(string text); |
| 1344 | public static explicit operator ChatMessageContentPart(ClientResult result); |
| 1345 | public static implicit operator BinaryContent(ChatMessageContentPart chatMessageContentPart); |
| 1346 | public static implicit operator ChatMessageContentPart(string text); |
| 1347 | } |
| 1348 | public enum ChatMessageContentPartKind { |
| 1349 | Text = 0, |
| 1350 | Refusal = 1, |
| 1351 | Image = 2, |
| 1352 | InputAudio = 3, |
| 1353 | File = 4 |
| 1354 | } |
| 1355 | public enum ChatMessageRole { |
| 1356 | System = 0, |
| 1357 | User = 1, |
| 1358 | Assistant = 2, |
| 1359 | Tool = 3, |
| 1360 | Function = 4, |
| 1361 | Developer = 5 |
| 1362 | } |
| 1363 | public class ChatOutputAudio : IJsonModel<ChatOutputAudio>, IPersistableModel<ChatOutputAudio> { |
| 1364 | public BinaryData AudioBytes { get; } |
| 1365 | public DateTimeOffset ExpiresAt { get; } |
| 1366 | public string Id { get; } |
| 1367 | public string Transcript { get; } |
| 1368 | public static explicit operator ChatOutputAudio(ClientResult result); |
| 1369 | public static implicit operator BinaryContent(ChatOutputAudio chatOutputAudio); |
| 1370 | } |
| 1371 | public readonly partial struct ChatOutputAudioFormat : IEquatable<ChatOutputAudioFormat> { |
| 1372 | public ChatOutputAudioFormat(string value); |
| 1373 | public static ChatOutputAudioFormat Flac { get; } |
| 1374 | public static ChatOutputAudioFormat Mp3 { get; } |
| 1375 | public static ChatOutputAudioFormat Opus { get; } |
| 1376 | public static ChatOutputAudioFormat Pcm16 { get; } |
| 1377 | public static ChatOutputAudioFormat Wav { get; } |
| 1378 | public readonly bool Equals(ChatOutputAudioFormat other); |
| 1379 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1380 | public override readonly bool Equals(object obj); |
| 1381 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1382 | public override readonly int GetHashCode(); |
| 1383 | public static bool operator ==(ChatOutputAudioFormat left, ChatOutputAudioFormat right); |
| 1384 | public static implicit operator ChatOutputAudioFormat(string value); |
| 1385 | public static bool operator !=(ChatOutputAudioFormat left, ChatOutputAudioFormat right); |
| 1386 | public override readonly string ToString(); |
| 1387 | } |
| 1388 | public class ChatOutputAudioReference : IJsonModel<ChatOutputAudioReference>, IPersistableModel<ChatOutputAudioReference> { |
| 1389 | public ChatOutputAudioReference(string id); |
| 1390 | public string Id { get; } |
| 1391 | public static explicit operator ChatOutputAudioReference(ClientResult result); |
| 1392 | public static implicit operator BinaryContent(ChatOutputAudioReference chatOutputAudioReference); |
| 1393 | } |
| 1394 | public readonly partial struct ChatOutputAudioVoice : IEquatable<ChatOutputAudioVoice> { |
| 1395 | public ChatOutputAudioVoice(string value); |
| 1396 | public static ChatOutputAudioVoice Alloy { get; } |
| 1397 | public static ChatOutputAudioVoice Ash { get; } |
| 1398 | public static ChatOutputAudioVoice Ballad { get; } |
| 1399 | public static ChatOutputAudioVoice Coral { get; } |
| 1400 | public static ChatOutputAudioVoice Echo { get; } |
| 1401 | public static ChatOutputAudioVoice Sage { get; } |
| 1402 | public static ChatOutputAudioVoice Shimmer { get; } |
| 1403 | public static ChatOutputAudioVoice Verse { get; } |
| 1404 | public readonly bool Equals(ChatOutputAudioVoice other); |
| 1405 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1406 | public override readonly bool Equals(object obj); |
| 1407 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1408 | public override readonly int GetHashCode(); |
| 1409 | public static bool operator ==(ChatOutputAudioVoice left, ChatOutputAudioVoice right); |
| 1410 | public static implicit operator ChatOutputAudioVoice(string value); |
| 1411 | public static bool operator !=(ChatOutputAudioVoice left, ChatOutputAudioVoice right); |
| 1412 | public override readonly string ToString(); |
| 1413 | } |
| 1414 | public class ChatOutputPrediction : IJsonModel<ChatOutputPrediction>, IPersistableModel<ChatOutputPrediction> { |
| 1415 | public static ChatOutputPrediction CreateStaticContentPrediction(IEnumerable<ChatMessageContentPart> staticContentParts); |
| 1416 | public static ChatOutputPrediction CreateStaticContentPrediction(string staticContent); |
| 1417 | public static explicit operator ChatOutputPrediction(ClientResult result); |
| 1418 | public static implicit operator BinaryContent(ChatOutputPrediction chatOutputPrediction); |
| 1419 | } |
| 1420 | public class ChatOutputTokenUsageDetails : IJsonModel<ChatOutputTokenUsageDetails>, IPersistableModel<ChatOutputTokenUsageDetails> { |
| 1421 | public int AcceptedPredictionTokenCount { get; } |
| 1422 | public int AudioTokenCount { get; } |
| 1423 | public int ReasoningTokenCount { get; } |
| 1424 | public int RejectedPredictionTokenCount { get; } |
| 1425 | public static explicit operator ChatOutputTokenUsageDetails(ClientResult result); |
| 1426 | public static implicit operator BinaryContent(ChatOutputTokenUsageDetails chatOutputTokenUsageDetails); |
| 1427 | } |
| 1428 | public readonly partial struct ChatReasoningEffortLevel : IEquatable<ChatReasoningEffortLevel> { |
| 1429 | public ChatReasoningEffortLevel(string value); |
| 1430 | public static ChatReasoningEffortLevel High { get; } |
| 1431 | public static ChatReasoningEffortLevel Low { get; } |
| 1432 | public static ChatReasoningEffortLevel Medium { get; } |
| 1433 | public readonly bool Equals(ChatReasoningEffortLevel other); |
| 1434 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1435 | public override readonly bool Equals(object obj); |
| 1436 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1437 | public override readonly int GetHashCode(); |
| 1438 | public static bool operator ==(ChatReasoningEffortLevel left, ChatReasoningEffortLevel right); |
| 1439 | public static implicit operator ChatReasoningEffortLevel(string value); |
| 1440 | public static bool operator !=(ChatReasoningEffortLevel left, ChatReasoningEffortLevel right); |
| 1441 | public override readonly string ToString(); |
| 1442 | } |
| 1443 | public class ChatResponseFormat : IJsonModel<ChatResponseFormat>, IPersistableModel<ChatResponseFormat> { |
| 1444 | public static ChatResponseFormat CreateJsonObjectFormat(); |
| 1445 | public static ChatResponseFormat CreateJsonSchemaFormat(string jsonSchemaFormatName, BinaryData jsonSchema, string jsonSchemaFormatDescription = null, bool? jsonSchemaIsStrict = null); |
| 1446 | public static ChatResponseFormat CreateTextFormat(); |
| 1447 | public static explicit operator ChatResponseFormat(ClientResult result); |
| 1448 | public static implicit operator BinaryContent(ChatResponseFormat chatResponseFormat); |
| 1449 | } |
| 1450 | [Flags] |
| 1451 | public enum ChatResponseModalities { |
| 1452 | Default = 0, |
| 1453 | Text = 1, |
| 1454 | Audio = 2 |
| 1455 | } |
| 1456 | public class ChatTokenLogProbabilityDetails : IJsonModel<ChatTokenLogProbabilityDetails>, IPersistableModel<ChatTokenLogProbabilityDetails> { |
| 1457 | public float LogProbability { get; } |
| 1458 | public string Token { get; } |
| 1459 | public IReadOnlyList<ChatTokenTopLogProbabilityDetails> TopLogProbabilities { get; } |
| 1460 | public ReadOnlyMemory<byte>? Utf8Bytes { get; } |
| 1461 | public static explicit operator ChatTokenLogProbabilityDetails(ClientResult result); |
| 1462 | public static implicit operator BinaryContent(ChatTokenLogProbabilityDetails chatTokenLogProbabilityDetails); |
| 1463 | } |
| 1464 | public class ChatTokenTopLogProbabilityDetails : IJsonModel<ChatTokenTopLogProbabilityDetails>, IPersistableModel<ChatTokenTopLogProbabilityDetails> { |
| 1465 | public float LogProbability { get; } |
| 1466 | public string Token { get; } |
| 1467 | public ReadOnlyMemory<byte>? Utf8Bytes { get; } |
| 1468 | public static explicit operator ChatTokenTopLogProbabilityDetails(ClientResult result); |
| 1469 | public static implicit operator BinaryContent(ChatTokenTopLogProbabilityDetails chatTokenTopLogProbabilityDetails); |
| 1470 | } |
| 1471 | public class ChatTokenUsage : IJsonModel<ChatTokenUsage>, IPersistableModel<ChatTokenUsage> { |
| 1472 | public int InputTokenCount { get; } |
| 1473 | public ChatInputTokenUsageDetails InputTokenDetails { get; } |
| 1474 | public int OutputTokenCount { get; } |
| 1475 | public ChatOutputTokenUsageDetails OutputTokenDetails { get; } |
| 1476 | public int TotalTokenCount { get; } |
| 1477 | public static explicit operator ChatTokenUsage(ClientResult result); |
| 1478 | public static implicit operator BinaryContent(ChatTokenUsage chatTokenUsage); |
| 1479 | } |
| 1480 | public class ChatTool : IJsonModel<ChatTool>, IPersistableModel<ChatTool> { |
| 1481 | public string FunctionDescription { get; } |
| 1482 | public string FunctionName { get; } |
| 1483 | public BinaryData FunctionParameters { get; } |
| 1484 | public bool? FunctionSchemaIsStrict { get; } |
| 1485 | public ChatToolKind Kind { get; } |
| 1486 | public static ChatTool CreateFunctionTool(string functionName, string functionDescription = null, BinaryData functionParameters = null, bool? functionSchemaIsStrict = null); |
| 1487 | public static explicit operator ChatTool(ClientResult result); |
| 1488 | public static implicit operator BinaryContent(ChatTool chatTool); |
| 1489 | } |
| 1490 | public class ChatToolCall : IJsonModel<ChatToolCall>, IPersistableModel<ChatToolCall> { |
| 1491 | public BinaryData FunctionArguments { get; } |
| 1492 | public string FunctionName { get; } |
| 1493 | public string Id { get; set; } |
| 1494 | public ChatToolCallKind Kind { get; } |
| 1495 | public static ChatToolCall CreateFunctionToolCall(string id, string functionName, BinaryData functionArguments); |
| 1496 | public static explicit operator ChatToolCall(ClientResult result); |
| 1497 | public static implicit operator BinaryContent(ChatToolCall chatToolCall); |
| 1498 | } |
| 1499 | public enum ChatToolCallKind { |
| 1500 | Function = 0 |
| 1501 | } |
| 1502 | public class ChatToolChoice : IJsonModel<ChatToolChoice>, IPersistableModel<ChatToolChoice> { |
| 1503 | public static ChatToolChoice CreateAutoChoice(); |
| 1504 | public static ChatToolChoice CreateFunctionChoice(string functionName); |
| 1505 | public static ChatToolChoice CreateNoneChoice(); |
| 1506 | public static ChatToolChoice CreateRequiredChoice(); |
| 1507 | public static explicit operator ChatToolChoice(ClientResult result); |
| 1508 | public static implicit operator BinaryContent(ChatToolChoice chatToolChoice); |
| 1509 | } |
| 1510 | public enum ChatToolKind { |
| 1511 | Function = 0 |
| 1512 | } |
| 1513 | public class ChatWebSearchOptions : IJsonModel<ChatWebSearchOptions>, IPersistableModel<ChatWebSearchOptions> { |
| 1514 | public static explicit operator ChatWebSearchOptions(ClientResult result); |
| 1515 | public static implicit operator BinaryContent(ChatWebSearchOptions chatWebSearchOptions); |
| 1516 | } |
| 1517 | public class DeveloperChatMessage : ChatMessage, IJsonModel<DeveloperChatMessage>, IPersistableModel<DeveloperChatMessage> { |
| 1518 | public DeveloperChatMessage(params ChatMessageContentPart[] contentParts); |
| 1519 | public DeveloperChatMessage(IEnumerable<ChatMessageContentPart> contentParts); |
| 1520 | public DeveloperChatMessage(string content); |
| 1521 | public string ParticipantName { get; set; } |
| 1522 | public new static explicit operator DeveloperChatMessage(ClientResult result); |
| 1523 | public static implicit operator BinaryContent(DeveloperChatMessage developerChatMessage); |
| 1524 | } |
| 1525 | [Obsolete("This class is obsolete. Please use ToolChatMessage instead.")] |
| 1526 | public class FunctionChatMessage : ChatMessage, IJsonModel<FunctionChatMessage>, IPersistableModel<FunctionChatMessage> { |
| 1527 | public FunctionChatMessage(string functionName, string content); |
| 1528 | public string FunctionName { get; } |
| 1529 | public new static explicit operator FunctionChatMessage(ClientResult result); |
| 1530 | public static implicit operator BinaryContent(FunctionChatMessage functionChatMessage); |
| 1531 | } |
| 1532 | public static class OpenAIChatModelFactory { |
| 1533 | public static ChatCompletion ChatCompletion(string id = null, ChatFinishReason finishReason = ChatFinishReason.Stop, ChatMessageContent content = null, string refusal = null, IEnumerable<ChatToolCall> toolCalls = null, ChatMessageRole role = ChatMessageRole.System, ChatFunctionCall functionCall = null, IEnumerable<ChatTokenLogProbabilityDetails> contentTokenLogProbabilities = null, IEnumerable<ChatTokenLogProbabilityDetails> refusalTokenLogProbabilities = null, DateTimeOffset createdAt = default, string model = null, string systemFingerprint = null, ChatTokenUsage usage = null, ChatOutputAudio outputAudio = null, IEnumerable<ChatMessageAnnotation> messageAnnotations = null); |
| 1534 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1535 | public static ChatCompletion ChatCompletion(string id, ChatFinishReason finishReason, ChatMessageContent content, string refusal, IEnumerable<ChatToolCall> toolCalls, ChatMessageRole role, ChatFunctionCall functionCall, IEnumerable<ChatTokenLogProbabilityDetails> contentTokenLogProbabilities, IEnumerable<ChatTokenLogProbabilityDetails> refusalTokenLogProbabilities, DateTimeOffset createdAt, string model, string systemFingerprint, ChatTokenUsage usage); |
| 1536 | public static ChatInputTokenUsageDetails ChatInputTokenUsageDetails(int audioTokenCount = 0, int cachedTokenCount = 0); |
| 1537 | public static ChatMessageAnnotation ChatMessageAnnotation(int startIndex = 0, int endIndex = 0, Uri webResourceUri = null, string webResourceTitle = null); |
| 1538 | public static ChatOutputAudio ChatOutputAudio(BinaryData audioBytes, string id = null, string transcript = null, DateTimeOffset expiresAt = default); |
| 1539 | public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reasoningTokenCount = 0, int audioTokenCount = 0, int acceptedPredictionTokenCount = 0, int rejectedPredictionTokenCount = 0); |
| 1540 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1541 | public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reasoningTokenCount, int audioTokenCount); |
| 1542 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1543 | public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reasoningTokenCount); |
| 1544 | public static ChatTokenLogProbabilityDetails ChatTokenLogProbabilityDetails(string token = null, float logProbability = 0, ReadOnlyMemory<byte>? utf8Bytes = null, IEnumerable<ChatTokenTopLogProbabilityDetails> topLogProbabilities = null); |
| 1545 | public static ChatTokenTopLogProbabilityDetails ChatTokenTopLogProbabilityDetails(string token = null, float logProbability = 0, ReadOnlyMemory<byte>? utf8Bytes = null); |
| 1546 | public static ChatTokenUsage ChatTokenUsage(int outputTokenCount = 0, int inputTokenCount = 0, int totalTokenCount = 0, ChatOutputTokenUsageDetails outputTokenDetails = null, ChatInputTokenUsageDetails inputTokenDetails = null); |
| 1547 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1548 | public static ChatTokenUsage ChatTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount, ChatOutputTokenUsageDetails outputTokenDetails); |
| 1549 | public static StreamingChatCompletionUpdate StreamingChatCompletionUpdate(string completionId = null, ChatMessageContent contentUpdate = null, StreamingChatFunctionCallUpdate functionCallUpdate = null, IEnumerable<StreamingChatToolCallUpdate> toolCallUpdates = null, ChatMessageRole? role = null, string refusalUpdate = null, IEnumerable<ChatTokenLogProbabilityDetails> contentTokenLogProbabilities = null, IEnumerable<ChatTokenLogProbabilityDetails> refusalTokenLogProbabilities = null, ChatFinishReason? finishReason = null, DateTimeOffset createdAt = default, string model = null, string systemFingerprint = null, ChatTokenUsage usage = null, StreamingChatOutputAudioUpdate outputAudioUpdate = null); |
| 1550 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1551 | public static StreamingChatCompletionUpdate StreamingChatCompletionUpdate(string completionId, ChatMessageContent contentUpdate, StreamingChatFunctionCallUpdate functionCallUpdate, IEnumerable<StreamingChatToolCallUpdate> toolCallUpdates, ChatMessageRole? role, string refusalUpdate, IEnumerable<ChatTokenLogProbabilityDetails> contentTokenLogProbabilities, IEnumerable<ChatTokenLogProbabilityDetails> refusalTokenLogProbabilities, ChatFinishReason? finishReason, DateTimeOffset createdAt, string model, string systemFingerprint, ChatTokenUsage usage); |
| 1552 | [Obsolete("This class is obsolete. Please use StreamingChatToolCallUpdate instead.")] |
| 1553 | public static StreamingChatFunctionCallUpdate StreamingChatFunctionCallUpdate(string functionName = null, BinaryData functionArgumentsUpdate = null); |
| 1554 | public static StreamingChatOutputAudioUpdate StreamingChatOutputAudioUpdate(string id = null, DateTimeOffset? expiresAt = null, string transcriptUpdate = null, BinaryData audioBytesUpdate = null); |
| 1555 | public static StreamingChatToolCallUpdate StreamingChatToolCallUpdate(int index = 0, string toolCallId = null, ChatToolCallKind kind = ChatToolCallKind.Function, string functionName = null, BinaryData functionArgumentsUpdate = null); |
| 1556 | } |
| 1557 | public class StreamingChatCompletionUpdate : IJsonModel<StreamingChatCompletionUpdate>, IPersistableModel<StreamingChatCompletionUpdate> { |
| 1558 | public string CompletionId { get; } |
| 1559 | public IReadOnlyList<ChatTokenLogProbabilityDetails> ContentTokenLogProbabilities { get; } |
| 1560 | public ChatMessageContent ContentUpdate { get; } |
| 1561 | public DateTimeOffset CreatedAt { get; } |
| 1562 | public ChatFinishReason? FinishReason { get; } |
| 1563 | [Obsolete("This property is obsolete. Please use ToolCallUpdates instead.")] |
| 1564 | public StreamingChatFunctionCallUpdate FunctionCallUpdate { get; } |
| 1565 | public string Model { get; } |
| 1566 | public StreamingChatOutputAudioUpdate OutputAudioUpdate { get; } |
| 1567 | public IReadOnlyList<ChatTokenLogProbabilityDetails> RefusalTokenLogProbabilities { get; } |
| 1568 | public string RefusalUpdate { get; } |
| 1569 | public ChatMessageRole? Role { get; } |
| 1570 | public string SystemFingerprint { get; } |
| 1571 | public IReadOnlyList<StreamingChatToolCallUpdate> ToolCallUpdates { get; } |
| 1572 | public ChatTokenUsage Usage { get; } |
| 1573 | public static explicit operator StreamingChatCompletionUpdate(ClientResult result); |
| 1574 | public static implicit operator BinaryContent(StreamingChatCompletionUpdate streamingChatCompletionUpdate); |
| 1575 | } |
| 1576 | [Obsolete("This class is obsolete. Please use StreamingChatToolCallUpdate instead.")] |
| 1577 | public class StreamingChatFunctionCallUpdate : IJsonModel<StreamingChatFunctionCallUpdate>, IPersistableModel<StreamingChatFunctionCallUpdate> { |
| 1578 | public BinaryData FunctionArgumentsUpdate { get; } |
| 1579 | public string FunctionName { get; } |
| 1580 | public static explicit operator StreamingChatFunctionCallUpdate(ClientResult result); |
| 1581 | public static implicit operator BinaryContent(StreamingChatFunctionCallUpdate streamingChatFunctionCallUpdate); |
| 1582 | } |
| 1583 | public class StreamingChatOutputAudioUpdate : IJsonModel<StreamingChatOutputAudioUpdate>, IPersistableModel<StreamingChatOutputAudioUpdate> { |
| 1584 | public BinaryData AudioBytesUpdate { get; } |
| 1585 | public DateTimeOffset? ExpiresAt { get; } |
| 1586 | public string Id { get; } |
| 1587 | public string TranscriptUpdate { get; } |
| 1588 | public static explicit operator StreamingChatOutputAudioUpdate(ClientResult result); |
| 1589 | public static implicit operator BinaryContent(StreamingChatOutputAudioUpdate streamingChatOutputAudioUpdate); |
| 1590 | } |
| 1591 | public class StreamingChatToolCallUpdate : IJsonModel<StreamingChatToolCallUpdate>, IPersistableModel<StreamingChatToolCallUpdate> { |
| 1592 | public BinaryData FunctionArgumentsUpdate { get; } |
| 1593 | public string FunctionName { get; } |
| 1594 | public int Index { get; } |
| 1595 | public ChatToolCallKind Kind { get; } |
| 1596 | public string ToolCallId { get; } |
| 1597 | public static explicit operator StreamingChatToolCallUpdate(ClientResult result); |
| 1598 | public static implicit operator BinaryContent(StreamingChatToolCallUpdate streamingChatToolCallUpdate); |
| 1599 | } |
| 1600 | public class SystemChatMessage : ChatMessage, IJsonModel<SystemChatMessage>, IPersistableModel<SystemChatMessage> { |
| 1601 | public SystemChatMessage(params ChatMessageContentPart[] contentParts); |
| 1602 | public SystemChatMessage(IEnumerable<ChatMessageContentPart> contentParts); |
| 1603 | public SystemChatMessage(string content); |
| 1604 | public string ParticipantName { get; set; } |
| 1605 | public new static explicit operator SystemChatMessage(ClientResult result); |
| 1606 | public static implicit operator BinaryContent(SystemChatMessage systemChatMessage); |
| 1607 | } |
| 1608 | public class ToolChatMessage : ChatMessage, IJsonModel<ToolChatMessage>, IPersistableModel<ToolChatMessage> { |
| 1609 | public ToolChatMessage(string toolCallId, params ChatMessageContentPart[] contentParts); |
| 1610 | public ToolChatMessage(string toolCallId, IEnumerable<ChatMessageContentPart> contentParts); |
| 1611 | public ToolChatMessage(string toolCallId, string content); |
| 1612 | public string ToolCallId { get; } |
| 1613 | public new static explicit operator ToolChatMessage(ClientResult result); |
| 1614 | public static implicit operator BinaryContent(ToolChatMessage toolChatMessage); |
| 1615 | } |
| 1616 | public class UserChatMessage : ChatMessage, IJsonModel<UserChatMessage>, IPersistableModel<UserChatMessage> { |
| 1617 | public UserChatMessage(params ChatMessageContentPart[] contentParts); |
| 1618 | public UserChatMessage(IEnumerable<ChatMessageContentPart> contentParts); |
| 1619 | public UserChatMessage(string content); |
| 1620 | public string ParticipantName { get; set; } |
| 1621 | public new static explicit operator UserChatMessage(ClientResult result); |
| 1622 | public static implicit operator BinaryContent(UserChatMessage userChatMessage); |
| 1623 | } |
| 1624 | } |
| 1625 | namespace OpenAI.Embeddings { |
| 1626 | public class EmbeddingClient { |
| 1627 | protected EmbeddingClient(); |
| 1628 | protected internal EmbeddingClient(ClientPipeline pipeline, string model, OpenAIClientOptions options); |
| 1629 | public EmbeddingClient(string model, ApiKeyCredential credential, OpenAIClientOptions options); |
| 1630 | public EmbeddingClient(string model, ApiKeyCredential credential); |
| 1631 | public EmbeddingClient(string model, string apiKey); |
| 1632 | public ClientPipeline Pipeline { get; } |
| 1633 | public virtual ClientResult<OpenAIEmbedding> GenerateEmbedding(string input, EmbeddingGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 1634 | public virtual Task<ClientResult<OpenAIEmbedding>> GenerateEmbeddingAsync(string input, EmbeddingGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 1635 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1636 | public virtual ClientResult GenerateEmbeddings(BinaryContent content, RequestOptions options = null); |
| 1637 | public virtual ClientResult<OpenAIEmbeddingCollection> GenerateEmbeddings(IEnumerable<ReadOnlyMemory<int>> inputs, EmbeddingGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 1638 | public virtual ClientResult<OpenAIEmbeddingCollection> GenerateEmbeddings(IEnumerable<string> inputs, EmbeddingGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 1639 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1640 | public virtual Task<ClientResult> GenerateEmbeddingsAsync(BinaryContent content, RequestOptions options = null); |
| 1641 | public virtual Task<ClientResult<OpenAIEmbeddingCollection>> GenerateEmbeddingsAsync(IEnumerable<ReadOnlyMemory<int>> inputs, EmbeddingGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 1642 | public virtual Task<ClientResult<OpenAIEmbeddingCollection>> GenerateEmbeddingsAsync(IEnumerable<string> inputs, EmbeddingGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 1643 | } |
| 1644 | public class EmbeddingGenerationOptions : IJsonModel<EmbeddingGenerationOptions>, IPersistableModel<EmbeddingGenerationOptions> { |
| 1645 | public int? Dimensions { get; set; } |
| 1646 | public string EndUserId { get; set; } |
| 1647 | public static explicit operator EmbeddingGenerationOptions(ClientResult result); |
| 1648 | public static implicit operator BinaryContent(EmbeddingGenerationOptions embeddingGenerationOptions); |
| 1649 | } |
| 1650 | public class EmbeddingTokenUsage : IJsonModel<EmbeddingTokenUsage>, IPersistableModel<EmbeddingTokenUsage> { |
| 1651 | public int InputTokenCount { get; } |
| 1652 | public int TotalTokenCount { get; } |
| 1653 | public static explicit operator EmbeddingTokenUsage(ClientResult result); |
| 1654 | public static implicit operator BinaryContent(EmbeddingTokenUsage embeddingTokenUsage); |
| 1655 | } |
| 1656 | public class OpenAIEmbedding : IJsonModel<OpenAIEmbedding>, IPersistableModel<OpenAIEmbedding> { |
| 1657 | public int Index { get; } |
| 1658 | public static explicit operator OpenAIEmbedding(ClientResult result); |
| 1659 | public static implicit operator BinaryContent(OpenAIEmbedding openAIEmbedding); |
| 1660 | public ReadOnlyMemory<float> ToFloats(); |
| 1661 | } |
| 1662 | public class OpenAIEmbeddingCollection : ObjectModel.ReadOnlyCollection<OpenAIEmbedding>, IJsonModel<OpenAIEmbeddingCollection>, IPersistableModel<OpenAIEmbeddingCollection> { |
| 1663 | public string Model { get; } |
| 1664 | public EmbeddingTokenUsage Usage { get; } |
| 1665 | public static explicit operator OpenAIEmbeddingCollection(ClientResult result); |
| 1666 | public static implicit operator BinaryContent(OpenAIEmbeddingCollection openAIEmbeddingCollection); |
| 1667 | } |
| 1668 | public static class OpenAIEmbeddingsModelFactory { |
| 1669 | public static EmbeddingTokenUsage EmbeddingTokenUsage(int inputTokenCount = 0, int totalTokenCount = 0); |
| 1670 | public static OpenAIEmbedding OpenAIEmbedding(int index = 0, IEnumerable<float> vector = null); |
| 1671 | public static OpenAIEmbeddingCollection OpenAIEmbeddingCollection(IEnumerable<OpenAIEmbedding> items = null, string model = null, EmbeddingTokenUsage usage = null); |
| 1672 | } |
| 1673 | } |
| 1674 | namespace OpenAI.Files { |
| 1675 | public class FileDeletionResult : IJsonModel<FileDeletionResult>, IPersistableModel<FileDeletionResult> { |
| 1676 | public bool Deleted { get; } |
| 1677 | public string FileId { get; } |
| 1678 | public static explicit operator FileDeletionResult(ClientResult result); |
| 1679 | public static implicit operator BinaryContent(FileDeletionResult fileDeletionResult); |
| 1680 | } |
| 1681 | public enum FilePurpose { |
| 1682 | Assistants = 0, |
| 1683 | AssistantsOutput = 1, |
| 1684 | Batch = 2, |
| 1685 | BatchOutput = 3, |
| 1686 | FineTune = 4, |
| 1687 | FineTuneResults = 5, |
| 1688 | Vision = 6, |
| 1689 | UserData = 7, |
| 1690 | Evaluations = 8 |
| 1691 | } |
| 1692 | [Obsolete("This struct is obsolete. If this is a fine-tuning training file, it may take some time to process after it has been uploaded. While the file is processing, you can still create a fine-tuning job but it will not start until the file processing has completed.")] |
| 1693 | public enum FileStatus { |
| 1694 | Uploaded = 0, |
| 1695 | Processed = 1, |
| 1696 | Error = 2 |
| 1697 | } |
| 1698 | public readonly partial struct FileUploadPurpose : IEquatable<FileUploadPurpose> { |
| 1699 | public FileUploadPurpose(string value); |
| 1700 | public static FileUploadPurpose Assistants { get; } |
| 1701 | public static FileUploadPurpose Batch { get; } |
| 1702 | public static FileUploadPurpose Evaluations { get; } |
| 1703 | public static FileUploadPurpose FineTune { get; } |
| 1704 | public static FileUploadPurpose UserData { get; } |
| 1705 | public static FileUploadPurpose Vision { get; } |
| 1706 | public readonly bool Equals(FileUploadPurpose other); |
| 1707 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1708 | public override readonly bool Equals(object obj); |
| 1709 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1710 | public override readonly int GetHashCode(); |
| 1711 | public static bool operator ==(FileUploadPurpose left, FileUploadPurpose right); |
| 1712 | public static implicit operator FileUploadPurpose(string value); |
| 1713 | public static bool operator !=(FileUploadPurpose left, FileUploadPurpose right); |
| 1714 | public override readonly string ToString(); |
| 1715 | } |
| 1716 | public class OpenAIFile : IJsonModel<OpenAIFile>, IPersistableModel<OpenAIFile> { |
| 1717 | public DateTimeOffset CreatedAt { get; } |
| 1718 | public DateTimeOffset? ExpiresAt { get; } |
| 1719 | public string Filename { get; } |
| 1720 | public string Id { get; } |
| 1721 | public FilePurpose Purpose { get; } |
| 1722 | public int? SizeInBytes { get; } |
| 1723 | [Obsolete("This property is obsolete. If this is a fine-tuning training file, it may take some time to process after it has been uploaded. While the file is processing, you can still create a fine-tuning job but it will not start until the file processing has completed.")] |
| 1724 | public FileStatus Status { get; } |
| 1725 | [Obsolete("This property is obsolete. For details on why a fine-tuning training file failed validation, see the `error` field on the fine-tuning job.")] |
| 1726 | public string StatusDetails { get; } |
| 1727 | public static explicit operator OpenAIFile(ClientResult result); |
| 1728 | public static implicit operator BinaryContent(OpenAIFile openAIFile); |
| 1729 | } |
| 1730 | public class OpenAIFileClient { |
| 1731 | protected OpenAIFileClient(); |
| 1732 | public OpenAIFileClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 1733 | public OpenAIFileClient(ApiKeyCredential credential); |
| 1734 | protected internal OpenAIFileClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 1735 | public OpenAIFileClient(string apiKey); |
| 1736 | public ClientPipeline Pipeline { get; } |
| 1737 | public virtual ClientResult AddUploadPart(string uploadId, BinaryContent content, string contentType, RequestOptions options = null); |
| 1738 | public virtual Task<ClientResult> AddUploadPartAsync(string uploadId, BinaryContent content, string contentType, RequestOptions options = null); |
| 1739 | public virtual ClientResult CancelUpload(string uploadId, RequestOptions options = null); |
| 1740 | public virtual Task<ClientResult> CancelUploadAsync(string uploadId, RequestOptions options = null); |
| 1741 | public virtual ClientResult CompleteUpload(string uploadId, BinaryContent content, RequestOptions options = null); |
| 1742 | public virtual Task<ClientResult> CompleteUploadAsync(string uploadId, BinaryContent content, RequestOptions options = null); |
| 1743 | public virtual ClientResult CreateUpload(BinaryContent content, RequestOptions options = null); |
| 1744 | public virtual Task<ClientResult> CreateUploadAsync(BinaryContent content, RequestOptions options = null); |
| 1745 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1746 | public virtual ClientResult DeleteFile(string fileId, RequestOptions options); |
| 1747 | public virtual ClientResult<FileDeletionResult> DeleteFile(string fileId, CancellationToken cancellationToken = default); |
| 1748 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1749 | public virtual Task<ClientResult> DeleteFileAsync(string fileId, RequestOptions options); |
| 1750 | public virtual Task<ClientResult<FileDeletionResult>> DeleteFileAsync(string fileId, CancellationToken cancellationToken = default); |
| 1751 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1752 | public virtual ClientResult DownloadFile(string fileId, RequestOptions options); |
| 1753 | public virtual ClientResult<BinaryData> DownloadFile(string fileId, CancellationToken cancellationToken = default); |
| 1754 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1755 | public virtual Task<ClientResult> DownloadFileAsync(string fileId, RequestOptions options); |
| 1756 | public virtual Task<ClientResult<BinaryData>> DownloadFileAsync(string fileId, CancellationToken cancellationToken = default); |
| 1757 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1758 | public virtual ClientResult GetFile(string fileId, RequestOptions options); |
| 1759 | public virtual ClientResult<OpenAIFile> GetFile(string fileId, CancellationToken cancellationToken = default); |
| 1760 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1761 | public virtual Task<ClientResult> GetFileAsync(string fileId, RequestOptions options); |
| 1762 | public virtual Task<ClientResult<OpenAIFile>> GetFileAsync(string fileId, CancellationToken cancellationToken = default); |
| 1763 | public virtual ClientResult<OpenAIFileCollection> GetFiles(FilePurpose purpose, CancellationToken cancellationToken = default); |
| 1764 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1765 | public virtual ClientResult GetFiles(string purpose, RequestOptions options); |
| 1766 | public virtual ClientResult<OpenAIFileCollection> GetFiles(CancellationToken cancellationToken = default); |
| 1767 | public virtual Task<ClientResult<OpenAIFileCollection>> GetFilesAsync(FilePurpose purpose, CancellationToken cancellationToken = default); |
| 1768 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1769 | public virtual Task<ClientResult> GetFilesAsync(string purpose, RequestOptions options); |
| 1770 | public virtual Task<ClientResult<OpenAIFileCollection>> GetFilesAsync(CancellationToken cancellationToken = default); |
| 1771 | public virtual ClientResult<OpenAIFile> UploadFile(BinaryData file, string filename, FileUploadPurpose purpose); |
| 1772 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1773 | public virtual ClientResult UploadFile(BinaryContent content, string contentType, RequestOptions options = null); |
| 1774 | public virtual ClientResult<OpenAIFile> UploadFile(Stream file, string filename, FileUploadPurpose purpose, CancellationToken cancellationToken = default); |
| 1775 | public virtual ClientResult<OpenAIFile> UploadFile(string filePath, FileUploadPurpose purpose); |
| 1776 | public virtual Task<ClientResult<OpenAIFile>> UploadFileAsync(BinaryData file, string filename, FileUploadPurpose purpose); |
| 1777 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1778 | public virtual Task<ClientResult> UploadFileAsync(BinaryContent content, string contentType, RequestOptions options = null); |
| 1779 | public virtual Task<ClientResult<OpenAIFile>> UploadFileAsync(Stream file, string filename, FileUploadPurpose purpose, CancellationToken cancellationToken = default); |
| 1780 | public virtual Task<ClientResult<OpenAIFile>> UploadFileAsync(string filePath, FileUploadPurpose purpose); |
| 1781 | } |
| 1782 | public class OpenAIFileCollection : ObjectModel.ReadOnlyCollection<OpenAIFile>, IJsonModel<OpenAIFileCollection>, IPersistableModel<OpenAIFileCollection> { |
| 1783 | public static explicit operator OpenAIFileCollection(ClientResult result); |
| 1784 | public static implicit operator BinaryContent(OpenAIFileCollection openAIFileCollection); |
| 1785 | } |
| 1786 | public static class OpenAIFilesModelFactory { |
| 1787 | public static FileDeletionResult FileDeletionResult(string fileId = null, bool deleted = false); |
| 1788 | public static OpenAIFileCollection OpenAIFileCollection(IEnumerable<OpenAIFile> items = null); |
| 1789 | public static OpenAIFile OpenAIFileInfo(string id = null, int? sizeInBytes = null, DateTimeOffset createdAt = default, string filename = null, FilePurpose purpose = FilePurpose.Assistants, FileStatus status = FileStatus.Uploaded, string statusDetails = null, DateTimeOffset? expiresAt = null); |
| 1790 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1791 | public static OpenAIFile OpenAIFileInfo(string id, int? sizeInBytes, DateTimeOffset createdAt, string filename, FilePurpose purpose, FileStatus status, string statusDetails); |
| 1792 | } |
| 1793 | } |
| 1794 | namespace OpenAI.FineTuning { |
| 1795 | public class FineTuningClient { |
| 1796 | protected FineTuningClient(); |
| 1797 | public FineTuningClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 1798 | public FineTuningClient(ApiKeyCredential credential); |
| 1799 | protected internal FineTuningClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 1800 | public FineTuningClient(string apiKey); |
| 1801 | public ClientPipeline Pipeline { get; } |
| 1802 | public virtual FineTuningJobOperation CreateFineTuningJob(BinaryContent content, bool waitUntilCompleted, RequestOptions options = null); |
| 1803 | public virtual Task<FineTuningJobOperation> CreateFineTuningJobAsync(BinaryContent content, bool waitUntilCompleted, RequestOptions options = null); |
| 1804 | public virtual ClientResult GetJob(string fineTuningJobId, RequestOptions options); |
| 1805 | public virtual Task<ClientResult> GetJobAsync(string fineTuningJobId, RequestOptions options); |
| 1806 | public virtual CollectionResult GetJobs(string after, int? limit, RequestOptions options); |
| 1807 | public virtual AsyncCollectionResult GetJobsAsync(string after, int? limit, RequestOptions options); |
| 1808 | } |
| 1809 | public class FineTuningJobOperation : OperationResult { |
| 1810 | public string JobId { get; } |
| 1811 | public override ContinuationToken? RehydrationToken { get; protected set; } |
| 1812 | public virtual ClientResult Cancel(RequestOptions? options); |
| 1813 | public virtual Task<ClientResult> CancelAsync(RequestOptions? options); |
| 1814 | public virtual ClientResult GetJob(RequestOptions? options); |
| 1815 | public virtual Task<ClientResult> GetJobAsync(RequestOptions? options); |
| 1816 | public virtual CollectionResult GetJobCheckpoints(string? after, int? limit, RequestOptions? options); |
| 1817 | public virtual AsyncCollectionResult GetJobCheckpointsAsync(string? after, int? limit, RequestOptions? options); |
| 1818 | public virtual CollectionResult GetJobEvents(string? after, int? limit, RequestOptions options); |
| 1819 | public virtual AsyncCollectionResult GetJobEventsAsync(string? after, int? limit, RequestOptions options); |
| 1820 | public static FineTuningJobOperation Rehydrate(FineTuningClient client, ContinuationToken rehydrationToken, CancellationToken cancellationToken = default); |
| 1821 | public static FineTuningJobOperation Rehydrate(FineTuningClient client, string fineTuningJobId, CancellationToken cancellationToken = default); |
| 1822 | public static Task<FineTuningJobOperation> RehydrateAsync(FineTuningClient client, ContinuationToken rehydrationToken, CancellationToken cancellationToken = default); |
| 1823 | public static Task<FineTuningJobOperation> RehydrateAsync(FineTuningClient client, string fineTuningJobId, CancellationToken cancellationToken = default); |
| 1824 | public override ClientResult UpdateStatus(RequestOptions? options = null); |
| 1825 | public override ValueTask<ClientResult> UpdateStatusAsync(RequestOptions? options = null); |
| 1826 | } |
| 1827 | } |
| 1828 | namespace OpenAI.Images { |
| 1829 | public class GeneratedImage : IJsonModel<GeneratedImage>, IPersistableModel<GeneratedImage> { |
| 1830 | public BinaryData ImageBytes { get; } |
| 1831 | public Uri ImageUri { get; } |
| 1832 | public string RevisedPrompt { get; } |
| 1833 | public static explicit operator GeneratedImage(ClientResult result); |
| 1834 | public static implicit operator BinaryContent(GeneratedImage generatedImage); |
| 1835 | } |
| 1836 | public class GeneratedImageCollection : ObjectModel.ReadOnlyCollection<GeneratedImage>, IJsonModel<GeneratedImageCollection>, IPersistableModel<GeneratedImageCollection> { |
| 1837 | public DateTimeOffset CreatedAt { get; } |
| 1838 | public static explicit operator GeneratedImageCollection(ClientResult result); |
| 1839 | public static implicit operator BinaryContent(GeneratedImageCollection generatedImageCollection); |
| 1840 | } |
| 1841 | public readonly partial struct GeneratedImageFormat : IEquatable<GeneratedImageFormat> { |
| 1842 | public GeneratedImageFormat(string value); |
| 1843 | public static GeneratedImageFormat Bytes { get; } |
| 1844 | public static GeneratedImageFormat Uri { get; } |
| 1845 | public readonly bool Equals(GeneratedImageFormat other); |
| 1846 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1847 | public override readonly bool Equals(object obj); |
| 1848 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1849 | public override readonly int GetHashCode(); |
| 1850 | public static bool operator ==(GeneratedImageFormat left, GeneratedImageFormat right); |
| 1851 | public static implicit operator GeneratedImageFormat(string value); |
| 1852 | public static bool operator !=(GeneratedImageFormat left, GeneratedImageFormat right); |
| 1853 | public override readonly string ToString(); |
| 1854 | } |
| 1855 | public readonly partial struct GeneratedImageQuality : IEquatable<GeneratedImageQuality> { |
| 1856 | public GeneratedImageQuality(string value); |
| 1857 | public static GeneratedImageQuality High { get; } |
| 1858 | public static GeneratedImageQuality Standard { get; } |
| 1859 | public readonly bool Equals(GeneratedImageQuality other); |
| 1860 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1861 | public override readonly bool Equals(object obj); |
| 1862 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1863 | public override readonly int GetHashCode(); |
| 1864 | public static bool operator ==(GeneratedImageQuality left, GeneratedImageQuality right); |
| 1865 | public static implicit operator GeneratedImageQuality(string value); |
| 1866 | public static bool operator !=(GeneratedImageQuality left, GeneratedImageQuality right); |
| 1867 | public override readonly string ToString(); |
| 1868 | } |
| 1869 | public readonly partial struct GeneratedImageSize : IEquatable<GeneratedImageSize> { |
| 1870 | public static readonly GeneratedImageSize W1024xH1024; |
| 1871 | public static readonly GeneratedImageSize W1024xH1792; |
| 1872 | public static readonly GeneratedImageSize W1792xH1024; |
| 1873 | public static readonly GeneratedImageSize W256xH256; |
| 1874 | public static readonly GeneratedImageSize W512xH512; |
| 1875 | public GeneratedImageSize(int width, int height); |
| 1876 | public readonly bool Equals(GeneratedImageSize other); |
| 1877 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1878 | public override readonly bool Equals(object obj); |
| 1879 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1880 | public override readonly int GetHashCode(); |
| 1881 | public static bool operator ==(GeneratedImageSize left, GeneratedImageSize right); |
| 1882 | public static bool operator !=(GeneratedImageSize left, GeneratedImageSize right); |
| 1883 | public override readonly string ToString(); |
| 1884 | } |
| 1885 | public readonly partial struct GeneratedImageStyle : IEquatable<GeneratedImageStyle> { |
| 1886 | public GeneratedImageStyle(string value); |
| 1887 | public static GeneratedImageStyle Natural { get; } |
| 1888 | public static GeneratedImageStyle Vivid { get; } |
| 1889 | public readonly bool Equals(GeneratedImageStyle other); |
| 1890 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1891 | public override readonly bool Equals(object obj); |
| 1892 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1893 | public override readonly int GetHashCode(); |
| 1894 | public static bool operator ==(GeneratedImageStyle left, GeneratedImageStyle right); |
| 1895 | public static implicit operator GeneratedImageStyle(string value); |
| 1896 | public static bool operator !=(GeneratedImageStyle left, GeneratedImageStyle right); |
| 1897 | public override readonly string ToString(); |
| 1898 | } |
| 1899 | public class ImageClient { |
| 1900 | protected ImageClient(); |
| 1901 | protected internal ImageClient(ClientPipeline pipeline, string model, OpenAIClientOptions options); |
| 1902 | public ImageClient(string model, ApiKeyCredential credential, OpenAIClientOptions options); |
| 1903 | public ImageClient(string model, ApiKeyCredential credential); |
| 1904 | public ImageClient(string model, string apiKey); |
| 1905 | public ClientPipeline Pipeline { get; } |
| 1906 | public virtual ClientResult<GeneratedImage> GenerateImage(string prompt, ImageGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 1907 | public virtual Task<ClientResult<GeneratedImage>> GenerateImageAsync(string prompt, ImageGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 1908 | public virtual ClientResult<GeneratedImage> GenerateImageEdit(Stream image, string imageFilename, string prompt, ImageEditOptions options = null, CancellationToken cancellationToken = default); |
| 1909 | public virtual ClientResult<GeneratedImage> GenerateImageEdit(Stream image, string imageFilename, string prompt, Stream mask, string maskFilename, ImageEditOptions options = null, CancellationToken cancellationToken = default); |
| 1910 | public virtual ClientResult<GeneratedImage> GenerateImageEdit(string imageFilePath, string prompt, ImageEditOptions options = null); |
| 1911 | public virtual ClientResult<GeneratedImage> GenerateImageEdit(string imageFilePath, string prompt, string maskFilePath, ImageEditOptions options = null); |
| 1912 | public virtual Task<ClientResult<GeneratedImage>> GenerateImageEditAsync(Stream image, string imageFilename, string prompt, ImageEditOptions options = null, CancellationToken cancellationToken = default); |
| 1913 | public virtual Task<ClientResult<GeneratedImage>> GenerateImageEditAsync(Stream image, string imageFilename, string prompt, Stream mask, string maskFilename, ImageEditOptions options = null, CancellationToken cancellationToken = default); |
| 1914 | public virtual Task<ClientResult<GeneratedImage>> GenerateImageEditAsync(string imageFilePath, string prompt, ImageEditOptions options = null); |
| 1915 | public virtual Task<ClientResult<GeneratedImage>> GenerateImageEditAsync(string imageFilePath, string prompt, string maskFilePath, ImageEditOptions options = null); |
| 1916 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1917 | public virtual ClientResult GenerateImageEdits(BinaryContent content, string contentType, RequestOptions options = null); |
| 1918 | public virtual ClientResult<GeneratedImageCollection> GenerateImageEdits(Stream image, string imageFilename, string prompt, int imageCount, ImageEditOptions options = null, CancellationToken cancellationToken = default); |
| 1919 | public virtual ClientResult<GeneratedImageCollection> GenerateImageEdits(Stream image, string imageFilename, string prompt, Stream mask, string maskFilename, int imageCount, ImageEditOptions options = null, CancellationToken cancellationToken = default); |
| 1920 | public virtual ClientResult<GeneratedImageCollection> GenerateImageEdits(string imageFilePath, string prompt, int imageCount, ImageEditOptions options = null); |
| 1921 | public virtual ClientResult<GeneratedImageCollection> GenerateImageEdits(string imageFilePath, string prompt, string maskFilePath, int imageCount, ImageEditOptions options = null); |
| 1922 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1923 | public virtual Task<ClientResult> GenerateImageEditsAsync(BinaryContent content, string contentType, RequestOptions options = null); |
| 1924 | public virtual Task<ClientResult<GeneratedImageCollection>> GenerateImageEditsAsync(Stream image, string imageFilename, string prompt, int imageCount, ImageEditOptions options = null, CancellationToken cancellationToken = default); |
| 1925 | public virtual Task<ClientResult<GeneratedImageCollection>> GenerateImageEditsAsync(Stream image, string imageFilename, string prompt, Stream mask, string maskFilename, int imageCount, ImageEditOptions options = null, CancellationToken cancellationToken = default); |
| 1926 | public virtual Task<ClientResult<GeneratedImageCollection>> GenerateImageEditsAsync(string imageFilePath, string prompt, int imageCount, ImageEditOptions options = null); |
| 1927 | public virtual Task<ClientResult<GeneratedImageCollection>> GenerateImageEditsAsync(string imageFilePath, string prompt, string maskFilePath, int imageCount, ImageEditOptions options = null); |
| 1928 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1929 | public virtual ClientResult GenerateImages(BinaryContent content, RequestOptions options = null); |
| 1930 | public virtual ClientResult<GeneratedImageCollection> GenerateImages(string prompt, int imageCount, ImageGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 1931 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1932 | public virtual Task<ClientResult> GenerateImagesAsync(BinaryContent content, RequestOptions options = null); |
| 1933 | public virtual Task<ClientResult<GeneratedImageCollection>> GenerateImagesAsync(string prompt, int imageCount, ImageGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 1934 | public virtual ClientResult<GeneratedImage> GenerateImageVariation(Stream image, string imageFilename, ImageVariationOptions options = null, CancellationToken cancellationToken = default); |
| 1935 | public virtual ClientResult<GeneratedImage> GenerateImageVariation(string imageFilePath, ImageVariationOptions options = null); |
| 1936 | public virtual Task<ClientResult<GeneratedImage>> GenerateImageVariationAsync(Stream image, string imageFilename, ImageVariationOptions options = null, CancellationToken cancellationToken = default); |
| 1937 | public virtual Task<ClientResult<GeneratedImage>> GenerateImageVariationAsync(string imageFilePath, ImageVariationOptions options = null); |
| 1938 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1939 | public virtual ClientResult GenerateImageVariations(BinaryContent content, string contentType, RequestOptions options = null); |
| 1940 | public virtual ClientResult<GeneratedImageCollection> GenerateImageVariations(Stream image, string imageFilename, int imageCount, ImageVariationOptions options = null, CancellationToken cancellationToken = default); |
| 1941 | public virtual ClientResult<GeneratedImageCollection> GenerateImageVariations(string imageFilePath, int imageCount, ImageVariationOptions options = null); |
| 1942 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1943 | public virtual Task<ClientResult> GenerateImageVariationsAsync(BinaryContent content, string contentType, RequestOptions options = null); |
| 1944 | public virtual Task<ClientResult<GeneratedImageCollection>> GenerateImageVariationsAsync(Stream image, string imageFilename, int imageCount, ImageVariationOptions options = null, CancellationToken cancellationToken = default); |
| 1945 | public virtual Task<ClientResult<GeneratedImageCollection>> GenerateImageVariationsAsync(string imageFilePath, int imageCount, ImageVariationOptions options = null); |
| 1946 | } |
| 1947 | public class ImageEditOptions : IJsonModel<ImageEditOptions>, IPersistableModel<ImageEditOptions> { |
| 1948 | public string EndUserId { get; set; } |
| 1949 | public GeneratedImageFormat? ResponseFormat { get; set; } |
| 1950 | public GeneratedImageSize? Size { get; set; } |
| 1951 | public static explicit operator ImageEditOptions(ClientResult result); |
| 1952 | public static implicit operator BinaryContent(ImageEditOptions imageEditOptions); |
| 1953 | } |
| 1954 | public class ImageGenerationOptions : IJsonModel<ImageGenerationOptions>, IPersistableModel<ImageGenerationOptions> { |
| 1955 | public string EndUserId { get; set; } |
| 1956 | public GeneratedImageQuality? Quality { get; set; } |
| 1957 | public GeneratedImageFormat? ResponseFormat { get; set; } |
| 1958 | public GeneratedImageSize? Size { get; set; } |
| 1959 | public GeneratedImageStyle? Style { get; set; } |
| 1960 | public static explicit operator ImageGenerationOptions(ClientResult result); |
| 1961 | public static implicit operator BinaryContent(ImageGenerationOptions imageGenerationOptions); |
| 1962 | } |
| 1963 | public class ImageVariationOptions : IJsonModel<ImageVariationOptions>, IPersistableModel<ImageVariationOptions> { |
| 1964 | public string EndUserId { get; set; } |
| 1965 | public GeneratedImageFormat? ResponseFormat { get; set; } |
| 1966 | public GeneratedImageSize? Size { get; set; } |
| 1967 | public static explicit operator ImageVariationOptions(ClientResult result); |
| 1968 | public static implicit operator BinaryContent(ImageVariationOptions imageVariationOptions); |
| 1969 | } |
| 1970 | public static class OpenAIImagesModelFactory { |
| 1971 | public static GeneratedImage GeneratedImage(BinaryData imageBytes = null, Uri imageUri = null, string revisedPrompt = null); |
| 1972 | public static GeneratedImageCollection GeneratedImageCollection(DateTimeOffset createdAt = default, IEnumerable<GeneratedImage> items = null); |
| 1973 | } |
| 1974 | } |
| 1975 | namespace OpenAI.Models { |
| 1976 | public class ModelDeletionResult : IJsonModel<ModelDeletionResult>, IPersistableModel<ModelDeletionResult> { |
| 1977 | public bool Deleted { get; } |
| 1978 | public string ModelId { get; } |
| 1979 | public static explicit operator ModelDeletionResult(ClientResult result); |
| 1980 | public static implicit operator BinaryContent(ModelDeletionResult modelDeletionResult); |
| 1981 | } |
| 1982 | public class OpenAIModel : IJsonModel<OpenAIModel>, IPersistableModel<OpenAIModel> { |
| 1983 | public DateTimeOffset CreatedAt { get; } |
| 1984 | public string Id { get; } |
| 1985 | public string OwnedBy { get; } |
| 1986 | public static explicit operator OpenAIModel(ClientResult result); |
| 1987 | public static implicit operator BinaryContent(OpenAIModel openAIModel); |
| 1988 | } |
| 1989 | public class OpenAIModelClient { |
| 1990 | protected OpenAIModelClient(); |
| 1991 | public OpenAIModelClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 1992 | public OpenAIModelClient(ApiKeyCredential credential); |
| 1993 | protected internal OpenAIModelClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 1994 | public OpenAIModelClient(string apiKey); |
| 1995 | public ClientPipeline Pipeline { get; } |
| 1996 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1997 | public virtual ClientResult DeleteModel(string model, RequestOptions options); |
| 1998 | public virtual ClientResult<ModelDeletionResult> DeleteModel(string model, CancellationToken cancellationToken = default); |
| 1999 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2000 | public virtual Task<ClientResult> DeleteModelAsync(string model, RequestOptions options); |
| 2001 | public virtual Task<ClientResult<ModelDeletionResult>> DeleteModelAsync(string model, CancellationToken cancellationToken = default); |
| 2002 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2003 | public virtual ClientResult GetModel(string model, RequestOptions options); |
| 2004 | public virtual ClientResult<OpenAIModel> GetModel(string model, CancellationToken cancellationToken = default); |
| 2005 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2006 | public virtual Task<ClientResult> GetModelAsync(string model, RequestOptions options); |
| 2007 | public virtual Task<ClientResult<OpenAIModel>> GetModelAsync(string model, CancellationToken cancellationToken = default); |
| 2008 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2009 | public virtual ClientResult GetModels(RequestOptions options); |
| 2010 | public virtual ClientResult<OpenAIModelCollection> GetModels(CancellationToken cancellationToken = default); |
| 2011 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2012 | public virtual Task<ClientResult> GetModelsAsync(RequestOptions options); |
| 2013 | public virtual Task<ClientResult<OpenAIModelCollection>> GetModelsAsync(CancellationToken cancellationToken = default); |
| 2014 | } |
| 2015 | public class OpenAIModelCollection : ObjectModel.ReadOnlyCollection<OpenAIModel>, IJsonModel<OpenAIModelCollection>, IPersistableModel<OpenAIModelCollection> { |
| 2016 | public static explicit operator OpenAIModelCollection(ClientResult result); |
| 2017 | public static implicit operator BinaryContent(OpenAIModelCollection openAIModelCollection); |
| 2018 | } |
| 2019 | public static class OpenAIModelsModelFactory { |
| 2020 | public static ModelDeletionResult ModelDeletionResult(string modelId = null, bool deleted = false); |
| 2021 | public static OpenAIModel OpenAIModel(string id = null, DateTimeOffset createdAt = default, string ownedBy = null); |
| 2022 | public static OpenAIModelCollection OpenAIModelCollection(IEnumerable<OpenAIModel> items = null); |
| 2023 | } |
| 2024 | } |
| 2025 | namespace OpenAI.Moderations { |
| 2026 | public class ModerationCategory { |
| 2027 | public bool Flagged { get; } |
| 2028 | public float Score { get; } |
| 2029 | } |
| 2030 | public class ModerationClient { |
| 2031 | protected ModerationClient(); |
| 2032 | protected internal ModerationClient(ClientPipeline pipeline, string model, OpenAIClientOptions options); |
| 2033 | public ModerationClient(string model, ApiKeyCredential credential, OpenAIClientOptions options); |
| 2034 | public ModerationClient(string model, ApiKeyCredential credential); |
| 2035 | public ModerationClient(string model, string apiKey); |
| 2036 | public ClientPipeline Pipeline { get; } |
| 2037 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2038 | public virtual ClientResult ClassifyText(BinaryContent content, RequestOptions options = null); |
| 2039 | public virtual ClientResult<ModerationResultCollection> ClassifyText(IEnumerable<string> inputs, CancellationToken cancellationToken = default); |
| 2040 | public virtual ClientResult<ModerationResult> ClassifyText(string input, CancellationToken cancellationToken = default); |
| 2041 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2042 | public virtual Task<ClientResult> ClassifyTextAsync(BinaryContent content, RequestOptions options = null); |
| 2043 | public virtual Task<ClientResult<ModerationResultCollection>> ClassifyTextAsync(IEnumerable<string> inputs, CancellationToken cancellationToken = default); |
| 2044 | public virtual Task<ClientResult<ModerationResult>> ClassifyTextAsync(string input, CancellationToken cancellationToken = default); |
| 2045 | } |
| 2046 | public class ModerationResult : IJsonModel<ModerationResult>, IPersistableModel<ModerationResult> { |
| 2047 | public bool Flagged { get; } |
| 2048 | public ModerationCategory Harassment { get; } |
| 2049 | public ModerationCategory HarassmentThreatening { get; } |
| 2050 | public ModerationCategory Hate { get; } |
| 2051 | public ModerationCategory HateThreatening { get; } |
| 2052 | public ModerationCategory Illicit { get; } |
| 2053 | public ModerationCategory IllicitViolent { get; } |
| 2054 | public ModerationCategory SelfHarm { get; } |
| 2055 | public ModerationCategory SelfHarmInstructions { get; } |
| 2056 | public ModerationCategory SelfHarmIntent { get; } |
| 2057 | public ModerationCategory Sexual { get; } |
| 2058 | public ModerationCategory SexualMinors { get; } |
| 2059 | public ModerationCategory Violence { get; } |
| 2060 | public ModerationCategory ViolenceGraphic { get; } |
| 2061 | public static explicit operator ModerationResult(ClientResult result); |
| 2062 | public static implicit operator BinaryContent(ModerationResult moderationResult); |
| 2063 | } |
| 2064 | public class ModerationResultCollection : ObjectModel.ReadOnlyCollection<ModerationResult>, IJsonModel<ModerationResultCollection>, IPersistableModel<ModerationResultCollection> { |
| 2065 | public string Id { get; } |
| 2066 | public string Model { get; } |
| 2067 | public static explicit operator ModerationResultCollection(ClientResult result); |
| 2068 | public static implicit operator BinaryContent(ModerationResultCollection moderationResultCollection); |
| 2069 | } |
| 2070 | public static class OpenAIModerationsModelFactory { |
| 2071 | public static ModerationCategory ModerationCategory(bool flagged = false, float score = 0); |
| 2072 | public static ModerationResult ModerationResult(bool flagged = false, ModerationCategory hate = null, ModerationCategory hateThreatening = null, ModerationCategory harassment = null, ModerationCategory harassmentThreatening = null, ModerationCategory selfHarm = null, ModerationCategory selfHarmIntent = null, ModerationCategory selfHarmInstructions = null, ModerationCategory sexual = null, ModerationCategory sexualMinors = null, ModerationCategory violence = null, ModerationCategory violenceGraphic = null, ModerationCategory illicit = null, ModerationCategory illicitViolent = null); |
| 2073 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2074 | public static ModerationResult ModerationResult(bool flagged, ModerationCategory hate, ModerationCategory hateThreatening, ModerationCategory harassment, ModerationCategory harassmentThreatening, ModerationCategory selfHarm, ModerationCategory selfHarmIntent, ModerationCategory selfHarmInstructions, ModerationCategory sexual, ModerationCategory sexualMinors, ModerationCategory violence, ModerationCategory violenceGraphic); |
| 2075 | public static ModerationResultCollection ModerationResultCollection(string id = null, string model = null, IEnumerable<ModerationResult> items = null); |
| 2076 | } |
| 2077 | } |
| 2078 | namespace OpenAI.RealtimeConversation { |
| 2079 | public readonly partial struct ConversationAudioFormat : IEquatable<ConversationAudioFormat> { |
| 2080 | public ConversationAudioFormat(string value); |
| 2081 | public static ConversationAudioFormat G711Alaw { get; } |
| 2082 | public static ConversationAudioFormat G711Ulaw { get; } |
| 2083 | public static ConversationAudioFormat Pcm16 { get; } |
| 2084 | public readonly bool Equals(ConversationAudioFormat other); |
| 2085 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2086 | public override readonly bool Equals(object obj); |
| 2087 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2088 | public override readonly int GetHashCode(); |
| 2089 | public static bool operator ==(ConversationAudioFormat left, ConversationAudioFormat right); |
| 2090 | public static implicit operator ConversationAudioFormat(string value); |
| 2091 | public static bool operator !=(ConversationAudioFormat left, ConversationAudioFormat right); |
| 2092 | public override readonly string ToString(); |
| 2093 | } |
| 2094 | [Flags] |
| 2095 | public enum ConversationContentModalities { |
| 2096 | Default = 0, |
| 2097 | Text = 1, |
| 2098 | Audio = 2 |
| 2099 | } |
| 2100 | public class ConversationContentPart : IJsonModel<ConversationContentPart>, IPersistableModel<ConversationContentPart> { |
| 2101 | public string AudioTranscript { get; } |
| 2102 | public string Text { get; } |
| 2103 | public static ConversationContentPart CreateInputAudioTranscriptPart(string transcript = null); |
| 2104 | public static ConversationContentPart CreateInputTextPart(string text); |
| 2105 | public static ConversationContentPart CreateOutputAudioTranscriptPart(string transcript = null); |
| 2106 | public static ConversationContentPart CreateOutputTextPart(string text); |
| 2107 | public static explicit operator ConversationContentPart(ClientResult result); |
| 2108 | public static implicit operator BinaryContent(ConversationContentPart conversationContentPart); |
| 2109 | public static implicit operator ConversationContentPart(string text); |
| 2110 | } |
| 2111 | public readonly partial struct ConversationContentPartKind : IEquatable<ConversationContentPartKind> { |
| 2112 | public ConversationContentPartKind(string value); |
| 2113 | public static ConversationContentPartKind InputAudio { get; } |
| 2114 | public static ConversationContentPartKind InputText { get; } |
| 2115 | public static ConversationContentPartKind OutputAudio { get; } |
| 2116 | public static ConversationContentPartKind OutputText { get; } |
| 2117 | public readonly bool Equals(ConversationContentPartKind other); |
| 2118 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2119 | public override readonly bool Equals(object obj); |
| 2120 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2121 | public override readonly int GetHashCode(); |
| 2122 | public static bool operator ==(ConversationContentPartKind left, ConversationContentPartKind right); |
| 2123 | public static implicit operator ConversationContentPartKind(string value); |
| 2124 | public static bool operator !=(ConversationContentPartKind left, ConversationContentPartKind right); |
| 2125 | public override readonly string ToString(); |
| 2126 | } |
| 2127 | public class ConversationErrorUpdate : ConversationUpdate, IJsonModel<ConversationErrorUpdate>, IPersistableModel<ConversationErrorUpdate> { |
| 2128 | public string ErrorCode { get; } |
| 2129 | public string ErrorEventId { get; } |
| 2130 | public string Message { get; } |
| 2131 | public string ParameterName { get; } |
| 2132 | public new static explicit operator ConversationErrorUpdate(ClientResult result); |
| 2133 | public static implicit operator BinaryContent(ConversationErrorUpdate conversationErrorUpdate); |
| 2134 | } |
| 2135 | public class ConversationFunctionTool : ConversationTool, IJsonModel<ConversationFunctionTool>, IPersistableModel<ConversationFunctionTool> { |
| 2136 | public ConversationFunctionTool(string name); |
| 2137 | public string Description { get; set; } |
| 2138 | public string Name { get; set; } |
| 2139 | public BinaryData Parameters { get; set; } |
| 2140 | public new static explicit operator ConversationFunctionTool(ClientResult result); |
| 2141 | public static implicit operator BinaryContent(ConversationFunctionTool conversationFunctionTool); |
| 2142 | } |
| 2143 | public readonly partial struct ConversationIncompleteReason : IEquatable<ConversationIncompleteReason> { |
| 2144 | public ConversationIncompleteReason(string value); |
| 2145 | public static ConversationIncompleteReason ClientCancelled { get; } |
| 2146 | public static ConversationIncompleteReason ContentFilter { get; } |
| 2147 | public static ConversationIncompleteReason MaxOutputTokens { get; } |
| 2148 | public static ConversationIncompleteReason TurnDetected { get; } |
| 2149 | public readonly bool Equals(ConversationIncompleteReason other); |
| 2150 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2151 | public override readonly bool Equals(object obj); |
| 2152 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2153 | public override readonly int GetHashCode(); |
| 2154 | public static bool operator ==(ConversationIncompleteReason left, ConversationIncompleteReason right); |
| 2155 | public static implicit operator ConversationIncompleteReason(string value); |
| 2156 | public static bool operator !=(ConversationIncompleteReason left, ConversationIncompleteReason right); |
| 2157 | public override readonly string ToString(); |
| 2158 | } |
| 2159 | public class ConversationInputAudioClearedUpdate : ConversationUpdate, IJsonModel<ConversationInputAudioClearedUpdate>, IPersistableModel<ConversationInputAudioClearedUpdate> { |
| 2160 | public new static explicit operator ConversationInputAudioClearedUpdate(ClientResult result); |
| 2161 | public static implicit operator BinaryContent(ConversationInputAudioClearedUpdate conversationInputAudioClearedUpdate); |
| 2162 | } |
| 2163 | public class ConversationInputAudioCommittedUpdate : ConversationUpdate, IJsonModel<ConversationInputAudioCommittedUpdate>, IPersistableModel<ConversationInputAudioCommittedUpdate> { |
| 2164 | public string ItemId { get; } |
| 2165 | public string PreviousItemId { get; } |
| 2166 | public new static explicit operator ConversationInputAudioCommittedUpdate(ClientResult result); |
| 2167 | public static implicit operator BinaryContent(ConversationInputAudioCommittedUpdate conversationInputAudioCommittedUpdate); |
| 2168 | } |
| 2169 | public class ConversationInputSpeechFinishedUpdate : ConversationUpdate, IJsonModel<ConversationInputSpeechFinishedUpdate>, IPersistableModel<ConversationInputSpeechFinishedUpdate> { |
| 2170 | public TimeSpan AudioEndTime { get; } |
| 2171 | public string ItemId { get; } |
| 2172 | public new static explicit operator ConversationInputSpeechFinishedUpdate(ClientResult result); |
| 2173 | public static implicit operator BinaryContent(ConversationInputSpeechFinishedUpdate conversationInputSpeechFinishedUpdate); |
| 2174 | } |
| 2175 | public class ConversationInputSpeechStartedUpdate : ConversationUpdate, IJsonModel<ConversationInputSpeechStartedUpdate>, IPersistableModel<ConversationInputSpeechStartedUpdate> { |
| 2176 | public TimeSpan AudioStartTime { get; } |
| 2177 | public string ItemId { get; } |
| 2178 | public new static explicit operator ConversationInputSpeechStartedUpdate(ClientResult result); |
| 2179 | public static implicit operator BinaryContent(ConversationInputSpeechStartedUpdate conversationInputSpeechStartedUpdate); |
| 2180 | } |
| 2181 | public class ConversationInputTokenUsageDetails : IJsonModel<ConversationInputTokenUsageDetails>, IPersistableModel<ConversationInputTokenUsageDetails> { |
| 2182 | public int AudioTokenCount { get; } |
| 2183 | public int CachedTokenCount { get; } |
| 2184 | public int TextTokenCount { get; } |
| 2185 | public static explicit operator ConversationInputTokenUsageDetails(ClientResult result); |
| 2186 | public static implicit operator BinaryContent(ConversationInputTokenUsageDetails conversationInputTokenUsageDetails); |
| 2187 | } |
| 2188 | public class ConversationInputTranscriptionFailedUpdate : ConversationUpdate, IJsonModel<ConversationInputTranscriptionFailedUpdate>, IPersistableModel<ConversationInputTranscriptionFailedUpdate> { |
| 2189 | public int ContentIndex { get; } |
| 2190 | public string ErrorCode { get; } |
| 2191 | public string ErrorMessage { get; } |
| 2192 | public string ErrorParameterName { get; } |
| 2193 | public string ItemId { get; } |
| 2194 | public new static explicit operator ConversationInputTranscriptionFailedUpdate(ClientResult result); |
| 2195 | public static implicit operator BinaryContent(ConversationInputTranscriptionFailedUpdate conversationInputTranscriptionFailedUpdate); |
| 2196 | } |
| 2197 | public class ConversationInputTranscriptionFinishedUpdate : ConversationUpdate, IJsonModel<ConversationInputTranscriptionFinishedUpdate>, IPersistableModel<ConversationInputTranscriptionFinishedUpdate> { |
| 2198 | public int ContentIndex { get; } |
| 2199 | public string ItemId { get; } |
| 2200 | public string Transcript { get; } |
| 2201 | public new static explicit operator ConversationInputTranscriptionFinishedUpdate(ClientResult result); |
| 2202 | public static implicit operator BinaryContent(ConversationInputTranscriptionFinishedUpdate conversationInputTranscriptionFinishedUpdate); |
| 2203 | } |
| 2204 | public class ConversationInputTranscriptionOptions : IJsonModel<ConversationInputTranscriptionOptions>, IPersistableModel<ConversationInputTranscriptionOptions> { |
| 2205 | public ConversationTranscriptionModel? Model { get; set; } |
| 2206 | public static explicit operator ConversationInputTranscriptionOptions(ClientResult result); |
| 2207 | public static implicit operator BinaryContent(ConversationInputTranscriptionOptions conversationInputTranscriptionOptions); |
| 2208 | } |
| 2209 | public class ConversationItem : IJsonModel<ConversationItem>, IPersistableModel<ConversationItem> { |
| 2210 | public string FunctionArguments { get; } |
| 2211 | public string FunctionCallId { get; } |
| 2212 | public string FunctionName { get; } |
| 2213 | public string Id { get; set; } |
| 2214 | public IReadOnlyList<ConversationContentPart> MessageContentParts { get; } |
| 2215 | public ConversationMessageRole? MessageRole { get; } |
| 2216 | public static ConversationItem CreateAssistantMessage(IEnumerable<ConversationContentPart> contentItems); |
| 2217 | public static ConversationItem CreateFunctionCall(string name, string callId, string arguments); |
| 2218 | public static ConversationItem CreateFunctionCallOutput(string callId, string output); |
| 2219 | public static ConversationItem CreateSystemMessage(IEnumerable<ConversationContentPart> contentItems); |
| 2220 | public static ConversationItem CreateUserMessage(IEnumerable<ConversationContentPart> contentItems); |
| 2221 | public static explicit operator ConversationItem(ClientResult result); |
| 2222 | public static implicit operator BinaryContent(ConversationItem conversationItem); |
| 2223 | } |
| 2224 | public class ConversationItemCreatedUpdate : ConversationUpdate, IJsonModel<ConversationItemCreatedUpdate>, IPersistableModel<ConversationItemCreatedUpdate> { |
| 2225 | public string FunctionCallArguments { get; } |
| 2226 | public string FunctionCallId { get; } |
| 2227 | public string FunctionCallOutput { get; } |
| 2228 | public string FunctionName { get; } |
| 2229 | public string ItemId { get; } |
| 2230 | public IReadOnlyList<ConversationContentPart> MessageContentParts { get; } |
| 2231 | public ConversationMessageRole? MessageRole { get; } |
| 2232 | public string PreviousItemId { get; } |
| 2233 | public new static explicit operator ConversationItemCreatedUpdate(ClientResult result); |
| 2234 | public static implicit operator BinaryContent(ConversationItemCreatedUpdate conversationItemCreatedUpdate); |
| 2235 | } |
| 2236 | public class ConversationItemDeletedUpdate : ConversationUpdate, IJsonModel<ConversationItemDeletedUpdate>, IPersistableModel<ConversationItemDeletedUpdate> { |
| 2237 | public string ItemId { get; } |
| 2238 | public new static explicit operator ConversationItemDeletedUpdate(ClientResult result); |
| 2239 | public static implicit operator BinaryContent(ConversationItemDeletedUpdate conversationItemDeletedUpdate); |
| 2240 | } |
| 2241 | public readonly partial struct ConversationItemStatus : IEquatable<ConversationItemStatus> { |
| 2242 | public ConversationItemStatus(string value); |
| 2243 | public static ConversationItemStatus Completed { get; } |
| 2244 | public static ConversationItemStatus Incomplete { get; } |
| 2245 | public static ConversationItemStatus InProgress { get; } |
| 2246 | public readonly bool Equals(ConversationItemStatus other); |
| 2247 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2248 | public override readonly bool Equals(object obj); |
| 2249 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2250 | public override readonly int GetHashCode(); |
| 2251 | public static bool operator ==(ConversationItemStatus left, ConversationItemStatus right); |
| 2252 | public static implicit operator ConversationItemStatus(string value); |
| 2253 | public static bool operator !=(ConversationItemStatus left, ConversationItemStatus right); |
| 2254 | public override readonly string ToString(); |
| 2255 | } |
| 2256 | public class ConversationItemStreamingAudioFinishedUpdate : ConversationUpdate, IJsonModel<ConversationItemStreamingAudioFinishedUpdate>, IPersistableModel<ConversationItemStreamingAudioFinishedUpdate> { |
| 2257 | public int ContentIndex { get; } |
| 2258 | public string ItemId { get; } |
| 2259 | public int OutputIndex { get; } |
| 2260 | public string ResponseId { get; } |
| 2261 | public new static explicit operator ConversationItemStreamingAudioFinishedUpdate(ClientResult result); |
| 2262 | public static implicit operator BinaryContent(ConversationItemStreamingAudioFinishedUpdate conversationItemStreamingAudioFinishedUpdate); |
| 2263 | } |
| 2264 | public class ConversationItemStreamingAudioTranscriptionFinishedUpdate : ConversationUpdate, IJsonModel<ConversationItemStreamingAudioTranscriptionFinishedUpdate>, IPersistableModel<ConversationItemStreamingAudioTranscriptionFinishedUpdate> { |
| 2265 | public int ContentIndex { get; } |
| 2266 | public string ItemId { get; } |
| 2267 | public int OutputIndex { get; } |
| 2268 | public string ResponseId { get; } |
| 2269 | public string Transcript { get; } |
| 2270 | public new static explicit operator ConversationItemStreamingAudioTranscriptionFinishedUpdate(ClientResult result); |
| 2271 | public static implicit operator BinaryContent(ConversationItemStreamingAudioTranscriptionFinishedUpdate conversationItemStreamingAudioTranscriptionFinishedUpdate); |
| 2272 | } |
| 2273 | public class ConversationItemStreamingFinishedUpdate : ConversationUpdate, IJsonModel<ConversationItemStreamingFinishedUpdate>, IPersistableModel<ConversationItemStreamingFinishedUpdate> { |
| 2274 | public string FunctionCallArguments { get; } |
| 2275 | public string FunctionCallId { get; } |
| 2276 | public string FunctionCallOutput { get; } |
| 2277 | public string FunctionName { get; } |
| 2278 | public string ItemId { get; } |
| 2279 | public IReadOnlyList<ConversationContentPart> MessageContentParts { get; } |
| 2280 | public ConversationMessageRole? MessageRole { get; } |
| 2281 | public int OutputIndex { get; } |
| 2282 | public string ResponseId { get; } |
| 2283 | public new static explicit operator ConversationItemStreamingFinishedUpdate(ClientResult result); |
| 2284 | public static implicit operator BinaryContent(ConversationItemStreamingFinishedUpdate conversationItemStreamingFinishedUpdate); |
| 2285 | } |
| 2286 | public class ConversationItemStreamingPartDeltaUpdate : ConversationUpdate, IJsonModel<ConversationItemStreamingPartDeltaUpdate>, IPersistableModel<ConversationItemStreamingPartDeltaUpdate> { |
| 2287 | public BinaryData AudioBytes { get; } |
| 2288 | public string AudioTranscript { get; } |
| 2289 | public int ContentPartIndex { get; } |
| 2290 | public string FunctionArguments { get; } |
| 2291 | public string FunctionCallId { get; } |
| 2292 | public string ItemId { get; } |
| 2293 | public int ItemIndex { get; } |
| 2294 | public string ResponseId { get; } |
| 2295 | public string Text { get; } |
| 2296 | } |
| 2297 | public class ConversationItemStreamingPartFinishedUpdate : ConversationUpdate, IJsonModel<ConversationItemStreamingPartFinishedUpdate>, IPersistableModel<ConversationItemStreamingPartFinishedUpdate> { |
| 2298 | public string AudioTranscript { get; } |
| 2299 | public int ContentPartIndex { get; } |
| 2300 | public string FunctionArguments { get; } |
| 2301 | public string FunctionCallId { get; } |
| 2302 | public string ItemId { get; } |
| 2303 | public int ItemIndex { get; } |
| 2304 | public string ResponseId { get; } |
| 2305 | public string Text { get; } |
| 2306 | } |
| 2307 | public class ConversationItemStreamingStartedUpdate : ConversationUpdate, IJsonModel<ConversationItemStreamingStartedUpdate>, IPersistableModel<ConversationItemStreamingStartedUpdate> { |
| 2308 | public string FunctionCallArguments { get; } |
| 2309 | public string FunctionCallId { get; } |
| 2310 | public string FunctionCallOutput { get; } |
| 2311 | public string FunctionName { get; } |
| 2312 | public string ItemId { get; } |
| 2313 | public int ItemIndex { get; } |
| 2314 | public IReadOnlyList<ConversationContentPart> MessageContentParts { get; } |
| 2315 | public ConversationMessageRole? MessageRole { get; } |
| 2316 | public string ResponseId { get; } |
| 2317 | public new static explicit operator ConversationItemStreamingStartedUpdate(ClientResult result); |
| 2318 | public static implicit operator BinaryContent(ConversationItemStreamingStartedUpdate conversationItemStreamingStartedUpdate); |
| 2319 | } |
| 2320 | public class ConversationItemStreamingTextFinishedUpdate : ConversationUpdate, IJsonModel<ConversationItemStreamingTextFinishedUpdate>, IPersistableModel<ConversationItemStreamingTextFinishedUpdate> { |
| 2321 | public int ContentIndex { get; } |
| 2322 | public string ItemId { get; } |
| 2323 | public int OutputIndex { get; } |
| 2324 | public string ResponseId { get; } |
| 2325 | public string Text { get; } |
| 2326 | public new static explicit operator ConversationItemStreamingTextFinishedUpdate(ClientResult result); |
| 2327 | public static implicit operator BinaryContent(ConversationItemStreamingTextFinishedUpdate conversationItemStreamingTextFinishedUpdate); |
| 2328 | } |
| 2329 | public class ConversationItemTruncatedUpdate : ConversationUpdate, IJsonModel<ConversationItemTruncatedUpdate>, IPersistableModel<ConversationItemTruncatedUpdate> { |
| 2330 | public int AudioEndMs { get; } |
| 2331 | public int ContentIndex { get; } |
| 2332 | public string ItemId { get; } |
| 2333 | public new static explicit operator ConversationItemTruncatedUpdate(ClientResult result); |
| 2334 | public static implicit operator BinaryContent(ConversationItemTruncatedUpdate conversationItemTruncatedUpdate); |
| 2335 | } |
| 2336 | public class ConversationMaxTokensChoice : IJsonModel<ConversationMaxTokensChoice>, IPersistableModel<ConversationMaxTokensChoice> { |
| 2337 | public ConversationMaxTokensChoice(int numberValue); |
| 2338 | public int? NumericValue { get; } |
| 2339 | public static ConversationMaxTokensChoice CreateDefaultMaxTokensChoice(); |
| 2340 | public static ConversationMaxTokensChoice CreateInfiniteMaxTokensChoice(); |
| 2341 | public static ConversationMaxTokensChoice CreateNumericMaxTokensChoice(int maxTokens); |
| 2342 | public static implicit operator ConversationMaxTokensChoice(int maxTokens); |
| 2343 | } |
| 2344 | public readonly partial struct ConversationMessageRole : IEquatable<ConversationMessageRole> { |
| 2345 | public ConversationMessageRole(string value); |
| 2346 | public static ConversationMessageRole Assistant { get; } |
| 2347 | public static ConversationMessageRole System { get; } |
| 2348 | public static ConversationMessageRole User { get; } |
| 2349 | public readonly bool Equals(ConversationMessageRole other); |
| 2350 | [EditorBrowsable(global::EditorBrowsableState.Never)] |
| 2351 | public override readonly bool Equals(object obj); |
| 2352 | [EditorBrowsable(global::EditorBrowsableState.Never)] |
| 2353 | public override readonly int GetHashCode(); |
| 2354 | public static bool operator ==(ConversationMessageRole left, ConversationMessageRole right); |
| 2355 | public static implicit operator ConversationMessageRole(string value); |
| 2356 | public static bool operator !=(ConversationMessageRole left, ConversationMessageRole right); |
| 2357 | public override readonly string ToString(); |
| 2358 | } |
| 2359 | public class ConversationOutputTokenUsageDetails : IJsonModel<ConversationOutputTokenUsageDetails>, IPersistableModel<ConversationOutputTokenUsageDetails> { |
| 2360 | public int AudioTokenCount { get; } |
| 2361 | public int TextTokenCount { get; } |
| 2362 | public static explicit operator ConversationOutputTokenUsageDetails(ClientResult result); |
| 2363 | public static implicit operator BinaryContent(ConversationOutputTokenUsageDetails conversationOutputTokenUsageDetails); |
| 2364 | } |
| 2365 | public class ConversationRateLimitDetailsItem : IJsonModel<ConversationRateLimitDetailsItem>, IPersistableModel<ConversationRateLimitDetailsItem> { |
| 2366 | public int MaximumCount { get; } |
| 2367 | public string Name { get; } |
| 2368 | public int RemainingCount { get; } |
| 2369 | public TimeSpan TimeUntilReset { get; } |
| 2370 | public static explicit operator ConversationRateLimitDetailsItem(ClientResult result); |
| 2371 | public static implicit operator BinaryContent(ConversationRateLimitDetailsItem conversationRateLimitDetailsItem); |
| 2372 | } |
| 2373 | public class ConversationRateLimitsUpdate : ConversationUpdate, IJsonModel<ConversationRateLimitsUpdate>, IPersistableModel<ConversationRateLimitsUpdate> { |
| 2374 | public IReadOnlyList<ConversationRateLimitDetailsItem> AllDetails { get; } |
| 2375 | public ConversationRateLimitDetailsItem RequestDetails { get; } |
| 2376 | public ConversationRateLimitDetailsItem TokenDetails { get; } |
| 2377 | public new static explicit operator ConversationRateLimitsUpdate(ClientResult result); |
| 2378 | public static implicit operator BinaryContent(ConversationRateLimitsUpdate conversationRateLimitsUpdate); |
| 2379 | } |
| 2380 | public class ConversationResponseFinishedUpdate : ConversationUpdate, IJsonModel<ConversationResponseFinishedUpdate>, IPersistableModel<ConversationResponseFinishedUpdate> { |
| 2381 | public IReadOnlyList<ConversationItem> CreatedItems { get; } |
| 2382 | public string ResponseId { get; } |
| 2383 | public ConversationStatus? Status { get; } |
| 2384 | public ConversationStatusDetails StatusDetails { get; } |
| 2385 | public ConversationTokenUsage Usage { get; } |
| 2386 | public new static explicit operator ConversationResponseFinishedUpdate(ClientResult result); |
| 2387 | public static implicit operator BinaryContent(ConversationResponseFinishedUpdate conversationResponseFinishedUpdate); |
| 2388 | } |
| 2389 | public class ConversationResponseOptions : IJsonModel<ConversationResponseOptions>, IPersistableModel<ConversationResponseOptions> { |
| 2390 | public ConversationContentModalities ContentModalities { get; set; } |
| 2391 | public ResponseConversationSelection? ConversationSelection { get; set; } |
| 2392 | public string Instructions { get; set; } |
| 2393 | public ConversationMaxTokensChoice MaxOutputTokens { get; set; } |
| 2394 | public IDictionary<string, string> Metadata { get; } |
| 2395 | public ConversationAudioFormat? OutputAudioFormat { get; set; } |
| 2396 | public IList<ConversationItem> OverrideItems { get; } |
| 2397 | public float? Temperature { get; set; } |
| 2398 | public ConversationToolChoice ToolChoice { get; set; } |
| 2399 | public IList<ConversationTool> Tools { get; } |
| 2400 | public ConversationVoice? Voice { get; set; } |
| 2401 | public static explicit operator ConversationResponseOptions(ClientResult result); |
| 2402 | public static implicit operator BinaryContent(ConversationResponseOptions conversationResponseOptions); |
| 2403 | } |
| 2404 | public class ConversationResponseStartedUpdate : ConversationUpdate, IJsonModel<ConversationResponseStartedUpdate>, IPersistableModel<ConversationResponseStartedUpdate> { |
| 2405 | public IReadOnlyList<ConversationItem> CreatedItems { get; } |
| 2406 | public string ResponseId { get; } |
| 2407 | public ConversationStatus Status { get; } |
| 2408 | public ConversationStatusDetails StatusDetails { get; } |
| 2409 | public ConversationTokenUsage Usage { get; } |
| 2410 | public new static explicit operator ConversationResponseStartedUpdate(ClientResult result); |
| 2411 | public static implicit operator BinaryContent(ConversationResponseStartedUpdate conversationResponseStartedUpdate); |
| 2412 | } |
| 2413 | public class ConversationSessionConfiguredUpdate : ConversationUpdate, IJsonModel<ConversationSessionConfiguredUpdate>, IPersistableModel<ConversationSessionConfiguredUpdate> { |
| 2414 | public ConversationContentModalities ContentModalities { get; } |
| 2415 | public ConversationAudioFormat InputAudioFormat { get; } |
| 2416 | public ConversationInputTranscriptionOptions InputTranscriptionOptions { get; } |
| 2417 | public string Instructions { get; } |
| 2418 | public ConversationMaxTokensChoice MaxOutputTokens { get; } |
| 2419 | public string Model { get; } |
| 2420 | public ConversationAudioFormat OutputAudioFormat { get; } |
| 2421 | public string SessionId { get; } |
| 2422 | public float Temperature { get; } |
| 2423 | public ConversationToolChoice ToolChoice { get; } |
| 2424 | public IReadOnlyList<ConversationTool> Tools { get; } |
| 2425 | public ConversationTurnDetectionOptions TurnDetectionOptions { get; } |
| 2426 | public ConversationVoice Voice { get; } |
| 2427 | public new static explicit operator ConversationSessionConfiguredUpdate(ClientResult result); |
| 2428 | public static implicit operator BinaryContent(ConversationSessionConfiguredUpdate conversationSessionConfiguredUpdate); |
| 2429 | } |
| 2430 | public class ConversationSessionOptions : IJsonModel<ConversationSessionOptions>, IPersistableModel<ConversationSessionOptions> { |
| 2431 | public ConversationContentModalities ContentModalities { get; set; } |
| 2432 | public ConversationAudioFormat? InputAudioFormat { get; set; } |
| 2433 | public ConversationInputTranscriptionOptions InputTranscriptionOptions { get; set; } |
| 2434 | public string Instructions { get; set; } |
| 2435 | public ConversationMaxTokensChoice MaxOutputTokens { get; set; } |
| 2436 | public ConversationAudioFormat? OutputAudioFormat { get; set; } |
| 2437 | public float? Temperature { get; set; } |
| 2438 | public ConversationToolChoice ToolChoice { get; set; } |
| 2439 | public IList<ConversationTool> Tools { get; } |
| 2440 | public ConversationTurnDetectionOptions TurnDetectionOptions { get; set; } |
| 2441 | public ConversationVoice? Voice { get; set; } |
| 2442 | public static explicit operator ConversationSessionOptions(ClientResult result); |
| 2443 | public static implicit operator BinaryContent(ConversationSessionOptions conversationSessionOptions); |
| 2444 | } |
| 2445 | public class ConversationSessionStartedUpdate : ConversationUpdate, IJsonModel<ConversationSessionStartedUpdate>, IPersistableModel<ConversationSessionStartedUpdate> { |
| 2446 | public ConversationContentModalities ContentModalities { get; } |
| 2447 | public ConversationAudioFormat InputAudioFormat { get; } |
| 2448 | public ConversationInputTranscriptionOptions InputTranscriptionOptions { get; } |
| 2449 | public string Instructions { get; } |
| 2450 | public ConversationMaxTokensChoice MaxOutputTokens { get; } |
| 2451 | public string Model { get; } |
| 2452 | public ConversationAudioFormat OutputAudioFormat { get; } |
| 2453 | public string SessionId { get; } |
| 2454 | public float Temperature { get; } |
| 2455 | public ConversationToolChoice ToolChoice { get; } |
| 2456 | public IReadOnlyList<ConversationTool> Tools { get; } |
| 2457 | public ConversationTurnDetectionOptions TurnDetectionOptions { get; } |
| 2458 | public ConversationVoice Voice { get; } |
| 2459 | public new static explicit operator ConversationSessionStartedUpdate(ClientResult result); |
| 2460 | public static implicit operator BinaryContent(ConversationSessionStartedUpdate conversationSessionStartedUpdate); |
| 2461 | } |
| 2462 | public readonly partial struct ConversationStatus : IEquatable<ConversationStatus> { |
| 2463 | public ConversationStatus(string value); |
| 2464 | public static ConversationStatus Cancelled { get; } |
| 2465 | public static ConversationStatus Completed { get; } |
| 2466 | public static ConversationStatus Failed { get; } |
| 2467 | public static ConversationStatus Incomplete { get; } |
| 2468 | public readonly bool Equals(ConversationStatus other); |
| 2469 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2470 | public override readonly bool Equals(object obj); |
| 2471 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2472 | public override readonly int GetHashCode(); |
| 2473 | public static bool operator ==(ConversationStatus left, ConversationStatus right); |
| 2474 | public static implicit operator ConversationStatus(string value); |
| 2475 | public static bool operator !=(ConversationStatus left, ConversationStatus right); |
| 2476 | public override readonly string ToString(); |
| 2477 | } |
| 2478 | public class ConversationStatusDetails : IJsonModel<ConversationStatusDetails>, IPersistableModel<ConversationStatusDetails> { |
| 2479 | public string ErrorCode { get; } |
| 2480 | public string ErrorKind { get; } |
| 2481 | public ConversationIncompleteReason? IncompleteReason { get; } |
| 2482 | public ConversationStatus StatusKind { get; } |
| 2483 | public static explicit operator ConversationStatusDetails(ClientResult result); |
| 2484 | public static implicit operator BinaryContent(ConversationStatusDetails conversationStatusDetails); |
| 2485 | } |
| 2486 | public class ConversationTokenUsage : IJsonModel<ConversationTokenUsage>, IPersistableModel<ConversationTokenUsage> { |
| 2487 | public int InputTokenCount { get; } |
| 2488 | public ConversationInputTokenUsageDetails InputTokenDetails { get; } |
| 2489 | public int OutputTokenCount { get; } |
| 2490 | public ConversationOutputTokenUsageDetails OutputTokenDetails { get; } |
| 2491 | public int TotalTokenCount { get; } |
| 2492 | public static explicit operator ConversationTokenUsage(ClientResult result); |
| 2493 | public static implicit operator BinaryContent(ConversationTokenUsage conversationTokenUsage); |
| 2494 | } |
| 2495 | public abstract class ConversationTool : IJsonModel<ConversationTool>, IPersistableModel<ConversationTool> { |
| 2496 | public ConversationToolKind Kind { get; } |
| 2497 | public static ConversationTool CreateFunctionTool(string name, string description = null, BinaryData parameters = null); |
| 2498 | public static explicit operator ConversationTool(ClientResult result); |
| 2499 | public static implicit operator BinaryContent(ConversationTool conversationTool); |
| 2500 | } |
| 2501 | public class ConversationToolChoice : IJsonModel<ConversationToolChoice>, IPersistableModel<ConversationToolChoice> { |
| 2502 | public string FunctionName { get; } |
| 2503 | public ConversationToolChoiceKind Kind { get; } |
| 2504 | public static ConversationToolChoice CreateAutoToolChoice(); |
| 2505 | public static ConversationToolChoice CreateFunctionToolChoice(string functionName); |
| 2506 | public static ConversationToolChoice CreateNoneToolChoice(); |
| 2507 | public static ConversationToolChoice CreateRequiredToolChoice(); |
| 2508 | } |
| 2509 | public enum ConversationToolChoiceKind { |
| 2510 | Unknown = 0, |
| 2511 | Auto = 1, |
| 2512 | None = 2, |
| 2513 | Required = 3, |
| 2514 | Function = 4 |
| 2515 | } |
| 2516 | public readonly partial struct ConversationToolKind : IEquatable<ConversationToolKind> { |
| 2517 | public ConversationToolKind(string value); |
| 2518 | public static ConversationToolKind Function { get; } |
| 2519 | public readonly bool Equals(ConversationToolKind other); |
| 2520 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2521 | public override readonly bool Equals(object obj); |
| 2522 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2523 | public override readonly int GetHashCode(); |
| 2524 | public static bool operator ==(ConversationToolKind left, ConversationToolKind right); |
| 2525 | public static implicit operator ConversationToolKind(string value); |
| 2526 | public static bool operator !=(ConversationToolKind left, ConversationToolKind right); |
| 2527 | public override readonly string ToString(); |
| 2528 | } |
| 2529 | public readonly partial struct ConversationTranscriptionModel : IEquatable<ConversationTranscriptionModel> { |
| 2530 | public ConversationTranscriptionModel(string value); |
| 2531 | public static ConversationTranscriptionModel Whisper1 { get; } |
| 2532 | public readonly bool Equals(ConversationTranscriptionModel other); |
| 2533 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2534 | public override readonly bool Equals(object obj); |
| 2535 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2536 | public override readonly int GetHashCode(); |
| 2537 | public static bool operator ==(ConversationTranscriptionModel left, ConversationTranscriptionModel right); |
| 2538 | public static implicit operator ConversationTranscriptionModel(string value); |
| 2539 | public static bool operator !=(ConversationTranscriptionModel left, ConversationTranscriptionModel right); |
| 2540 | public override readonly string ToString(); |
| 2541 | } |
| 2542 | public enum ConversationTurnDetectionKind { |
| 2543 | ServerVoiceActivityDetection = 0, |
| 2544 | Disabled = 1 |
| 2545 | } |
| 2546 | public class ConversationTurnDetectionOptions : IJsonModel<ConversationTurnDetectionOptions>, IPersistableModel<ConversationTurnDetectionOptions> { |
| 2547 | public ConversationTurnDetectionKind Kind { get; protected internal set; } |
| 2548 | public static ConversationTurnDetectionOptions CreateDisabledTurnDetectionOptions(); |
| 2549 | public static ConversationTurnDetectionOptions CreateServerVoiceActivityTurnDetectionOptions(float? detectionThreshold = null, TimeSpan? prefixPaddingDuration = null, TimeSpan? silenceDuration = null, bool? enableAutomaticResponseCreation = null); |
| 2550 | public static explicit operator ConversationTurnDetectionOptions(ClientResult result); |
| 2551 | public static implicit operator BinaryContent(ConversationTurnDetectionOptions conversationTurnDetectionOptions); |
| 2552 | } |
| 2553 | public class ConversationUpdate : IJsonModel<ConversationUpdate>, IPersistableModel<ConversationUpdate> { |
| 2554 | public string EventId { get; } |
| 2555 | public ConversationUpdateKind Kind { get; protected internal set; } |
| 2556 | public BinaryData GetRawContent(); |
| 2557 | public static explicit operator ConversationUpdate(ClientResult result); |
| 2558 | public static implicit operator BinaryContent(ConversationUpdate conversationUpdate); |
| 2559 | } |
| 2560 | public enum ConversationUpdateKind { |
| 2561 | Unknown = 0, |
| 2562 | SessionStarted = 1, |
| 2563 | SessionConfigured = 2, |
| 2564 | ItemCreated = 3, |
| 2565 | ConversationCreated = 4, |
| 2566 | ItemDeleted = 5, |
| 2567 | ItemTruncated = 6, |
| 2568 | ResponseStarted = 7, |
| 2569 | ResponseFinished = 8, |
| 2570 | RateLimitsUpdated = 9, |
| 2571 | ItemStreamingStarted = 10, |
| 2572 | ItemStreamingFinished = 11, |
| 2573 | ItemContentPartStarted = 12, |
| 2574 | ItemContentPartFinished = 13, |
| 2575 | ItemStreamingPartAudioDelta = 14, |
| 2576 | ItemStreamingPartAudioFinished = 15, |
| 2577 | ItemStreamingPartAudioTranscriptionDelta = 16, |
| 2578 | ItemStreamingPartAudioTranscriptionFinished = 17, |
| 2579 | ItemStreamingPartTextDelta = 18, |
| 2580 | ItemStreamingPartTextFinished = 19, |
| 2581 | ItemStreamingFunctionCallArgumentsDelta = 20, |
| 2582 | ItemStreamingFunctionCallArgumentsFinished = 21, |
| 2583 | InputSpeechStarted = 22, |
| 2584 | InputSpeechStopped = 23, |
| 2585 | InputTranscriptionFinished = 24, |
| 2586 | InputTranscriptionFailed = 25, |
| 2587 | InputAudioCommitted = 26, |
| 2588 | InputAudioCleared = 27, |
| 2589 | Error = 28 |
| 2590 | } |
| 2591 | public readonly partial struct ConversationVoice : IEquatable<ConversationVoice> { |
| 2592 | public ConversationVoice(string value); |
| 2593 | public static ConversationVoice Alloy { get; } |
| 2594 | public static ConversationVoice Ash { get; } |
| 2595 | public static ConversationVoice Ballad { get; } |
| 2596 | public static ConversationVoice Coral { get; } |
| 2597 | public static ConversationVoice Echo { get; } |
| 2598 | public static ConversationVoice Sage { get; } |
| 2599 | public static ConversationVoice Shimmer { get; } |
| 2600 | public static ConversationVoice Verse { get; } |
| 2601 | public readonly bool Equals(ConversationVoice other); |
| 2602 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2603 | public override readonly bool Equals(object obj); |
| 2604 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2605 | public override readonly int GetHashCode(); |
| 2606 | public static bool operator ==(ConversationVoice left, ConversationVoice right); |
| 2607 | public static implicit operator ConversationVoice(string value); |
| 2608 | public static bool operator !=(ConversationVoice left, ConversationVoice right); |
| 2609 | public override readonly string ToString(); |
| 2610 | } |
| 2611 | public class RealtimeConversationClient { |
| 2612 | protected RealtimeConversationClient(); |
| 2613 | protected internal RealtimeConversationClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 2614 | public RealtimeConversationClient(string model, ApiKeyCredential credential, OpenAIClientOptions options); |
| 2615 | public RealtimeConversationClient(string model, ApiKeyCredential credential); |
| 2616 | public ClientPipeline Pipeline { get; } |
| 2617 | public event EventHandler<BinaryData> OnReceivingCommand { add; remove; } |
| 2618 | public event EventHandler<BinaryData> OnSendingCommand { add; remove; } |
| 2619 | public RealtimeConversationSession StartConversationSession(CancellationToken cancellationToken = default); |
| 2620 | public virtual Task<RealtimeConversationSession> StartConversationSessionAsync(RequestOptions options); |
| 2621 | public virtual Task<RealtimeConversationSession> StartConversationSessionAsync(CancellationToken cancellationToken = default); |
| 2622 | } |
| 2623 | public class RealtimeConversationSession : IDisposable { |
| 2624 | protected internal RealtimeConversationSession(RealtimeConversationClient parentClient, Uri endpoint, ApiKeyCredential credential); |
| 2625 | public Net.WebSockets.WebSocket WebSocket { get; protected set; } |
| 2626 | public virtual void AddItem(ConversationItem item, string previousItemId, CancellationToken cancellationToken = default); |
| 2627 | public virtual void AddItem(ConversationItem item, CancellationToken cancellationToken = default); |
| 2628 | public virtual Task AddItemAsync(ConversationItem item, string previousItemId, CancellationToken cancellationToken = default); |
| 2629 | public virtual Task AddItemAsync(ConversationItem item, CancellationToken cancellationToken = default); |
| 2630 | public virtual void CancelResponse(CancellationToken cancellationToken = default); |
| 2631 | public virtual Task CancelResponseAsync(CancellationToken cancellationToken = default); |
| 2632 | public virtual void ClearInputAudio(CancellationToken cancellationToken = default); |
| 2633 | public virtual Task ClearInputAudioAsync(CancellationToken cancellationToken = default); |
| 2634 | public virtual void CommitPendingAudio(CancellationToken cancellationToken = default); |
| 2635 | public virtual Task CommitPendingAudioAsync(CancellationToken cancellationToken = default); |
| 2636 | public virtual void ConfigureSession(ConversationSessionOptions sessionOptions, CancellationToken cancellationToken = default); |
| 2637 | public virtual Task ConfigureSessionAsync(ConversationSessionOptions sessionOptions, CancellationToken cancellationToken = default); |
| 2638 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2639 | protected internal virtual void Connect(RequestOptions options); |
| 2640 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2641 | protected internal virtual Task ConnectAsync(RequestOptions options); |
| 2642 | public virtual void DeleteItem(string itemId, CancellationToken cancellationToken = default); |
| 2643 | public virtual Task DeleteItemAsync(string itemId, CancellationToken cancellationToken = default); |
| 2644 | public void Dispose(); |
| 2645 | public virtual void InterruptResponse(CancellationToken cancellationToken = default); |
| 2646 | public virtual Task InterruptResponseAsync(CancellationToken cancellationToken = default); |
| 2647 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2648 | public virtual IEnumerable<ClientResult> ReceiveUpdates(RequestOptions options); |
| 2649 | public virtual IEnumerable<ConversationUpdate> ReceiveUpdates(CancellationToken cancellationToken = default); |
| 2650 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2651 | public virtual IAsyncEnumerable<ClientResult> ReceiveUpdatesAsync(RequestOptions options); |
| 2652 | public virtual IAsyncEnumerable<ConversationUpdate> ReceiveUpdatesAsync(CancellationToken cancellationToken = default); |
| 2653 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2654 | public virtual void SendCommand(BinaryData data, RequestOptions options); |
| 2655 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2656 | public virtual Task SendCommandAsync(BinaryData data, RequestOptions options); |
| 2657 | public virtual void SendInputAudio(BinaryData audio, CancellationToken cancellationToken = default); |
| 2658 | public virtual void SendInputAudio(Stream audio, CancellationToken cancellationToken = default); |
| 2659 | public virtual Task SendInputAudioAsync(BinaryData audio, CancellationToken cancellationToken = default); |
| 2660 | public virtual Task SendInputAudioAsync(Stream audio, CancellationToken cancellationToken = default); |
| 2661 | public virtual void StartResponse(ConversationResponseOptions options, CancellationToken cancellationToken = default); |
| 2662 | public void StartResponse(CancellationToken cancellationToken = default); |
| 2663 | public virtual Task StartResponseAsync(ConversationResponseOptions options, CancellationToken cancellationToken = default); |
| 2664 | public virtual Task StartResponseAsync(CancellationToken cancellationToken = default); |
| 2665 | public virtual void TruncateItem(string itemId, int contentPartIndex, TimeSpan audioDuration, CancellationToken cancellationToken = default); |
| 2666 | public virtual Task TruncateItemAsync(string itemId, int contentPartIndex, TimeSpan audioDuration, CancellationToken cancellationToken = default); |
| 2667 | } |
| 2668 | public readonly partial struct ResponseConversationSelection : IEquatable<ResponseConversationSelection> { |
| 2669 | public ResponseConversationSelection(string value); |
| 2670 | public static ResponseConversationSelection Auto { get; } |
| 2671 | public static ResponseConversationSelection None { get; } |
| 2672 | public readonly bool Equals(ResponseConversationSelection other); |
| 2673 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2674 | public override readonly bool Equals(object obj); |
| 2675 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2676 | public override readonly int GetHashCode(); |
| 2677 | public static bool operator ==(ResponseConversationSelection left, ResponseConversationSelection right); |
| 2678 | public static implicit operator ResponseConversationSelection(string value); |
| 2679 | public static bool operator !=(ResponseConversationSelection left, ResponseConversationSelection right); |
| 2680 | public override readonly string ToString(); |
| 2681 | } |
| 2682 | } |
| 2683 | namespace OpenAI.Responses { |
| 2684 | public class ComputerCallAction : IJsonModel<ComputerCallAction>, IPersistableModel<ComputerCallAction> { |
| 2685 | public Drawing.Point? ClickCoordinates { get; } |
| 2686 | public ComputerCallActionMouseButton? ClickMouseButton { get; } |
| 2687 | public Drawing.Point? DoubleClickCoordinates { get; } |
| 2688 | public IList<Drawing.Point> DragPath { get; } |
| 2689 | public IList<string> KeyPressKeyCodes { get; } |
| 2690 | public ComputerCallActionKind Kind { get; } |
| 2691 | public Drawing.Point? MoveCoordinates { get; } |
| 2692 | public Drawing.Point? ScrollCoordinates { get; } |
| 2693 | public int? ScrollHorizontalOffset { get; } |
| 2694 | public int? ScrollVerticalOffset { get; } |
| 2695 | public string TypeText { get; } |
| 2696 | public static ComputerCallAction CreateClickAction(Drawing.Point clickCoordinates, ComputerCallActionMouseButton clickMouseButton); |
| 2697 | public static ComputerCallAction CreateDoubleClickAction(Drawing.Point doubleClickCoordinates, ComputerCallActionMouseButton doubleClickMouseButton); |
| 2698 | public static ComputerCallAction CreateDragAction(IList<Drawing.Point> dragPath); |
| 2699 | public static ComputerCallAction CreateKeyPressAction(IList<string> keyCodes); |
| 2700 | public static ComputerCallAction CreateMoveAction(Drawing.Point moveCoordinates); |
| 2701 | public static ComputerCallAction CreateScreenshotAction(); |
| 2702 | public static ComputerCallAction CreateScrollAction(Drawing.Point scrollCoordinates, int horizontalOffset, int verticalOffset); |
| 2703 | public static ComputerCallAction CreateTypeAction(string typeText); |
| 2704 | public static ComputerCallAction CreateWaitAction(); |
| 2705 | public static explicit operator ComputerCallAction(ClientResult result); |
| 2706 | public static implicit operator BinaryContent(ComputerCallAction computerCallAction); |
| 2707 | } |
| 2708 | public enum ComputerCallActionKind { |
| 2709 | Click = 0, |
| 2710 | DoubleClick = 1, |
| 2711 | Drag = 2, |
| 2712 | KeyPress = 3, |
| 2713 | Move = 4, |
| 2714 | Screenshot = 5, |
| 2715 | Scroll = 6, |
| 2716 | Type = 7, |
| 2717 | Wait = 8 |
| 2718 | } |
| 2719 | public enum ComputerCallActionMouseButton { |
| 2720 | Left = 0, |
| 2721 | Right = 1, |
| 2722 | Wheel = 2, |
| 2723 | Back = 3, |
| 2724 | Forward = 4 |
| 2725 | } |
| 2726 | public class ComputerCallOutputResponseItem : ResponseItem, IJsonModel<ComputerCallOutputResponseItem>, IPersistableModel<ComputerCallOutputResponseItem> { |
| 2727 | public ComputerCallOutputResponseItem(string callId, IEnumerable<ComputerCallSafetyCheck> acknowledgedSafetyChecks, ComputerOutput output); |
| 2728 | public IList<ComputerCallSafetyCheck> AcknowledgedSafetyChecks { get; } |
| 2729 | public string CallId { get; set; } |
| 2730 | public ComputerOutput Output { get; set; } |
| 2731 | public ComputerCallOutputStatus? Status { get; } |
| 2732 | public new static explicit operator ComputerCallOutputResponseItem(ClientResult result); |
| 2733 | public static implicit operator BinaryContent(ComputerCallOutputResponseItem computerCallOutputResponseItem); |
| 2734 | } |
| 2735 | public enum ComputerCallOutputStatus { |
| 2736 | InProgress = 0, |
| 2737 | Completed = 1, |
| 2738 | Incomplete = 2 |
| 2739 | } |
| 2740 | public class ComputerCallResponseItem : ResponseItem, IJsonModel<ComputerCallResponseItem>, IPersistableModel<ComputerCallResponseItem> { |
| 2741 | public ComputerCallResponseItem(string callId, ComputerCallAction action, IEnumerable<ComputerCallSafetyCheck> pendingSafetyChecks); |
| 2742 | public ComputerCallAction Action { get; set; } |
| 2743 | public string CallId { get; set; } |
| 2744 | public IList<ComputerCallSafetyCheck> PendingSafetyChecks { get; } |
| 2745 | public ComputerCallStatus Status { get; } |
| 2746 | public new static explicit operator ComputerCallResponseItem(ClientResult result); |
| 2747 | public static implicit operator BinaryContent(ComputerCallResponseItem computerCallResponseItem); |
| 2748 | } |
| 2749 | public class ComputerCallSafetyCheck : IJsonModel<ComputerCallSafetyCheck>, IPersistableModel<ComputerCallSafetyCheck> { |
| 2750 | public ComputerCallSafetyCheck(string id, string code, string message); |
| 2751 | public string Code { get; set; } |
| 2752 | public string Id { get; set; } |
| 2753 | public string Message { get; set; } |
| 2754 | public static explicit operator ComputerCallSafetyCheck(ClientResult result); |
| 2755 | public static implicit operator BinaryContent(ComputerCallSafetyCheck computerCallSafetyCheck); |
| 2756 | } |
| 2757 | public enum ComputerCallStatus { |
| 2758 | InProgress = 0, |
| 2759 | Completed = 1, |
| 2760 | Incomplete = 2 |
| 2761 | } |
| 2762 | public class ComputerOutput : IJsonModel<ComputerOutput>, IPersistableModel<ComputerOutput> { |
| 2763 | public static ComputerOutput CreateScreenshotOutput(BinaryData screenshotImageBytes, string screenshotImageBytesMediaType); |
| 2764 | public static ComputerOutput CreateScreenshotOutput(string screenshotImageFileId); |
| 2765 | public static ComputerOutput CreateScreenshotOutput(Uri screenshotImageUri); |
| 2766 | public static explicit operator ComputerOutput(ClientResult result); |
| 2767 | public static implicit operator BinaryContent(ComputerOutput computerOutput); |
| 2768 | } |
| 2769 | public readonly partial struct ComputerToolEnvironment : IEquatable<ComputerToolEnvironment> { |
| 2770 | public ComputerToolEnvironment(string value); |
| 2771 | public static ComputerToolEnvironment Browser { get; } |
| 2772 | public static ComputerToolEnvironment Mac { get; } |
| 2773 | public static ComputerToolEnvironment Ubuntu { get; } |
| 2774 | public static ComputerToolEnvironment Windows { get; } |
| 2775 | public readonly bool Equals(ComputerToolEnvironment other); |
| 2776 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2777 | public override readonly bool Equals(object obj); |
| 2778 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2779 | public override readonly int GetHashCode(); |
| 2780 | public static bool operator ==(ComputerToolEnvironment left, ComputerToolEnvironment right); |
| 2781 | public static implicit operator ComputerToolEnvironment(string value); |
| 2782 | public static bool operator !=(ComputerToolEnvironment left, ComputerToolEnvironment right); |
| 2783 | public override readonly string ToString(); |
| 2784 | } |
| 2785 | public class FileSearchCallResponseItem : ResponseItem, IJsonModel<FileSearchCallResponseItem>, IPersistableModel<FileSearchCallResponseItem> { |
| 2786 | public FileSearchCallResponseItem(IEnumerable<string> queries, IEnumerable<FileSearchCallResult> results); |
| 2787 | public IList<string> Queries { get; } |
| 2788 | public IList<FileSearchCallResult> Results { get; set; } |
| 2789 | public FileSearchCallStatus Status { get; } |
| 2790 | public new static explicit operator FileSearchCallResponseItem(ClientResult result); |
| 2791 | public static implicit operator BinaryContent(FileSearchCallResponseItem fileSearchCallResponseItem); |
| 2792 | } |
| 2793 | public class FileSearchCallResult : IJsonModel<FileSearchCallResult>, IPersistableModel<FileSearchCallResult> { |
| 2794 | public IDictionary<string, BinaryData> Attributes { get; } |
| 2795 | public string FileId { get; set; } |
| 2796 | public string Filename { get; set; } |
| 2797 | public float? Score { get; set; } |
| 2798 | public string Text { get; set; } |
| 2799 | public static explicit operator FileSearchCallResult(ClientResult result); |
| 2800 | public static implicit operator BinaryContent(FileSearchCallResult fileSearchCallResult); |
| 2801 | } |
| 2802 | public enum FileSearchCallStatus { |
| 2803 | InProgress = 0, |
| 2804 | Searching = 1, |
| 2805 | Completed = 2, |
| 2806 | Incomplete = 3, |
| 2807 | Failed = 4 |
| 2808 | } |
| 2809 | public readonly partial struct FileSearchToolRanker : IEquatable<FileSearchToolRanker> { |
| 2810 | public FileSearchToolRanker(string value); |
| 2811 | public static FileSearchToolRanker Auto { get; } |
| 2812 | public static FileSearchToolRanker Default20241115 { get; } |
| 2813 | public readonly bool Equals(FileSearchToolRanker other); |
| 2814 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2815 | public override readonly bool Equals(object obj); |
| 2816 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2817 | public override readonly int GetHashCode(); |
| 2818 | public static bool operator ==(FileSearchToolRanker left, FileSearchToolRanker right); |
| 2819 | public static implicit operator FileSearchToolRanker(string value); |
| 2820 | public static bool operator !=(FileSearchToolRanker left, FileSearchToolRanker right); |
| 2821 | public override readonly string ToString(); |
| 2822 | } |
| 2823 | public class FileSearchToolRankingOptions : IJsonModel<FileSearchToolRankingOptions>, IPersistableModel<FileSearchToolRankingOptions> { |
| 2824 | public FileSearchToolRanker? Ranker { get; set; } |
| 2825 | public float? ScoreThreshold { get; set; } |
| 2826 | public static explicit operator FileSearchToolRankingOptions(ClientResult result); |
| 2827 | public static implicit operator BinaryContent(FileSearchToolRankingOptions fileSearchToolRankingOptions); |
| 2828 | } |
| 2829 | public class FunctionCallOutputResponseItem : ResponseItem, IJsonModel<FunctionCallOutputResponseItem>, IPersistableModel<FunctionCallOutputResponseItem> { |
| 2830 | public FunctionCallOutputResponseItem(string callId, string functionOutput); |
| 2831 | public string CallId { get; set; } |
| 2832 | public string FunctionOutput { get; set; } |
| 2833 | public FunctionCallOutputStatus? Status { get; } |
| 2834 | public new static explicit operator FunctionCallOutputResponseItem(ClientResult result); |
| 2835 | public static implicit operator BinaryContent(FunctionCallOutputResponseItem functionCallOutputResponseItem); |
| 2836 | } |
| 2837 | public enum FunctionCallOutputStatus { |
| 2838 | InProgress = 0, |
| 2839 | Completed = 1, |
| 2840 | Incomplete = 2 |
| 2841 | } |
| 2842 | public class FunctionCallResponseItem : ResponseItem, IJsonModel<FunctionCallResponseItem>, IPersistableModel<FunctionCallResponseItem> { |
| 2843 | public FunctionCallResponseItem(string callId, string functionName, BinaryData functionArguments); |
| 2844 | public string CallId { get; set; } |
| 2845 | public BinaryData FunctionArguments { get; set; } |
| 2846 | public string FunctionName { get; set; } |
| 2847 | public FunctionCallStatus? Status { get; } |
| 2848 | public new static explicit operator FunctionCallResponseItem(ClientResult result); |
| 2849 | public static implicit operator BinaryContent(FunctionCallResponseItem functionCallResponseItem); |
| 2850 | } |
| 2851 | public enum FunctionCallStatus { |
| 2852 | InProgress = 0, |
| 2853 | Completed = 1, |
| 2854 | Incomplete = 2 |
| 2855 | } |
| 2856 | public class MessageResponseItem : ResponseItem, IJsonModel<MessageResponseItem>, IPersistableModel<MessageResponseItem> { |
| 2857 | public IList<ResponseContentPart> Content { get; } |
| 2858 | public MessageRole Role { get; } |
| 2859 | public MessageStatus? Status { get; } |
| 2860 | public new static explicit operator MessageResponseItem(ClientResult result); |
| 2861 | public static implicit operator BinaryContent(MessageResponseItem messageResponseItem); |
| 2862 | } |
| 2863 | public enum MessageRole { |
| 2864 | Unknown = 0, |
| 2865 | Assistant = 1, |
| 2866 | Developer = 2, |
| 2867 | System = 3, |
| 2868 | User = 4 |
| 2869 | } |
| 2870 | public enum MessageStatus { |
| 2871 | InProgress = 0, |
| 2872 | Completed = 1, |
| 2873 | Incomplete = 2 |
| 2874 | } |
| 2875 | public class OpenAIResponse : IJsonModel<OpenAIResponse>, IPersistableModel<OpenAIResponse> { |
| 2876 | public DateTimeOffset CreatedAt { get; } |
| 2877 | public string EndUserId { get; } |
| 2878 | public ResponseError Error { get; } |
| 2879 | public string Id { get; } |
| 2880 | public ResponseIncompleteStatusDetails IncompleteStatusDetails { get; } |
| 2881 | public string Instructions { get; } |
| 2882 | public int? MaxOutputTokenCount { get; } |
| 2883 | public IDictionary<string, string> Metadata { get; } |
| 2884 | public string Model { get; } |
| 2885 | public IList<ResponseItem> OutputItems { get; } |
| 2886 | public bool ParallelToolCallsEnabled { get; } |
| 2887 | public string PreviousResponseId { get; } |
| 2888 | public ResponseReasoningOptions ReasoningOptions { get; } |
| 2889 | public ResponseStatus? Status { get; } |
| 2890 | public float Temperature { get; } |
| 2891 | public ResponseTextOptions TextOptions { get; } |
| 2892 | public ResponseToolChoice ToolChoice { get; } |
| 2893 | public IList<ResponseTool> Tools { get; } |
| 2894 | public float TopP { get; } |
| 2895 | public ResponseTruncationMode? TruncationMode { get; } |
| 2896 | public ResponseTokenUsage Usage { get; } |
| 2897 | public string GetOutputText(); |
| 2898 | public static explicit operator OpenAIResponse(ClientResult result); |
| 2899 | public static implicit operator BinaryContent(OpenAIResponse openAIResponse); |
| 2900 | } |
| 2901 | public class OpenAIResponseClient { |
| 2902 | protected OpenAIResponseClient(); |
| 2903 | protected internal OpenAIResponseClient(ClientPipeline pipeline, string model, OpenAIClientOptions options); |
| 2904 | public OpenAIResponseClient(string model, ApiKeyCredential credential, OpenAIClientOptions options); |
| 2905 | public OpenAIResponseClient(string model, ApiKeyCredential credential); |
| 2906 | public OpenAIResponseClient(string model, string apiKey); |
| 2907 | public ClientPipeline Pipeline { get; } |
| 2908 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2909 | public virtual ClientResult CreateResponse(BinaryContent content, RequestOptions options = null); |
| 2910 | public virtual ClientResult<OpenAIResponse> CreateResponse(IEnumerable<ResponseItem> inputItems, ResponseCreationOptions options = null, CancellationToken cancellationToken = default); |
| 2911 | public virtual ClientResult<OpenAIResponse> CreateResponse(string userInputText, ResponseCreationOptions options = null, CancellationToken cancellationToken = default); |
| 2912 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2913 | public virtual Task<ClientResult> CreateResponseAsync(BinaryContent content, RequestOptions options = null); |
| 2914 | public virtual Task<ClientResult<OpenAIResponse>> CreateResponseAsync(IEnumerable<ResponseItem> inputItems, ResponseCreationOptions options = null, CancellationToken cancellationToken = default); |
| 2915 | public virtual Task<ClientResult<OpenAIResponse>> CreateResponseAsync(string userInputText, ResponseCreationOptions options = null, CancellationToken cancellationToken = default); |
| 2916 | public virtual CollectionResult<StreamingResponseUpdate> CreateResponseStreaming(IEnumerable<ResponseItem> inputItems, ResponseCreationOptions options = null, CancellationToken cancellationToken = default); |
| 2917 | public virtual CollectionResult<StreamingResponseUpdate> CreateResponseStreaming(string userInputText, ResponseCreationOptions options = null, CancellationToken cancellationToken = default); |
| 2918 | public virtual AsyncCollectionResult<StreamingResponseUpdate> CreateResponseStreamingAsync(IEnumerable<ResponseItem> inputItems, ResponseCreationOptions options = null, CancellationToken cancellationToken = default); |
| 2919 | public virtual AsyncCollectionResult<StreamingResponseUpdate> CreateResponseStreamingAsync(string userInputText, ResponseCreationOptions options = null, CancellationToken cancellationToken = default); |
| 2920 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2921 | public virtual ClientResult DeleteResponse(string responseId, RequestOptions options); |
| 2922 | public virtual ClientResult<ResponseDeletionResult> DeleteResponse(string responseId, CancellationToken cancellationToken = default); |
| 2923 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2924 | public virtual Task<ClientResult> DeleteResponseAsync(string responseId, RequestOptions options); |
| 2925 | public virtual Task<ClientResult<ResponseDeletionResult>> DeleteResponseAsync(string responseId, CancellationToken cancellationToken = default); |
| 2926 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2927 | public virtual ClientResult GetResponse(string responseId, RequestOptions options); |
| 2928 | public virtual ClientResult<OpenAIResponse> GetResponse(string responseId, CancellationToken cancellationToken = default); |
| 2929 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2930 | public virtual Task<ClientResult> GetResponseAsync(string responseId, RequestOptions options); |
| 2931 | public virtual Task<ClientResult<OpenAIResponse>> GetResponseAsync(string responseId, CancellationToken cancellationToken = default); |
| 2932 | public virtual CollectionResult<ResponseItem> GetResponseInputItems(string responseId, ResponseItemCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 2933 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2934 | public virtual CollectionResult GetResponseInputItems(string responseId, int? limit, string order, string after, string before, RequestOptions options = null); |
| 2935 | public virtual AsyncCollectionResult<ResponseItem> GetResponseInputItemsAsync(string responseId, ResponseItemCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 2936 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2937 | public virtual AsyncCollectionResult GetResponseInputItemsAsync(string responseId, int? limit, string order, string after, string before, RequestOptions options = null); |
| 2938 | } |
| 2939 | public class ReasoningResponseItem : ResponseItem, IJsonModel<ReasoningResponseItem>, IPersistableModel<ReasoningResponseItem> { |
| 2940 | public ReasoningResponseItem(IEnumerable<string> summaryTextParts); |
| 2941 | public ReasoningStatus? Status { get; } |
| 2942 | public IReadOnlyList<string> SummaryTextParts { get; } |
| 2943 | public new static explicit operator ReasoningResponseItem(ClientResult result); |
| 2944 | public static implicit operator BinaryContent(ReasoningResponseItem reasoningResponseItem); |
| 2945 | } |
| 2946 | public enum ReasoningStatus { |
| 2947 | InProgress = 0, |
| 2948 | Completed = 1, |
| 2949 | Incomplete = 2 |
| 2950 | } |
| 2951 | public class ReferenceResponseItem : ResponseItem, IJsonModel<ReferenceResponseItem>, IPersistableModel<ReferenceResponseItem> { |
| 2952 | public ReferenceResponseItem(string id); |
| 2953 | public new static explicit operator ReferenceResponseItem(ClientResult result); |
| 2954 | public static implicit operator BinaryContent(ReferenceResponseItem referenceResponseItem); |
| 2955 | } |
| 2956 | public class ResponseContentPart : IJsonModel<ResponseContentPart>, IPersistableModel<ResponseContentPart> { |
| 2957 | public BinaryData InputFileBytes { get; } |
| 2958 | public string InputFileId { get; } |
| 2959 | public string InputFilename { get; } |
| 2960 | public ResponseImageDetailLevel? InputImageDetailLevel { get; } |
| 2961 | public string InputImageFileId { get; } |
| 2962 | public ResponseContentPartKind Kind { get; } |
| 2963 | public IReadOnlyList<ResponseMessageAnnotation> OutputTextAnnotations { get; } |
| 2964 | public string Refusal { get; } |
| 2965 | public string Text { get; } |
| 2966 | public static ResponseContentPart CreateInputFilePart(string fileId, string filename, BinaryData fileBytes); |
| 2967 | public static ResponseContentPart CreateInputImagePart(BinaryData imageBytes, string imageBytesMediaType, ResponseImageDetailLevel? imageDetailLevel = null); |
| 2968 | public static ResponseContentPart CreateInputImagePart(string imageFileId, ResponseImageDetailLevel? imageDetailLevel = null); |
| 2969 | public static ResponseContentPart CreateInputImagePart(Uri imageUri, ResponseImageDetailLevel? imageDetailLevel = null); |
| 2970 | public static ResponseContentPart CreateInputTextPart(string text); |
| 2971 | public static ResponseContentPart CreateOutputTextPart(string text, IEnumerable<ResponseMessageAnnotation> annotations); |
| 2972 | public static ResponseContentPart CreateRefusalPart(string refusal); |
| 2973 | public static explicit operator ResponseContentPart(ClientResult result); |
| 2974 | public static implicit operator BinaryContent(ResponseContentPart responseContentPart); |
| 2975 | } |
| 2976 | public enum ResponseContentPartKind { |
| 2977 | Unknown = 0, |
| 2978 | InputText = 1, |
| 2979 | InputImage = 2, |
| 2980 | InputFile = 3, |
| 2981 | OutputText = 4, |
| 2982 | Refusal = 5 |
| 2983 | } |
| 2984 | public class ResponseCreationOptions : IJsonModel<ResponseCreationOptions>, IPersistableModel<ResponseCreationOptions> { |
| 2985 | public string EndUserId { get; set; } |
| 2986 | public string Instructions { get; set; } |
| 2987 | public int? MaxOutputTokenCount { get; set; } |
| 2988 | public IDictionary<string, string> Metadata { get; } |
| 2989 | public bool? ParallelToolCallsEnabled { get; set; } |
| 2990 | public string PreviousResponseId { get; set; } |
| 2991 | public ResponseReasoningOptions ReasoningOptions { get; set; } |
| 2992 | public bool? StoredOutputEnabled { get; set; } |
| 2993 | public float? Temperature { get; set; } |
| 2994 | public ResponseTextOptions TextOptions { get; set; } |
| 2995 | public ResponseToolChoice ToolChoice { get; set; } |
| 2996 | public IList<ResponseTool> Tools { get; } |
| 2997 | public float? TopP { get; set; } |
| 2998 | public ResponseTruncationMode? TruncationMode { get; set; } |
| 2999 | public static explicit operator ResponseCreationOptions(ClientResult result); |
| 3000 | public static implicit operator BinaryContent(ResponseCreationOptions responseCreationOptions); |
| 3001 | } |
| 3002 | public class ResponseDeletionResult : IJsonModel<ResponseDeletionResult>, IPersistableModel<ResponseDeletionResult> { |
| 3003 | public bool Deleted { get; } |
| 3004 | public string Id { get; } |
| 3005 | public static explicit operator ResponseDeletionResult(ClientResult result); |
| 3006 | public static implicit operator BinaryContent(ResponseDeletionResult responseDeletionResult); |
| 3007 | } |
| 3008 | public class ResponseError : IJsonModel<ResponseError>, IPersistableModel<ResponseError> { |
| 3009 | public string Code { get; } |
| 3010 | public string Message { get; } |
| 3011 | public static explicit operator ResponseError(ClientResult result); |
| 3012 | public static implicit operator BinaryContent(ResponseError responseError); |
| 3013 | } |
| 3014 | public readonly partial struct ResponseImageDetailLevel : IEquatable<ResponseImageDetailLevel> { |
| 3015 | public ResponseImageDetailLevel(string value); |
| 3016 | public static ResponseImageDetailLevel Auto { get; } |
| 3017 | public static ResponseImageDetailLevel High { get; } |
| 3018 | public static ResponseImageDetailLevel Low { get; } |
| 3019 | public readonly bool Equals(ResponseImageDetailLevel other); |
| 3020 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3021 | public override readonly bool Equals(object obj); |
| 3022 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3023 | public override readonly int GetHashCode(); |
| 3024 | public static bool operator ==(ResponseImageDetailLevel left, ResponseImageDetailLevel right); |
| 3025 | public static implicit operator ResponseImageDetailLevel(string value); |
| 3026 | public static bool operator !=(ResponseImageDetailLevel left, ResponseImageDetailLevel right); |
| 3027 | public override readonly string ToString(); |
| 3028 | } |
| 3029 | public class ResponseIncompleteStatusDetails : IJsonModel<ResponseIncompleteStatusDetails>, IPersistableModel<ResponseIncompleteStatusDetails> { |
| 3030 | public ResponseIncompleteStatusReason? Reason { get; } |
| 3031 | public static explicit operator ResponseIncompleteStatusDetails(ClientResult result); |
| 3032 | public static implicit operator BinaryContent(ResponseIncompleteStatusDetails responseIncompleteStatusDetails); |
| 3033 | } |
| 3034 | public readonly partial struct ResponseIncompleteStatusReason : IEquatable<ResponseIncompleteStatusReason> { |
| 3035 | public ResponseIncompleteStatusReason(string value); |
| 3036 | public static ResponseIncompleteStatusReason ContentFilter { get; } |
| 3037 | public static ResponseIncompleteStatusReason MaxOutputTokens { get; } |
| 3038 | public readonly bool Equals(ResponseIncompleteStatusReason other); |
| 3039 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3040 | public override readonly bool Equals(object obj); |
| 3041 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3042 | public override readonly int GetHashCode(); |
| 3043 | public static bool operator ==(ResponseIncompleteStatusReason left, ResponseIncompleteStatusReason right); |
| 3044 | public static implicit operator ResponseIncompleteStatusReason(string value); |
| 3045 | public static bool operator !=(ResponseIncompleteStatusReason left, ResponseIncompleteStatusReason right); |
| 3046 | public override readonly string ToString(); |
| 3047 | } |
| 3048 | public class ResponseItem : IJsonModel<ResponseItem>, IPersistableModel<ResponseItem> { |
| 3049 | public string Id { get; } |
| 3050 | public static MessageResponseItem CreateAssistantMessageItem(IEnumerable<ResponseContentPart> contentParts); |
| 3051 | public static MessageResponseItem CreateAssistantMessageItem(string outputTextContent, IEnumerable<ResponseMessageAnnotation> annotations = null); |
| 3052 | public static ResponseItem CreateComputerCallItem(string callId, ComputerCallAction action, IEnumerable<ComputerCallSafetyCheck> pendingSafetyChecks); |
| 3053 | public static ResponseItem CreateComputerCallOutputItem(string callId, IList<ComputerCallSafetyCheck> acknowledgedSafetyChecks, BinaryData screenshotImageBytes, string screenshotImageBytesMediaType); |
| 3054 | public static ResponseItem CreateComputerCallOutputItem(string callId, IList<ComputerCallSafetyCheck> acknowledgedSafetyChecks, string screenshotImageFileId); |
| 3055 | public static ResponseItem CreateComputerCallOutputItem(string callId, IList<ComputerCallSafetyCheck> acknowledgedSafetyChecks, Uri screenshotImageUri); |
| 3056 | public static MessageResponseItem CreateDeveloperMessageItem(IEnumerable<ResponseContentPart> contentParts); |
| 3057 | public static MessageResponseItem CreateDeveloperMessageItem(string inputTextContent); |
| 3058 | public static FileSearchCallResponseItem CreateFileSearchCallItem(IEnumerable<string> queries, IEnumerable<FileSearchCallResult> results); |
| 3059 | public static FunctionCallResponseItem CreateFunctionCallItem(string callId, string functionName, BinaryData functionArguments); |
| 3060 | public static FunctionCallOutputResponseItem CreateFunctionCallOutputItem(string callId, string functionOutput); |
| 3061 | public static ReasoningResponseItem CreateReasoningItem(IEnumerable<string> summaryTextParts); |
| 3062 | public static ReferenceResponseItem CreateReferenceItem(string id); |
| 3063 | public static MessageResponseItem CreateSystemMessageItem(IEnumerable<ResponseContentPart> contentParts); |
| 3064 | public static MessageResponseItem CreateSystemMessageItem(string inputTextContent); |
| 3065 | public static MessageResponseItem CreateUserMessageItem(IEnumerable<ResponseContentPart> contentParts); |
| 3066 | public static MessageResponseItem CreateUserMessageItem(string inputTextContent); |
| 3067 | public static WebSearchCallResponseItem CreateWebSearchCallItem(); |
| 3068 | public static explicit operator ResponseItem(ClientResult result); |
| 3069 | public static implicit operator BinaryContent(ResponseItem responseItem); |
| 3070 | } |
| 3071 | public class ResponseItemCollectionOptions { |
| 3072 | public string AfterId { get; set; } |
| 3073 | public string BeforeId { get; set; } |
| 3074 | public ResponseItemCollectionOrder? Order { get; set; } |
| 3075 | public int? PageSizeLimit { get; set; } |
| 3076 | } |
| 3077 | public readonly partial struct ResponseItemCollectionOrder : IEquatable<ResponseItemCollectionOrder> { |
| 3078 | public ResponseItemCollectionOrder(string value); |
| 3079 | public static ResponseItemCollectionOrder Ascending { get; } |
| 3080 | public static ResponseItemCollectionOrder Descending { get; } |
| 3081 | public readonly bool Equals(ResponseItemCollectionOrder other); |
| 3082 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3083 | public override readonly bool Equals(object obj); |
| 3084 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3085 | public override readonly int GetHashCode(); |
| 3086 | public static bool operator ==(ResponseItemCollectionOrder left, ResponseItemCollectionOrder right); |
| 3087 | public static implicit operator ResponseItemCollectionOrder(string value); |
| 3088 | public static bool operator !=(ResponseItemCollectionOrder left, ResponseItemCollectionOrder right); |
| 3089 | public override readonly string ToString(); |
| 3090 | } |
| 3091 | public class ResponseMessageAnnotation : IJsonModel<ResponseMessageAnnotation>, IPersistableModel<ResponseMessageAnnotation> { |
| 3092 | public string FileCitationFileId { get; } |
| 3093 | public int? FileCitationIndex { get; } |
| 3094 | public string FilePathFileId { get; } |
| 3095 | public int? FilePathIndex { get; } |
| 3096 | public ResponseMessageAnnotationKind Kind { get; } |
| 3097 | public int? UriCitationEndIndex { get; } |
| 3098 | public int? UriCitationStartIndex { get; } |
| 3099 | public string UriCitationTitle { get; } |
| 3100 | public string UriCitationUri { get; } |
| 3101 | public static explicit operator ResponseMessageAnnotation(ClientResult result); |
| 3102 | public static implicit operator BinaryContent(ResponseMessageAnnotation responseMessageAnnotation); |
| 3103 | } |
| 3104 | public enum ResponseMessageAnnotationKind { |
| 3105 | FileCitation = 0, |
| 3106 | UriCitation = 1, |
| 3107 | FilePath = 2 |
| 3108 | } |
| 3109 | public class ResponseOutputTokenUsageDetails : IJsonModel<ResponseOutputTokenUsageDetails>, IPersistableModel<ResponseOutputTokenUsageDetails> { |
| 3110 | public int ReasoningTokenCount { get; } |
| 3111 | public static explicit operator ResponseOutputTokenUsageDetails(ClientResult result); |
| 3112 | public static implicit operator BinaryContent(ResponseOutputTokenUsageDetails responseOutputTokenUsageDetails); |
| 3113 | } |
| 3114 | public readonly partial struct ResponseReasoningEffortLevel : IEquatable<ResponseReasoningEffortLevel> { |
| 3115 | public ResponseReasoningEffortLevel(string value); |
| 3116 | public static ResponseReasoningEffortLevel High { get; } |
| 3117 | public static ResponseReasoningEffortLevel Low { get; } |
| 3118 | public static ResponseReasoningEffortLevel Medium { get; } |
| 3119 | public readonly bool Equals(ResponseReasoningEffortLevel other); |
| 3120 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3121 | public override readonly bool Equals(object obj); |
| 3122 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3123 | public override readonly int GetHashCode(); |
| 3124 | public static bool operator ==(ResponseReasoningEffortLevel left, ResponseReasoningEffortLevel right); |
| 3125 | public static implicit operator ResponseReasoningEffortLevel(string value); |
| 3126 | public static bool operator !=(ResponseReasoningEffortLevel left, ResponseReasoningEffortLevel right); |
| 3127 | public override readonly string ToString(); |
| 3128 | } |
| 3129 | public class ResponseReasoningOptions : IJsonModel<ResponseReasoningOptions>, IPersistableModel<ResponseReasoningOptions> { |
| 3130 | public ResponseReasoningOptions(); |
| 3131 | public ResponseReasoningOptions(ResponseReasoningEffortLevel? reasoningEffortLevel); |
| 3132 | public ResponseReasoningEffortLevel? ReasoningEffortLevel { get; set; } |
| 3133 | public ResponseReasoningSummaryVerbosity? ReasoningSummaryVerbosity { get; set; } |
| 3134 | public static explicit operator ResponseReasoningOptions(ClientResult result); |
| 3135 | public static implicit operator BinaryContent(ResponseReasoningOptions responseReasoningOptions); |
| 3136 | } |
| 3137 | public readonly partial struct ResponseReasoningSummaryVerbosity : IEquatable<ResponseReasoningSummaryVerbosity> { |
| 3138 | public ResponseReasoningSummaryVerbosity(string value); |
| 3139 | public static ResponseReasoningSummaryVerbosity Concise { get; } |
| 3140 | public static ResponseReasoningSummaryVerbosity Detailed { get; } |
| 3141 | public readonly bool Equals(ResponseReasoningSummaryVerbosity other); |
| 3142 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3143 | public override readonly bool Equals(object obj); |
| 3144 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3145 | public override readonly int GetHashCode(); |
| 3146 | public static bool operator ==(ResponseReasoningSummaryVerbosity left, ResponseReasoningSummaryVerbosity right); |
| 3147 | public static implicit operator ResponseReasoningSummaryVerbosity(string value); |
| 3148 | public static bool operator !=(ResponseReasoningSummaryVerbosity left, ResponseReasoningSummaryVerbosity right); |
| 3149 | public override readonly string ToString(); |
| 3150 | } |
| 3151 | public enum ResponseStatus { |
| 3152 | InProgress = 0, |
| 3153 | Completed = 1, |
| 3154 | Incomplete = 2, |
| 3155 | Failed = 3 |
| 3156 | } |
| 3157 | public class ResponseTextFormat : IJsonModel<ResponseTextFormat>, IPersistableModel<ResponseTextFormat> { |
| 3158 | public ResponseTextFormatKind Kind { get; set; } |
| 3159 | public static ResponseTextFormat CreateJsonObjectFormat(); |
| 3160 | public static ResponseTextFormat CreateJsonSchemaFormat(string jsonSchemaFormatName, BinaryData jsonSchema, string jsonSchemaFormatDescription = null, bool? jsonSchemaIsStrict = null); |
| 3161 | public static ResponseTextFormat CreateTextFormat(); |
| 3162 | public static explicit operator ResponseTextFormat(ClientResult result); |
| 3163 | public static implicit operator BinaryContent(ResponseTextFormat responseTextFormat); |
| 3164 | } |
| 3165 | public enum ResponseTextFormatKind { |
| 3166 | Unknown = 0, |
| 3167 | Text = 1, |
| 3168 | JsonObject = 2, |
| 3169 | JsonSchema = 3 |
| 3170 | } |
| 3171 | public class ResponseTextOptions : IJsonModel<ResponseTextOptions>, IPersistableModel<ResponseTextOptions> { |
| 3172 | public ResponseTextFormat TextFormat { get; set; } |
| 3173 | public static explicit operator ResponseTextOptions(ClientResult result); |
| 3174 | public static implicit operator BinaryContent(ResponseTextOptions responseTextOptions); |
| 3175 | } |
| 3176 | public class ResponseTokenUsage : IJsonModel<ResponseTokenUsage>, IPersistableModel<ResponseTokenUsage> { |
| 3177 | public int InputTokenCount { get; } |
| 3178 | public int OutputTokenCount { get; } |
| 3179 | public ResponseOutputTokenUsageDetails OutputTokenDetails { get; } |
| 3180 | public int TotalTokenCount { get; } |
| 3181 | public static explicit operator ResponseTokenUsage(ClientResult result); |
| 3182 | public static implicit operator BinaryContent(ResponseTokenUsage responseTokenUsage); |
| 3183 | } |
| 3184 | public class ResponseTool : IJsonModel<ResponseTool>, IPersistableModel<ResponseTool> { |
| 3185 | public static ResponseTool CreateComputerTool(int displayWidth, int displayHeight, ComputerToolEnvironment environment); |
| 3186 | public static ResponseTool CreateFileSearchTool(IEnumerable<string> vectorStoreIds, int? maxResultCount = null, FileSearchToolRankingOptions rankingOptions = null, BinaryData filters = null); |
| 3187 | public static ResponseTool CreateFunctionTool(string functionName, string functionDescription, BinaryData functionParameters, bool functionSchemaIsStrict = false); |
| 3188 | public static ResponseTool CreateWebSearchTool(WebSearchToolLocation webSearchToolUserLocation = null, WebSearchToolContextSize? webSearchToolContextSize = null); |
| 3189 | public static explicit operator ResponseTool(ClientResult result); |
| 3190 | public static implicit operator BinaryContent(ResponseTool responseTool); |
| 3191 | } |
| 3192 | public class ResponseToolChoice : IJsonModel<ResponseToolChoice>, IPersistableModel<ResponseToolChoice> { |
| 3193 | public string FunctionName { get; } |
| 3194 | public ResponseToolChoiceKind Kind { get; } |
| 3195 | public static ResponseToolChoice CreateAutoChoice(); |
| 3196 | public static ResponseToolChoice CreateComputerChoice(); |
| 3197 | public static ResponseToolChoice CreateFileSearchChoice(); |
| 3198 | public static ResponseToolChoice CreateFunctionChoice(string functionName); |
| 3199 | public static ResponseToolChoice CreateNoneChoice(); |
| 3200 | public static ResponseToolChoice CreateRequiredChoice(); |
| 3201 | public static ResponseToolChoice CreateWebSearchChoice(); |
| 3202 | } |
| 3203 | public enum ResponseToolChoiceKind { |
| 3204 | Unknown = 0, |
| 3205 | Auto = 1, |
| 3206 | None = 2, |
| 3207 | Required = 3, |
| 3208 | Function = 4, |
| 3209 | FileSearch = 5, |
| 3210 | WebSearch = 6, |
| 3211 | Computer = 7 |
| 3212 | } |
| 3213 | public readonly partial struct ResponseTruncationMode : IEquatable<ResponseTruncationMode> { |
| 3214 | public ResponseTruncationMode(string value); |
| 3215 | public static ResponseTruncationMode Auto { get; } |
| 3216 | public static ResponseTruncationMode Disabled { get; } |
| 3217 | public readonly bool Equals(ResponseTruncationMode other); |
| 3218 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3219 | public override readonly bool Equals(object obj); |
| 3220 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3221 | public override readonly int GetHashCode(); |
| 3222 | public static bool operator ==(ResponseTruncationMode left, ResponseTruncationMode right); |
| 3223 | public static implicit operator ResponseTruncationMode(string value); |
| 3224 | public static bool operator !=(ResponseTruncationMode left, ResponseTruncationMode right); |
| 3225 | public override readonly string ToString(); |
| 3226 | } |
| 3227 | public class StreamingResponseCompletedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseCompletedUpdate>, IPersistableModel<StreamingResponseCompletedUpdate> { |
| 3228 | public OpenAIResponse Response { get; } |
| 3229 | public new static explicit operator StreamingResponseCompletedUpdate(ClientResult result); |
| 3230 | public static implicit operator BinaryContent(StreamingResponseCompletedUpdate streamingResponseCompletedUpdate); |
| 3231 | } |
| 3232 | public class StreamingResponseContentPartAddedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseContentPartAddedUpdate>, IPersistableModel<StreamingResponseContentPartAddedUpdate> { |
| 3233 | public int ContentIndex { get; } |
| 3234 | public string ItemId { get; } |
| 3235 | public int OutputIndex { get; } |
| 3236 | public ResponseContentPart Part { get; } |
| 3237 | public new static explicit operator StreamingResponseContentPartAddedUpdate(ClientResult result); |
| 3238 | public static implicit operator BinaryContent(StreamingResponseContentPartAddedUpdate streamingResponseContentPartAddedUpdate); |
| 3239 | } |
| 3240 | public class StreamingResponseContentPartDoneUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseContentPartDoneUpdate>, IPersistableModel<StreamingResponseContentPartDoneUpdate> { |
| 3241 | public int ContentIndex { get; } |
| 3242 | public string ItemId { get; } |
| 3243 | public int OutputIndex { get; } |
| 3244 | public ResponseContentPart Part { get; } |
| 3245 | public new static explicit operator StreamingResponseContentPartDoneUpdate(ClientResult result); |
| 3246 | public static implicit operator BinaryContent(StreamingResponseContentPartDoneUpdate streamingResponseContentPartDoneUpdate); |
| 3247 | } |
| 3248 | public class StreamingResponseCreatedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseCreatedUpdate>, IPersistableModel<StreamingResponseCreatedUpdate> { |
| 3249 | public OpenAIResponse Response { get; } |
| 3250 | public new static explicit operator StreamingResponseCreatedUpdate(ClientResult result); |
| 3251 | public static implicit operator BinaryContent(StreamingResponseCreatedUpdate streamingResponseCreatedUpdate); |
| 3252 | } |
| 3253 | public class StreamingResponseErrorUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseErrorUpdate>, IPersistableModel<StreamingResponseErrorUpdate> { |
| 3254 | public string Code { get; } |
| 3255 | public string Message { get; } |
| 3256 | public string Param { get; } |
| 3257 | public new static explicit operator StreamingResponseErrorUpdate(ClientResult result); |
| 3258 | public static implicit operator BinaryContent(StreamingResponseErrorUpdate streamingResponseErrorUpdate); |
| 3259 | } |
| 3260 | public class StreamingResponseFailedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseFailedUpdate>, IPersistableModel<StreamingResponseFailedUpdate> { |
| 3261 | public OpenAIResponse Response { get; } |
| 3262 | public new static explicit operator StreamingResponseFailedUpdate(ClientResult result); |
| 3263 | public static implicit operator BinaryContent(StreamingResponseFailedUpdate streamingResponseFailedUpdate); |
| 3264 | } |
| 3265 | public class StreamingResponseFileSearchCallCompletedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseFileSearchCallCompletedUpdate>, IPersistableModel<StreamingResponseFileSearchCallCompletedUpdate> { |
| 3266 | public string ItemId { get; } |
| 3267 | public int OutputIndex { get; } |
| 3268 | public new static explicit operator StreamingResponseFileSearchCallCompletedUpdate(ClientResult result); |
| 3269 | public static implicit operator BinaryContent(StreamingResponseFileSearchCallCompletedUpdate streamingResponseFileSearchCallCompletedUpdate); |
| 3270 | } |
| 3271 | public class StreamingResponseFileSearchCallInProgressUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseFileSearchCallInProgressUpdate>, IPersistableModel<StreamingResponseFileSearchCallInProgressUpdate> { |
| 3272 | public string ItemId { get; } |
| 3273 | public int OutputIndex { get; } |
| 3274 | public new static explicit operator StreamingResponseFileSearchCallInProgressUpdate(ClientResult result); |
| 3275 | public static implicit operator BinaryContent(StreamingResponseFileSearchCallInProgressUpdate streamingResponseFileSearchCallInProgressUpdate); |
| 3276 | } |
| 3277 | public class StreamingResponseFileSearchCallSearchingUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseFileSearchCallSearchingUpdate>, IPersistableModel<StreamingResponseFileSearchCallSearchingUpdate> { |
| 3278 | public string ItemId { get; } |
| 3279 | public int OutputIndex { get; } |
| 3280 | public new static explicit operator StreamingResponseFileSearchCallSearchingUpdate(ClientResult result); |
| 3281 | public static implicit operator BinaryContent(StreamingResponseFileSearchCallSearchingUpdate streamingResponseFileSearchCallSearchingUpdate); |
| 3282 | } |
| 3283 | public class StreamingResponseFunctionCallArgumentsDeltaUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseFunctionCallArgumentsDeltaUpdate>, IPersistableModel<StreamingResponseFunctionCallArgumentsDeltaUpdate> { |
| 3284 | public string Delta { get; } |
| 3285 | public string ItemId { get; } |
| 3286 | public int OutputIndex { get; } |
| 3287 | public new static explicit operator StreamingResponseFunctionCallArgumentsDeltaUpdate(ClientResult result); |
| 3288 | public static implicit operator BinaryContent(StreamingResponseFunctionCallArgumentsDeltaUpdate streamingResponseFunctionCallArgumentsDeltaUpdate); |
| 3289 | } |
| 3290 | public class StreamingResponseFunctionCallArgumentsDoneUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseFunctionCallArgumentsDoneUpdate>, IPersistableModel<StreamingResponseFunctionCallArgumentsDoneUpdate> { |
| 3291 | public string Arguments { get; } |
| 3292 | public string ItemId { get; } |
| 3293 | public int OutputIndex { get; } |
| 3294 | public new static explicit operator StreamingResponseFunctionCallArgumentsDoneUpdate(ClientResult result); |
| 3295 | public static implicit operator BinaryContent(StreamingResponseFunctionCallArgumentsDoneUpdate streamingResponseFunctionCallArgumentsDoneUpdate); |
| 3296 | } |
| 3297 | public class StreamingResponseIncompleteUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseIncompleteUpdate>, IPersistableModel<StreamingResponseIncompleteUpdate> { |
| 3298 | public OpenAIResponse Response { get; } |
| 3299 | public new static explicit operator StreamingResponseIncompleteUpdate(ClientResult result); |
| 3300 | public static implicit operator BinaryContent(StreamingResponseIncompleteUpdate streamingResponseIncompleteUpdate); |
| 3301 | } |
| 3302 | public class StreamingResponseInProgressUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseInProgressUpdate>, IPersistableModel<StreamingResponseInProgressUpdate> { |
| 3303 | public OpenAIResponse Response { get; } |
| 3304 | public new static explicit operator StreamingResponseInProgressUpdate(ClientResult result); |
| 3305 | public static implicit operator BinaryContent(StreamingResponseInProgressUpdate streamingResponseInProgressUpdate); |
| 3306 | } |
| 3307 | public class StreamingResponseOutputItemAddedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseOutputItemAddedUpdate>, IPersistableModel<StreamingResponseOutputItemAddedUpdate> { |
| 3308 | public ResponseItem Item { get; } |
| 3309 | public int OutputIndex { get; } |
| 3310 | public new static explicit operator StreamingResponseOutputItemAddedUpdate(ClientResult result); |
| 3311 | public static implicit operator BinaryContent(StreamingResponseOutputItemAddedUpdate streamingResponseOutputItemAddedUpdate); |
| 3312 | } |
| 3313 | public class StreamingResponseOutputItemDoneUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseOutputItemDoneUpdate>, IPersistableModel<StreamingResponseOutputItemDoneUpdate> { |
| 3314 | public ResponseItem Item { get; } |
| 3315 | public int OutputIndex { get; } |
| 3316 | public new static explicit operator StreamingResponseOutputItemDoneUpdate(ClientResult result); |
| 3317 | public static implicit operator BinaryContent(StreamingResponseOutputItemDoneUpdate streamingResponseOutputItemDoneUpdate); |
| 3318 | } |
| 3319 | public class StreamingResponseOutputTextDeltaUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseOutputTextDeltaUpdate>, IPersistableModel<StreamingResponseOutputTextDeltaUpdate> { |
| 3320 | public int ContentIndex { get; } |
| 3321 | public string Delta { get; } |
| 3322 | public string ItemId { get; } |
| 3323 | public int OutputIndex { get; } |
| 3324 | public new static explicit operator StreamingResponseOutputTextDeltaUpdate(ClientResult result); |
| 3325 | public static implicit operator BinaryContent(StreamingResponseOutputTextDeltaUpdate streamingResponseOutputTextDeltaUpdate); |
| 3326 | } |
| 3327 | public class StreamingResponseOutputTextDoneUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseOutputTextDoneUpdate>, IPersistableModel<StreamingResponseOutputTextDoneUpdate> { |
| 3328 | public int ContentIndex { get; } |
| 3329 | public string ItemId { get; } |
| 3330 | public int OutputIndex { get; } |
| 3331 | public string Text { get; } |
| 3332 | public new static explicit operator StreamingResponseOutputTextDoneUpdate(ClientResult result); |
| 3333 | public static implicit operator BinaryContent(StreamingResponseOutputTextDoneUpdate streamingResponseOutputTextDoneUpdate); |
| 3334 | } |
| 3335 | public class StreamingResponseRefusalDeltaUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseRefusalDeltaUpdate>, IPersistableModel<StreamingResponseRefusalDeltaUpdate> { |
| 3336 | public int ContentIndex { get; } |
| 3337 | public string Delta { get; } |
| 3338 | public string ItemId { get; } |
| 3339 | public int OutputIndex { get; } |
| 3340 | public new static explicit operator StreamingResponseRefusalDeltaUpdate(ClientResult result); |
| 3341 | public static implicit operator BinaryContent(StreamingResponseRefusalDeltaUpdate streamingResponseRefusalDeltaUpdate); |
| 3342 | } |
| 3343 | public class StreamingResponseRefusalDoneUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseRefusalDoneUpdate>, IPersistableModel<StreamingResponseRefusalDoneUpdate> { |
| 3344 | public int ContentIndex { get; } |
| 3345 | public string ItemId { get; } |
| 3346 | public int OutputIndex { get; } |
| 3347 | public string Refusal { get; } |
| 3348 | public new static explicit operator StreamingResponseRefusalDoneUpdate(ClientResult result); |
| 3349 | public static implicit operator BinaryContent(StreamingResponseRefusalDoneUpdate streamingResponseRefusalDoneUpdate); |
| 3350 | } |
| 3351 | public class StreamingResponseTextAnnotationAddedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseTextAnnotationAddedUpdate>, IPersistableModel<StreamingResponseTextAnnotationAddedUpdate> { |
| 3352 | public ResponseMessageAnnotation Annotation { get; } |
| 3353 | public int ContentIndex { get; } |
| 3354 | public string ItemId { get; } |
| 3355 | public int OutputIndex { get; } |
| 3356 | public new static explicit operator StreamingResponseTextAnnotationAddedUpdate(ClientResult result); |
| 3357 | public static implicit operator BinaryContent(StreamingResponseTextAnnotationAddedUpdate streamingResponseTextAnnotationAddedUpdate); |
| 3358 | } |
| 3359 | public class StreamingResponseUpdate : IJsonModel<StreamingResponseUpdate>, IPersistableModel<StreamingResponseUpdate> { |
| 3360 | public static explicit operator StreamingResponseUpdate(ClientResult result); |
| 3361 | public static implicit operator BinaryContent(StreamingResponseUpdate streamingResponseUpdate); |
| 3362 | } |
| 3363 | public class StreamingResponseWebSearchCallCompletedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseWebSearchCallCompletedUpdate>, IPersistableModel<StreamingResponseWebSearchCallCompletedUpdate> { |
| 3364 | public string ItemId { get; } |
| 3365 | public int OutputIndex { get; } |
| 3366 | public new static explicit operator StreamingResponseWebSearchCallCompletedUpdate(ClientResult result); |
| 3367 | public static implicit operator BinaryContent(StreamingResponseWebSearchCallCompletedUpdate streamingResponseWebSearchCallCompletedUpdate); |
| 3368 | } |
| 3369 | public class StreamingResponseWebSearchCallInProgressUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseWebSearchCallInProgressUpdate>, IPersistableModel<StreamingResponseWebSearchCallInProgressUpdate> { |
| 3370 | public string ItemId { get; } |
| 3371 | public int OutputIndex { get; } |
| 3372 | public new static explicit operator StreamingResponseWebSearchCallInProgressUpdate(ClientResult result); |
| 3373 | public static implicit operator BinaryContent(StreamingResponseWebSearchCallInProgressUpdate streamingResponseWebSearchCallInProgressUpdate); |
| 3374 | } |
| 3375 | public class StreamingResponseWebSearchCallSearchingUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseWebSearchCallSearchingUpdate>, IPersistableModel<StreamingResponseWebSearchCallSearchingUpdate> { |
| 3376 | public string ItemId { get; } |
| 3377 | public int OutputIndex { get; } |
| 3378 | public new static explicit operator StreamingResponseWebSearchCallSearchingUpdate(ClientResult result); |
| 3379 | public static implicit operator BinaryContent(StreamingResponseWebSearchCallSearchingUpdate streamingResponseWebSearchCallSearchingUpdate); |
| 3380 | } |
| 3381 | public class WebSearchCallResponseItem : ResponseItem, IJsonModel<WebSearchCallResponseItem>, IPersistableModel<WebSearchCallResponseItem> { |
| 3382 | public WebSearchCallResponseItem(); |
| 3383 | public WebSearchCallStatus Status { get; } |
| 3384 | public new static explicit operator WebSearchCallResponseItem(ClientResult result); |
| 3385 | public static implicit operator BinaryContent(WebSearchCallResponseItem webSearchCallResponseItem); |
| 3386 | } |
| 3387 | public enum WebSearchCallStatus { |
| 3388 | InProgress = 0, |
| 3389 | Searching = 1, |
| 3390 | Completed = 2, |
| 3391 | Failed = 3 |
| 3392 | } |
| 3393 | public readonly partial struct WebSearchToolContextSize : IEquatable<WebSearchToolContextSize> { |
| 3394 | public WebSearchToolContextSize(string value); |
| 3395 | public static WebSearchToolContextSize High { get; } |
| 3396 | public static WebSearchToolContextSize Low { get; } |
| 3397 | public static WebSearchToolContextSize Medium { get; } |
| 3398 | public readonly bool Equals(WebSearchToolContextSize other); |
| 3399 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3400 | public override readonly bool Equals(object obj); |
| 3401 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3402 | public override readonly int GetHashCode(); |
| 3403 | public static bool operator ==(WebSearchToolContextSize left, WebSearchToolContextSize right); |
| 3404 | public static implicit operator WebSearchToolContextSize(string value); |
| 3405 | public static bool operator !=(WebSearchToolContextSize left, WebSearchToolContextSize right); |
| 3406 | public override readonly string ToString(); |
| 3407 | } |
| 3408 | public class WebSearchToolLocation : IJsonModel<WebSearchToolLocation>, IPersistableModel<WebSearchToolLocation> { |
| 3409 | public static WebSearchToolLocation CreateApproximateLocation(string country = null, string region = null, string city = null, string timezone = null); |
| 3410 | public static explicit operator WebSearchToolLocation(ClientResult result); |
| 3411 | public static implicit operator BinaryContent(WebSearchToolLocation webSearchToolLocation); |
| 3412 | } |
| 3413 | } |
| 3414 | namespace OpenAI.VectorStores { |
| 3415 | public class AddFileToVectorStoreOperation : OperationResult { |
| 3416 | public string FileId { get; } |
| 3417 | public override ContinuationToken? RehydrationToken { get; protected set; } |
| 3418 | public VectorStoreFileAssociationStatus? Status { get; } |
| 3419 | public VectorStoreFileAssociation? Value { get; } |
| 3420 | public string VectorStoreId { get; } |
| 3421 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3422 | public virtual ClientResult GetFileAssociation(RequestOptions? options); |
| 3423 | public virtual ClientResult<VectorStoreFileAssociation> GetFileAssociation(CancellationToken cancellationToken = default); |
| 3424 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3425 | public virtual Task<ClientResult> GetFileAssociationAsync(RequestOptions? options); |
| 3426 | public virtual Task<ClientResult<VectorStoreFileAssociation>> GetFileAssociationAsync(CancellationToken cancellationToken = default); |
| 3427 | public static AddFileToVectorStoreOperation Rehydrate(VectorStoreClient client, ContinuationToken rehydrationToken, CancellationToken cancellationToken = default); |
| 3428 | public static Task<AddFileToVectorStoreOperation> RehydrateAsync(VectorStoreClient client, ContinuationToken rehydrationToken, CancellationToken cancellationToken = default); |
| 3429 | public override ClientResult UpdateStatus(RequestOptions? options = null); |
| 3430 | public override ValueTask<ClientResult> UpdateStatusAsync(RequestOptions? options = null); |
| 3431 | } |
| 3432 | public class CreateBatchFileJobOperation : OperationResult { |
| 3433 | public string BatchId { get; } |
| 3434 | public override ContinuationToken? RehydrationToken { get; protected set; } |
| 3435 | public VectorStoreBatchFileJobStatus? Status { get; } |
| 3436 | public VectorStoreBatchFileJob? Value { get; } |
| 3437 | public string VectorStoreId { get; } |
| 3438 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3439 | public virtual ClientResult Cancel(RequestOptions? options); |
| 3440 | public virtual ClientResult<VectorStoreBatchFileJob> Cancel(CancellationToken cancellationToken = default); |
| 3441 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3442 | public virtual Task<ClientResult> CancelAsync(RequestOptions? options); |
| 3443 | public virtual Task<ClientResult<VectorStoreBatchFileJob>> CancelAsync(CancellationToken cancellationToken = default); |
| 3444 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3445 | public virtual ClientResult GetFileBatch(RequestOptions? options); |
| 3446 | public virtual ClientResult<VectorStoreBatchFileJob> GetFileBatch(CancellationToken cancellationToken = default); |
| 3447 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3448 | public virtual Task<ClientResult> GetFileBatchAsync(RequestOptions? options); |
| 3449 | public virtual Task<ClientResult<VectorStoreBatchFileJob>> GetFileBatchAsync(CancellationToken cancellationToken = default); |
| 3450 | public static CreateBatchFileJobOperation Rehydrate(VectorStoreClient client, ContinuationToken rehydrationToken, CancellationToken cancellationToken = default); |
| 3451 | public static Task<CreateBatchFileJobOperation> RehydrateAsync(VectorStoreClient client, ContinuationToken rehydrationToken, CancellationToken cancellationToken = default); |
| 3452 | public override ClientResult UpdateStatus(RequestOptions? options = null); |
| 3453 | public override ValueTask<ClientResult> UpdateStatusAsync(RequestOptions? options = null); |
| 3454 | } |
| 3455 | public class CreateVectorStoreOperation : OperationResult { |
| 3456 | public override ContinuationToken? RehydrationToken { get; protected set; } |
| 3457 | public VectorStoreStatus? Status { get; } |
| 3458 | public VectorStore? Value { get; } |
| 3459 | public string VectorStoreId { get; } |
| 3460 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3461 | public virtual ClientResult GetVectorStore(RequestOptions? options); |
| 3462 | public virtual ClientResult<VectorStore> GetVectorStore(CancellationToken cancellationToken = default); |
| 3463 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3464 | public virtual Task<ClientResult> GetVectorStoreAsync(RequestOptions? options); |
| 3465 | public virtual Task<ClientResult<VectorStore>> GetVectorStoreAsync(CancellationToken cancellationToken = default); |
| 3466 | public static CreateVectorStoreOperation Rehydrate(VectorStoreClient client, ContinuationToken rehydrationToken, CancellationToken cancellationToken = default); |
| 3467 | public static Task<CreateVectorStoreOperation> RehydrateAsync(VectorStoreClient client, ContinuationToken rehydrationToken, CancellationToken cancellationToken = default); |
| 3468 | public override ClientResult UpdateStatus(RequestOptions? options = null); |
| 3469 | public override ValueTask<ClientResult> UpdateStatusAsync(RequestOptions? options = null); |
| 3470 | } |
| 3471 | public abstract class FileChunkingStrategy : IJsonModel<FileChunkingStrategy>, IPersistableModel<FileChunkingStrategy> { |
| 3472 | public static FileChunkingStrategy Auto { get; } |
| 3473 | public static FileChunkingStrategy Unknown { get; } |
| 3474 | public static FileChunkingStrategy CreateStaticStrategy(int maxTokensPerChunk, int overlappingTokenCount); |
| 3475 | public static explicit operator FileChunkingStrategy(ClientResult result); |
| 3476 | public static implicit operator BinaryContent(FileChunkingStrategy fileChunkingStrategy); |
| 3477 | } |
| 3478 | public class FileFromStoreRemovalResult : IJsonModel<FileFromStoreRemovalResult>, IPersistableModel<FileFromStoreRemovalResult> { |
| 3479 | public string FileId { get; } |
| 3480 | public bool Removed { get; } |
| 3481 | public static explicit operator FileFromStoreRemovalResult(ClientResult result); |
| 3482 | public static implicit operator BinaryContent(FileFromStoreRemovalResult fileFromStoreRemovalResult); |
| 3483 | } |
| 3484 | public class StaticFileChunkingStrategy : FileChunkingStrategy, IJsonModel<StaticFileChunkingStrategy>, IPersistableModel<StaticFileChunkingStrategy> { |
| 3485 | public StaticFileChunkingStrategy(int maxTokensPerChunk, int overlappingTokenCount); |
| 3486 | public int MaxTokensPerChunk { get; } |
| 3487 | public int OverlappingTokenCount { get; } |
| 3488 | public new static explicit operator StaticFileChunkingStrategy(ClientResult result); |
| 3489 | public static implicit operator BinaryContent(StaticFileChunkingStrategy staticFileChunkingStrategy); |
| 3490 | } |
| 3491 | public class VectorStore : IJsonModel<VectorStore>, IPersistableModel<VectorStore> { |
| 3492 | public DateTimeOffset CreatedAt { get; } |
| 3493 | public VectorStoreExpirationPolicy ExpirationPolicy { get; } |
| 3494 | public DateTimeOffset? ExpiresAt { get; } |
| 3495 | public VectorStoreFileCounts FileCounts { get; } |
| 3496 | public string Id { get; } |
| 3497 | public DateTimeOffset? LastActiveAt { get; } |
| 3498 | public IReadOnlyDictionary<string, string> Metadata { get; } |
| 3499 | public string Name { get; } |
| 3500 | public VectorStoreStatus Status { get; } |
| 3501 | public int UsageBytes { get; } |
| 3502 | public static explicit operator VectorStore(ClientResult result); |
| 3503 | public static implicit operator BinaryContent(VectorStore vectorStore); |
| 3504 | } |
| 3505 | public class VectorStoreBatchFileJob : IJsonModel<VectorStoreBatchFileJob>, IPersistableModel<VectorStoreBatchFileJob> { |
| 3506 | public string BatchId { get; } |
| 3507 | public DateTimeOffset CreatedAt { get; } |
| 3508 | public VectorStoreFileCounts FileCounts { get; } |
| 3509 | public VectorStoreBatchFileJobStatus Status { get; } |
| 3510 | public string VectorStoreId { get; } |
| 3511 | public static explicit operator VectorStoreBatchFileJob(ClientResult result); |
| 3512 | public static implicit operator BinaryContent(VectorStoreBatchFileJob vectorStoreBatchFileJob); |
| 3513 | } |
| 3514 | public readonly partial struct VectorStoreBatchFileJobStatus : IEquatable<VectorStoreBatchFileJobStatus> { |
| 3515 | public VectorStoreBatchFileJobStatus(string value); |
| 3516 | public static VectorStoreBatchFileJobStatus Cancelled { get; } |
| 3517 | public static VectorStoreBatchFileJobStatus Completed { get; } |
| 3518 | public static VectorStoreBatchFileJobStatus Failed { get; } |
| 3519 | public static VectorStoreBatchFileJobStatus InProgress { get; } |
| 3520 | public readonly bool Equals(VectorStoreBatchFileJobStatus other); |
| 3521 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3522 | public override readonly bool Equals(object obj); |
| 3523 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3524 | public override readonly int GetHashCode(); |
| 3525 | public static bool operator ==(VectorStoreBatchFileJobStatus left, VectorStoreBatchFileJobStatus right); |
| 3526 | public static implicit operator VectorStoreBatchFileJobStatus(string value); |
| 3527 | public static bool operator !=(VectorStoreBatchFileJobStatus left, VectorStoreBatchFileJobStatus right); |
| 3528 | public override readonly string ToString(); |
| 3529 | } |
| 3530 | public class VectorStoreClient { |
| 3531 | protected VectorStoreClient(); |
| 3532 | public VectorStoreClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 3533 | public VectorStoreClient(ApiKeyCredential credential); |
| 3534 | protected internal VectorStoreClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 3535 | public VectorStoreClient(string apiKey); |
| 3536 | public ClientPipeline Pipeline { get; } |
| 3537 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3538 | public virtual AddFileToVectorStoreOperation AddFileToVectorStore(string vectorStoreId, BinaryContent content, bool waitUntilCompleted, RequestOptions options = null); |
| 3539 | public virtual AddFileToVectorStoreOperation AddFileToVectorStore(string vectorStoreId, string fileId, bool waitUntilCompleted, CancellationToken cancellationToken = default); |
| 3540 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3541 | public virtual Task<AddFileToVectorStoreOperation> AddFileToVectorStoreAsync(string vectorStoreId, BinaryContent content, bool waitUntilCompleted, RequestOptions options = null); |
| 3542 | public virtual Task<AddFileToVectorStoreOperation> AddFileToVectorStoreAsync(string vectorStoreId, string fileId, bool waitUntilCompleted, CancellationToken cancellationToken = default); |
| 3543 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3544 | public virtual ClientResult CancelBatchFileJob(string vectorStoreId, string batchId, RequestOptions options); |
| 3545 | public virtual ClientResult<VectorStoreBatchFileJob> CancelBatchFileJob(string vectorStoreId, string batchJobId, CancellationToken cancellationToken = default); |
| 3546 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3547 | public virtual Task<ClientResult> CancelBatchFileJobAsync(string vectorStoreId, string batchId, RequestOptions options); |
| 3548 | public virtual Task<ClientResult<VectorStoreBatchFileJob>> CancelBatchFileJobAsync(string vectorStoreId, string batchJobId, CancellationToken cancellationToken = default); |
| 3549 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3550 | public virtual CreateBatchFileJobOperation CreateBatchFileJob(string vectorStoreId, BinaryContent content, bool waitUntilCompleted, RequestOptions options = null); |
| 3551 | public virtual CreateBatchFileJobOperation CreateBatchFileJob(string vectorStoreId, IEnumerable<string> fileIds, bool waitUntilCompleted, CancellationToken cancellationToken = default); |
| 3552 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3553 | public virtual Task<CreateBatchFileJobOperation> CreateBatchFileJobAsync(string vectorStoreId, BinaryContent content, bool waitUntilCompleted, RequestOptions options = null); |
| 3554 | public virtual Task<CreateBatchFileJobOperation> CreateBatchFileJobAsync(string vectorStoreId, IEnumerable<string> fileIds, bool waitUntilCompleted, CancellationToken cancellationToken = default); |
| 3555 | public virtual CreateVectorStoreOperation CreateVectorStore(bool waitUntilCompleted, VectorStoreCreationOptions vectorStore = null, CancellationToken cancellationToken = default); |
| 3556 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3557 | public virtual CreateVectorStoreOperation CreateVectorStore(BinaryContent content, bool waitUntilCompleted, RequestOptions options = null); |
| 3558 | public virtual ClientResult CreateVectorStore(BinaryContent content, RequestOptions options = null); |
| 3559 | public virtual Task<CreateVectorStoreOperation> CreateVectorStoreAsync(bool waitUntilCompleted, VectorStoreCreationOptions vectorStore = null, CancellationToken cancellationToken = default); |
| 3560 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3561 | public virtual Task<CreateVectorStoreOperation> CreateVectorStoreAsync(BinaryContent content, bool waitUntilCompleted, RequestOptions options = null); |
| 3562 | public virtual Task<ClientResult> CreateVectorStoreAsync(BinaryContent content, RequestOptions options = null); |
| 3563 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3564 | public virtual ClientResult DeleteVectorStore(string vectorStoreId, RequestOptions options); |
| 3565 | public virtual ClientResult<VectorStoreDeletionResult> DeleteVectorStore(string vectorStoreId, CancellationToken cancellationToken = default); |
| 3566 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3567 | public virtual Task<ClientResult> DeleteVectorStoreAsync(string vectorStoreId, RequestOptions options); |
| 3568 | public virtual Task<ClientResult<VectorStoreDeletionResult>> DeleteVectorStoreAsync(string vectorStoreId, CancellationToken cancellationToken = default); |
| 3569 | public virtual ClientResult<VectorStoreBatchFileJob> GetBatchFileJob(string vectorStoreId, string batchJobId, CancellationToken cancellationToken = default); |
| 3570 | public virtual Task<ClientResult<VectorStoreBatchFileJob>> GetBatchFileJobAsync(string vectorStoreId, string batchJobId, CancellationToken cancellationToken = default); |
| 3571 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3572 | public virtual ClientResult GetFileAssociation(string vectorStoreId, string fileId, RequestOptions options); |
| 3573 | public virtual ClientResult<VectorStoreFileAssociation> GetFileAssociation(string vectorStoreId, string fileId, CancellationToken cancellationToken = default); |
| 3574 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3575 | public virtual Task<ClientResult> GetFileAssociationAsync(string vectorStoreId, string fileId, RequestOptions options); |
| 3576 | public virtual Task<ClientResult<VectorStoreFileAssociation>> GetFileAssociationAsync(string vectorStoreId, string fileId, CancellationToken cancellationToken = default); |
| 3577 | public virtual CollectionResult<VectorStoreFileAssociation> GetFileAssociations(ContinuationToken firstPageToken, CancellationToken cancellationToken = default); |
| 3578 | public virtual CollectionResult<VectorStoreFileAssociation> GetFileAssociations(string vectorStoreId, VectorStoreFileAssociationCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 3579 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3580 | public virtual CollectionResult GetFileAssociations(string vectorStoreId, int? limit, string order, string after, string before, string filter, RequestOptions options); |
| 3581 | public virtual CollectionResult<VectorStoreFileAssociation> GetFileAssociations(string vectorStoreId, string batchJobId, VectorStoreFileAssociationCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 3582 | public virtual CollectionResult<VectorStoreFileAssociation> GetFileAssociations(string vectorStoreId, string batchJobId, ContinuationToken firstPageToken, CancellationToken cancellationToken = default); |
| 3583 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3584 | public virtual CollectionResult GetFileAssociations(string vectorStoreId, string batchId, int? limit, string order, string after, string before, string filter, RequestOptions options); |
| 3585 | public virtual AsyncCollectionResult<VectorStoreFileAssociation> GetFileAssociationsAsync(ContinuationToken firstPageToken, CancellationToken cancellationToken = default); |
| 3586 | public virtual AsyncCollectionResult<VectorStoreFileAssociation> GetFileAssociationsAsync(string vectorStoreId, VectorStoreFileAssociationCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 3587 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3588 | public virtual AsyncCollectionResult GetFileAssociationsAsync(string vectorStoreId, int? limit, string order, string after, string before, string filter, RequestOptions options); |
| 3589 | public virtual AsyncCollectionResult<VectorStoreFileAssociation> GetFileAssociationsAsync(string vectorStoreId, string batchJobId, VectorStoreFileAssociationCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 3590 | public virtual AsyncCollectionResult<VectorStoreFileAssociation> GetFileAssociationsAsync(string vectorStoreId, string batchJobId, ContinuationToken firstPageToken, CancellationToken cancellationToken = default); |
| 3591 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3592 | public virtual AsyncCollectionResult GetFileAssociationsAsync(string vectorStoreId, string batchId, int? limit, string order, string after, string before, string filter, RequestOptions options); |
| 3593 | public virtual ClientResult<VectorStore> GetVectorStore(string vectorStoreId, CancellationToken cancellationToken = default); |
| 3594 | public virtual CollectionResult<VectorStore> GetVectorStores(VectorStoreCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 3595 | public virtual CollectionResult<VectorStore> GetVectorStores(ContinuationToken firstPageToken, CancellationToken cancellationToken = default); |
| 3596 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3597 | public virtual CollectionResult GetVectorStores(int? limit, string order, string after, string before, RequestOptions options); |
| 3598 | public virtual AsyncCollectionResult<VectorStore> GetVectorStoresAsync(VectorStoreCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 3599 | public virtual AsyncCollectionResult<VectorStore> GetVectorStoresAsync(ContinuationToken firstPageToken, CancellationToken cancellationToken = default); |
| 3600 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3601 | public virtual AsyncCollectionResult GetVectorStoresAsync(int? limit, string order, string after, string before, RequestOptions options); |
| 3602 | public virtual ClientResult<VectorStore> ModifyVectorStore(string vectorStoreId, VectorStoreModificationOptions vectorStore, CancellationToken cancellationToken = default); |
| 3603 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3604 | public virtual ClientResult ModifyVectorStore(string vectorStoreId, BinaryContent content, RequestOptions options = null); |
| 3605 | public virtual Task<ClientResult<VectorStore>> ModifyVectorStoreAsync(string vectorStoreId, VectorStoreModificationOptions vectorStore, CancellationToken cancellationToken = default); |
| 3606 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3607 | public virtual Task<ClientResult> ModifyVectorStoreAsync(string vectorStoreId, BinaryContent content, RequestOptions options = null); |
| 3608 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3609 | public virtual ClientResult RemoveFileFromStore(string vectorStoreId, string fileId, RequestOptions options); |
| 3610 | public virtual ClientResult<FileFromStoreRemovalResult> RemoveFileFromStore(string vectorStoreId, string fileId, CancellationToken cancellationToken = default); |
| 3611 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3612 | public virtual Task<ClientResult> RemoveFileFromStoreAsync(string vectorStoreId, string fileId, RequestOptions options); |
| 3613 | public virtual Task<ClientResult<FileFromStoreRemovalResult>> RemoveFileFromStoreAsync(string vectorStoreId, string fileId, CancellationToken cancellationToken = default); |
| 3614 | } |
| 3615 | public class VectorStoreCollectionOptions { |
| 3616 | public string AfterId { get; set; } |
| 3617 | public string BeforeId { get; set; } |
| 3618 | public VectorStoreCollectionOrder? Order { get; set; } |
| 3619 | public int? PageSizeLimit { get; set; } |
| 3620 | } |
| 3621 | public readonly partial struct VectorStoreCollectionOrder : IEquatable<VectorStoreCollectionOrder> { |
| 3622 | public VectorStoreCollectionOrder(string value); |
| 3623 | public static VectorStoreCollectionOrder Ascending { get; } |
| 3624 | public static VectorStoreCollectionOrder Descending { get; } |
| 3625 | public readonly bool Equals(VectorStoreCollectionOrder other); |
| 3626 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3627 | public override readonly bool Equals(object obj); |
| 3628 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3629 | public override readonly int GetHashCode(); |
| 3630 | public static bool operator ==(VectorStoreCollectionOrder left, VectorStoreCollectionOrder right); |
| 3631 | public static implicit operator VectorStoreCollectionOrder(string value); |
| 3632 | public static bool operator !=(VectorStoreCollectionOrder left, VectorStoreCollectionOrder right); |
| 3633 | public override readonly string ToString(); |
| 3634 | } |
| 3635 | public class VectorStoreCreationOptions : IJsonModel<VectorStoreCreationOptions>, IPersistableModel<VectorStoreCreationOptions> { |
| 3636 | public FileChunkingStrategy ChunkingStrategy { get; set; } |
| 3637 | public VectorStoreExpirationPolicy ExpirationPolicy { get; set; } |
| 3638 | public IList<string> FileIds { get; } |
| 3639 | public IDictionary<string, string> Metadata { get; } |
| 3640 | public string Name { get; set; } |
| 3641 | public static explicit operator VectorStoreCreationOptions(ClientResult result); |
| 3642 | public static implicit operator BinaryContent(VectorStoreCreationOptions vectorStoreCreationOptions); |
| 3643 | } |
| 3644 | public class VectorStoreDeletionResult : IJsonModel<VectorStoreDeletionResult>, IPersistableModel<VectorStoreDeletionResult> { |
| 3645 | public bool Deleted { get; } |
| 3646 | public string VectorStoreId { get; } |
| 3647 | public static explicit operator VectorStoreDeletionResult(ClientResult result); |
| 3648 | public static implicit operator BinaryContent(VectorStoreDeletionResult vectorStoreDeletionResult); |
| 3649 | } |
| 3650 | public enum VectorStoreExpirationAnchor { |
| 3651 | Unknown = 0, |
| 3652 | LastActiveAt = 1 |
| 3653 | } |
| 3654 | public class VectorStoreExpirationPolicy : IJsonModel<VectorStoreExpirationPolicy>, IPersistableModel<VectorStoreExpirationPolicy> { |
| 3655 | public VectorStoreExpirationPolicy(VectorStoreExpirationAnchor anchor, int days); |
| 3656 | public VectorStoreExpirationAnchor Anchor { get; set; } |
| 3657 | public int Days { get; set; } |
| 3658 | public static explicit operator VectorStoreExpirationPolicy(ClientResult result); |
| 3659 | public static implicit operator BinaryContent(VectorStoreExpirationPolicy vectorStoreExpirationPolicy); |
| 3660 | } |
| 3661 | public class VectorStoreFileAssociation : IJsonModel<VectorStoreFileAssociation>, IPersistableModel<VectorStoreFileAssociation> { |
| 3662 | public IDictionary<string, BinaryData> Attributes { get; } |
| 3663 | public FileChunkingStrategy ChunkingStrategy { get; } |
| 3664 | public DateTimeOffset CreatedAt { get; } |
| 3665 | public string FileId { get; } |
| 3666 | public VectorStoreFileAssociationError LastError { get; } |
| 3667 | public int Size { get; } |
| 3668 | public VectorStoreFileAssociationStatus Status { get; } |
| 3669 | public string VectorStoreId { get; } |
| 3670 | public static explicit operator VectorStoreFileAssociation(ClientResult result); |
| 3671 | public static implicit operator BinaryContent(VectorStoreFileAssociation vectorStoreFileAssociation); |
| 3672 | } |
| 3673 | public class VectorStoreFileAssociationCollectionOptions { |
| 3674 | public string AfterId { get; set; } |
| 3675 | public string BeforeId { get; set; } |
| 3676 | public VectorStoreFileStatusFilter? Filter { get; set; } |
| 3677 | public VectorStoreFileAssociationCollectionOrder? Order { get; set; } |
| 3678 | public int? PageSizeLimit { get; set; } |
| 3679 | } |
| 3680 | public readonly partial struct VectorStoreFileAssociationCollectionOrder : IEquatable<VectorStoreFileAssociationCollectionOrder> { |
| 3681 | public VectorStoreFileAssociationCollectionOrder(string value); |
| 3682 | public static VectorStoreFileAssociationCollectionOrder Ascending { get; } |
| 3683 | public static VectorStoreFileAssociationCollectionOrder Descending { get; } |
| 3684 | public readonly bool Equals(VectorStoreFileAssociationCollectionOrder other); |
| 3685 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3686 | public override readonly bool Equals(object obj); |
| 3687 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3688 | public override readonly int GetHashCode(); |
| 3689 | public static bool operator ==(VectorStoreFileAssociationCollectionOrder left, VectorStoreFileAssociationCollectionOrder right); |
| 3690 | public static implicit operator VectorStoreFileAssociationCollectionOrder(string value); |
| 3691 | public static bool operator !=(VectorStoreFileAssociationCollectionOrder left, VectorStoreFileAssociationCollectionOrder right); |
| 3692 | public override readonly string ToString(); |
| 3693 | } |
| 3694 | public class VectorStoreFileAssociationError : IJsonModel<VectorStoreFileAssociationError>, IPersistableModel<VectorStoreFileAssociationError> { |
| 3695 | public VectorStoreFileAssociationErrorCode Code { get; } |
| 3696 | public string Message { get; } |
| 3697 | public static explicit operator VectorStoreFileAssociationError(ClientResult result); |
| 3698 | public static implicit operator BinaryContent(VectorStoreFileAssociationError vectorStoreFileAssociationError); |
| 3699 | } |
| 3700 | public readonly partial struct VectorStoreFileAssociationErrorCode : IEquatable<VectorStoreFileAssociationErrorCode> { |
| 3701 | public VectorStoreFileAssociationErrorCode(string value); |
| 3702 | public static VectorStoreFileAssociationErrorCode InvalidFile { get; } |
| 3703 | public static VectorStoreFileAssociationErrorCode ServerError { get; } |
| 3704 | public static VectorStoreFileAssociationErrorCode UnsupportedFile { get; } |
| 3705 | public readonly bool Equals(VectorStoreFileAssociationErrorCode other); |
| 3706 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3707 | public override readonly bool Equals(object obj); |
| 3708 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3709 | public override readonly int GetHashCode(); |
| 3710 | public static bool operator ==(VectorStoreFileAssociationErrorCode left, VectorStoreFileAssociationErrorCode right); |
| 3711 | public static implicit operator VectorStoreFileAssociationErrorCode(string value); |
| 3712 | public static bool operator !=(VectorStoreFileAssociationErrorCode left, VectorStoreFileAssociationErrorCode right); |
| 3713 | public override readonly string ToString(); |
| 3714 | } |
| 3715 | public enum VectorStoreFileAssociationStatus { |
| 3716 | Unknown = 0, |
| 3717 | InProgress = 1, |
| 3718 | Completed = 2, |
| 3719 | Cancelled = 3, |
| 3720 | Failed = 4 |
| 3721 | } |
| 3722 | public class VectorStoreFileCounts : IJsonModel<VectorStoreFileCounts>, IPersistableModel<VectorStoreFileCounts> { |
| 3723 | public int Cancelled { get; } |
| 3724 | public int Completed { get; } |
| 3725 | public int Failed { get; } |
| 3726 | public int InProgress { get; } |
| 3727 | public int Total { get; } |
| 3728 | public static explicit operator VectorStoreFileCounts(ClientResult result); |
| 3729 | public static implicit operator BinaryContent(VectorStoreFileCounts vectorStoreFileCounts); |
| 3730 | } |
| 3731 | public readonly partial struct VectorStoreFileStatusFilter : IEquatable<VectorStoreFileStatusFilter> { |
| 3732 | public VectorStoreFileStatusFilter(string value); |
| 3733 | public static VectorStoreFileStatusFilter Cancelled { get; } |
| 3734 | public static VectorStoreFileStatusFilter Completed { get; } |
| 3735 | public static VectorStoreFileStatusFilter Failed { get; } |
| 3736 | public static VectorStoreFileStatusFilter InProgress { get; } |
| 3737 | public readonly bool Equals(VectorStoreFileStatusFilter other); |
| 3738 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3739 | public override readonly bool Equals(object obj); |
| 3740 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3741 | public override readonly int GetHashCode(); |
| 3742 | public static bool operator ==(VectorStoreFileStatusFilter left, VectorStoreFileStatusFilter right); |
| 3743 | public static implicit operator VectorStoreFileStatusFilter(string value); |
| 3744 | public static bool operator !=(VectorStoreFileStatusFilter left, VectorStoreFileStatusFilter right); |
| 3745 | public override readonly string ToString(); |
| 3746 | } |
| 3747 | public class VectorStoreModificationOptions : IJsonModel<VectorStoreModificationOptions>, IPersistableModel<VectorStoreModificationOptions> { |
| 3748 | public VectorStoreExpirationPolicy ExpirationPolicy { get; set; } |
| 3749 | public IDictionary<string, string> Metadata { get; } |
| 3750 | public string Name { get; set; } |
| 3751 | public static explicit operator VectorStoreModificationOptions(ClientResult result); |
| 3752 | public static implicit operator BinaryContent(VectorStoreModificationOptions vectorStoreModificationOptions); |
| 3753 | } |
| 3754 | public enum VectorStoreStatus { |
| 3755 | Unknown = 0, |
| 3756 | InProgress = 1, |
| 3757 | Completed = 2, |
| 3758 | Expired = 3 |
| 3759 | } |
| 3760 | } |