openai/openai-dotnet
Publicmirrored from https://github.com/openai/openai-dotnetAvailable
api/OpenAI.net8.0.cs
7177lines · modecode
| 1 | //------------------------------------------------------------------------------ |
| 2 | // <auto-generated> |
| 3 | // This code was generated by a tool. |
| 4 | // |
| 5 | // Changes to this file may cause incorrect behavior and will be lost if |
| 6 | // the code is regenerated. |
| 7 | // </auto-generated> |
| 8 | //------------------------------------------------------------------------------ |
| 9 | namespace OpenAI { |
| 10 | public class OpenAIClient { |
| 11 | protected OpenAIClient(); |
| 12 | public OpenAIClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 13 | public OpenAIClient(ApiKeyCredential credential); |
| 14 | [Experimental("OPENAI001")] |
| 15 | public OpenAIClient(AuthenticationPolicy authenticationPolicy, OpenAIClientOptions options); |
| 16 | [Experimental("OPENAI001")] |
| 17 | public OpenAIClient(AuthenticationPolicy authenticationPolicy); |
| 18 | protected internal OpenAIClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 19 | public OpenAIClient(string apiKey); |
| 20 | [Experimental("OPENAI001")] |
| 21 | public Uri Endpoint { get; } |
| 22 | public ClientPipeline Pipeline { get; } |
| 23 | [Experimental("OPENAI001")] |
| 24 | public virtual AssistantClient GetAssistantClient(); |
| 25 | public virtual AudioClient GetAudioClient(string model); |
| 26 | [Experimental("OPENAI001")] |
| 27 | public virtual BatchClient GetBatchClient(); |
| 28 | public virtual ChatClient GetChatClient(string model); |
| 29 | [Experimental("OPENAI001")] |
| 30 | public virtual ContainerClient GetContainerClient(); |
| 31 | [Experimental("OPENAI001")] |
| 32 | public virtual ConversationClient GetConversationClient(); |
| 33 | public virtual EmbeddingClient GetEmbeddingClient(string model); |
| 34 | [Experimental("OPENAI001")] |
| 35 | public virtual EvaluationClient GetEvaluationClient(); |
| 36 | [Experimental("OPENAI001")] |
| 37 | public virtual FineTuningClient GetFineTuningClient(); |
| 38 | [Experimental("OPENAI001")] |
| 39 | public virtual GraderClient GetGraderClient(); |
| 40 | public virtual ImageClient GetImageClient(string model); |
| 41 | public virtual ModerationClient GetModerationClient(string model); |
| 42 | public virtual OpenAIFileClient GetOpenAIFileClient(); |
| 43 | public virtual OpenAIModelClient GetOpenAIModelClient(); |
| 44 | [Experimental("OPENAI002")] |
| 45 | public virtual RealtimeClient GetRealtimeClient(); |
| 46 | [Experimental("OPENAI001")] |
| 47 | public virtual ResponsesClient GetResponsesClient(); |
| 48 | [Experimental("OPENAI001")] |
| 49 | public virtual VectorStoreClient GetVectorStoreClient(); |
| 50 | [Experimental("OPENAI001")] |
| 51 | public virtual VideoClient GetVideoClient(); |
| 52 | } |
| 53 | public class OpenAIClientOptions : ClientPipelineOptions { |
| 54 | public Uri Endpoint { get; set; } |
| 55 | public string OrganizationId { get; set; } |
| 56 | public string ProjectId { get; set; } |
| 57 | public string UserAgentApplicationId { get; set; } |
| 58 | } |
| 59 | [Experimental("OPENAI001")] |
| 60 | public class OpenAIContext : ModelReaderWriterContext { |
| 61 | public static OpenAIContext Default { get; } |
| 62 | protected override bool TryGetTypeBuilderCore(Type type, out ModelReaderWriterTypeBuilder builder); |
| 63 | } |
| 64 | } |
| 65 | namespace OpenAI.Assistants { |
| 66 | [Experimental("OPENAI001")] |
| 67 | public class Assistant : IJsonModel<Assistant>, IPersistableModel<Assistant> { |
| 68 | public DateTimeOffset CreatedAt { get; } |
| 69 | public string Description { get; } |
| 70 | public string Id { get; } |
| 71 | public string Instructions { get; } |
| 72 | public IReadOnlyDictionary<string, string> Metadata { get; } |
| 73 | public string Model { get; } |
| 74 | public string Name { get; } |
| 75 | public float? NucleusSamplingFactor { get; } |
| 76 | public AssistantResponseFormat ResponseFormat { get; } |
| 77 | public float? Temperature { get; } |
| 78 | public ToolResources ToolResources { get; } |
| 79 | public IReadOnlyList<ToolDefinition> Tools { get; } |
| 80 | protected virtual Assistant JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 81 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 82 | public static explicit operator Assistant(ClientResult result); |
| 83 | protected virtual Assistant PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 84 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 85 | } |
| 86 | [Experimental("OPENAI001")] |
| 87 | public class AssistantClient { |
| 88 | protected AssistantClient(); |
| 89 | public AssistantClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 90 | public AssistantClient(ApiKeyCredential credential); |
| 91 | public AssistantClient(AuthenticationPolicy authenticationPolicy, OpenAIClientOptions options); |
| 92 | public AssistantClient(AuthenticationPolicy authenticationPolicy); |
| 93 | protected internal AssistantClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 94 | public AssistantClient(string apiKey); |
| 95 | [Experimental("OPENAI001")] |
| 96 | public Uri Endpoint { get; } |
| 97 | public ClientPipeline Pipeline { get; } |
| 98 | public virtual ClientResult CancelRun(string threadId, string runId, RequestOptions options); |
| 99 | public virtual ClientResult<ThreadRun> CancelRun(string threadId, string runId, CancellationToken cancellationToken = default); |
| 100 | public virtual Task<ClientResult> CancelRunAsync(string threadId, string runId, RequestOptions options); |
| 101 | public virtual Task<ClientResult<ThreadRun>> CancelRunAsync(string threadId, string runId, CancellationToken cancellationToken = default); |
| 102 | public virtual ClientResult CreateAssistant(BinaryContent content, RequestOptions options = null); |
| 103 | public virtual ClientResult<Assistant> CreateAssistant(string model, AssistantCreationOptions options = null, CancellationToken cancellationToken = default); |
| 104 | public virtual Task<ClientResult> CreateAssistantAsync(BinaryContent content, RequestOptions options = null); |
| 105 | public virtual Task<ClientResult<Assistant>> CreateAssistantAsync(string model, AssistantCreationOptions options = null, CancellationToken cancellationToken = default); |
| 106 | public virtual ClientResult<ThreadMessage> CreateMessage(string threadId, MessageRole role, IEnumerable<MessageContent> content, MessageCreationOptions options = null, CancellationToken cancellationToken = default); |
| 107 | public virtual ClientResult CreateMessage(string threadId, BinaryContent content, RequestOptions options = null); |
| 108 | public virtual Task<ClientResult<ThreadMessage>> CreateMessageAsync(string threadId, MessageRole role, IEnumerable<MessageContent> content, MessageCreationOptions options = null, CancellationToken cancellationToken = default); |
| 109 | public virtual Task<ClientResult> CreateMessageAsync(string threadId, BinaryContent content, RequestOptions options = null); |
| 110 | public virtual ClientResult CreateRun(string threadId, BinaryContent content, RequestOptions options = null); |
| 111 | public virtual ClientResult<ThreadRun> CreateRun(string threadId, string assistantId, RunCreationOptions options = null, CancellationToken cancellationToken = default); |
| 112 | public virtual Task<ClientResult> CreateRunAsync(string threadId, BinaryContent content, RequestOptions options = null); |
| 113 | public virtual Task<ClientResult<ThreadRun>> CreateRunAsync(string threadId, string assistantId, RunCreationOptions options = null, CancellationToken cancellationToken = default); |
| 114 | public virtual CollectionResult<StreamingUpdate> CreateRunStreaming(string threadId, string assistantId, RunCreationOptions options = null, CancellationToken cancellationToken = default); |
| 115 | public virtual AsyncCollectionResult<StreamingUpdate> CreateRunStreamingAsync(string threadId, string assistantId, RunCreationOptions options = null, CancellationToken cancellationToken = default); |
| 116 | public virtual ClientResult<AssistantThread> CreateThread(ThreadCreationOptions options = null, CancellationToken cancellationToken = default); |
| 117 | public virtual ClientResult CreateThread(BinaryContent content, RequestOptions options = null); |
| 118 | public virtual ClientResult CreateThreadAndRun(BinaryContent content, RequestOptions options = null); |
| 119 | public virtual ClientResult<ThreadRun> CreateThreadAndRun(string assistantId, ThreadCreationOptions threadOptions = null, RunCreationOptions runOptions = null, CancellationToken cancellationToken = default); |
| 120 | public virtual Task<ClientResult> CreateThreadAndRunAsync(BinaryContent content, RequestOptions options = null); |
| 121 | public virtual Task<ClientResult<ThreadRun>> CreateThreadAndRunAsync(string assistantId, ThreadCreationOptions threadOptions = null, RunCreationOptions runOptions = null, CancellationToken cancellationToken = default); |
| 122 | public virtual CollectionResult<StreamingUpdate> CreateThreadAndRunStreaming(string assistantId, ThreadCreationOptions threadOptions = null, RunCreationOptions runOptions = null, CancellationToken cancellationToken = default); |
| 123 | public virtual AsyncCollectionResult<StreamingUpdate> CreateThreadAndRunStreamingAsync(string assistantId, ThreadCreationOptions threadOptions = null, RunCreationOptions runOptions = null, CancellationToken cancellationToken = default); |
| 124 | public virtual Task<ClientResult<AssistantThread>> CreateThreadAsync(ThreadCreationOptions options = null, CancellationToken cancellationToken = default); |
| 125 | public virtual Task<ClientResult> CreateThreadAsync(BinaryContent content, RequestOptions options = null); |
| 126 | public virtual ClientResult DeleteAssistant(string assistantId, RequestOptions options); |
| 127 | public virtual ClientResult<AssistantDeletionResult> DeleteAssistant(string assistantId, CancellationToken cancellationToken = default); |
| 128 | public virtual Task<ClientResult> DeleteAssistantAsync(string assistantId, RequestOptions options); |
| 129 | public virtual Task<ClientResult<AssistantDeletionResult>> DeleteAssistantAsync(string assistantId, CancellationToken cancellationToken = default); |
| 130 | public virtual ClientResult DeleteMessage(string threadId, string messageId, RequestOptions options); |
| 131 | public virtual ClientResult<MessageDeletionResult> DeleteMessage(string threadId, string messageId, CancellationToken cancellationToken = default); |
| 132 | public virtual Task<ClientResult> DeleteMessageAsync(string threadId, string messageId, RequestOptions options); |
| 133 | public virtual Task<ClientResult<MessageDeletionResult>> DeleteMessageAsync(string threadId, string messageId, CancellationToken cancellationToken = default); |
| 134 | public virtual ClientResult DeleteThread(string threadId, RequestOptions options); |
| 135 | public virtual ClientResult<ThreadDeletionResult> DeleteThread(string threadId, CancellationToken cancellationToken = default); |
| 136 | public virtual Task<ClientResult> DeleteThreadAsync(string threadId, RequestOptions options); |
| 137 | public virtual Task<ClientResult<ThreadDeletionResult>> DeleteThreadAsync(string threadId, CancellationToken cancellationToken = default); |
| 138 | public virtual ClientResult GetAssistant(string assistantId, RequestOptions options); |
| 139 | public virtual ClientResult<Assistant> GetAssistant(string assistantId, CancellationToken cancellationToken = default); |
| 140 | public virtual Task<ClientResult> GetAssistantAsync(string assistantId, RequestOptions options); |
| 141 | public virtual Task<ClientResult<Assistant>> GetAssistantAsync(string assistantId, CancellationToken cancellationToken = default); |
| 142 | public virtual CollectionResult<Assistant> GetAssistants(AssistantCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 143 | public virtual CollectionResult GetAssistants(int? limit, string order, string after, string before, RequestOptions options); |
| 144 | public virtual AsyncCollectionResult<Assistant> GetAssistantsAsync(AssistantCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 145 | public virtual AsyncCollectionResult GetAssistantsAsync(int? limit, string order, string after, string before, RequestOptions options); |
| 146 | public virtual ClientResult GetMessage(string threadId, string messageId, RequestOptions options); |
| 147 | public virtual ClientResult<ThreadMessage> GetMessage(string threadId, string messageId, CancellationToken cancellationToken = default); |
| 148 | public virtual Task<ClientResult> GetMessageAsync(string threadId, string messageId, RequestOptions options); |
| 149 | public virtual Task<ClientResult<ThreadMessage>> GetMessageAsync(string threadId, string messageId, CancellationToken cancellationToken = default); |
| 150 | public virtual CollectionResult<ThreadMessage> GetMessages(string threadId, MessageCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 151 | public virtual CollectionResult GetMessages(string threadId, int? limit, string order, string after, string before, RequestOptions options); |
| 152 | public virtual AsyncCollectionResult<ThreadMessage> GetMessagesAsync(string threadId, MessageCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 153 | public virtual AsyncCollectionResult GetMessagesAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options); |
| 154 | public virtual ClientResult GetRun(string threadId, string runId, RequestOptions options); |
| 155 | public virtual ClientResult<ThreadRun> GetRun(string threadId, string runId, CancellationToken cancellationToken = default); |
| 156 | public virtual Task<ClientResult> GetRunAsync(string threadId, string runId, RequestOptions options); |
| 157 | public virtual Task<ClientResult<ThreadRun>> GetRunAsync(string threadId, string runId, CancellationToken cancellationToken = default); |
| 158 | public virtual CollectionResult<ThreadRun> GetRuns(string threadId, RunCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 159 | public virtual CollectionResult GetRuns(string threadId, int? limit, string order, string after, string before, RequestOptions options); |
| 160 | public virtual AsyncCollectionResult<ThreadRun> GetRunsAsync(string threadId, RunCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 161 | public virtual AsyncCollectionResult GetRunsAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options); |
| 162 | public virtual ClientResult GetRunStep(string threadId, string runId, string stepId, RequestOptions options); |
| 163 | public virtual ClientResult<RunStep> GetRunStep(string threadId, string runId, string stepId, CancellationToken cancellationToken = default); |
| 164 | public virtual Task<ClientResult> GetRunStepAsync(string threadId, string runId, string stepId, RequestOptions options); |
| 165 | public virtual Task<ClientResult<RunStep>> GetRunStepAsync(string threadId, string runId, string stepId, CancellationToken cancellationToken = default); |
| 166 | public virtual CollectionResult<RunStep> GetRunSteps(string threadId, string runId, RunStepCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 167 | public virtual CollectionResult GetRunSteps(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options); |
| 168 | public virtual AsyncCollectionResult<RunStep> GetRunStepsAsync(string threadId, string runId, RunStepCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 169 | public virtual AsyncCollectionResult GetRunStepsAsync(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options); |
| 170 | public virtual ClientResult GetThread(string threadId, RequestOptions options); |
| 171 | public virtual ClientResult<AssistantThread> GetThread(string threadId, CancellationToken cancellationToken = default); |
| 172 | public virtual Task<ClientResult> GetThreadAsync(string threadId, RequestOptions options); |
| 173 | public virtual Task<ClientResult<AssistantThread>> GetThreadAsync(string threadId, CancellationToken cancellationToken = default); |
| 174 | public virtual ClientResult<Assistant> ModifyAssistant(string assistantId, AssistantModificationOptions options, CancellationToken cancellationToken = default); |
| 175 | public virtual ClientResult ModifyAssistant(string assistantId, BinaryContent content, RequestOptions options = null); |
| 176 | public virtual Task<ClientResult<Assistant>> ModifyAssistantAsync(string assistantId, AssistantModificationOptions options, CancellationToken cancellationToken = default); |
| 177 | public virtual Task<ClientResult> ModifyAssistantAsync(string assistantId, BinaryContent content, RequestOptions options = null); |
| 178 | public virtual ClientResult<ThreadMessage> ModifyMessage(string threadId, string messageId, MessageModificationOptions options, CancellationToken cancellationToken = default); |
| 179 | public virtual ClientResult ModifyMessage(string threadId, string messageId, BinaryContent content, RequestOptions options = null); |
| 180 | public virtual Task<ClientResult<ThreadMessage>> ModifyMessageAsync(string threadId, string messageId, MessageModificationOptions options, CancellationToken cancellationToken = default); |
| 181 | public virtual Task<ClientResult> ModifyMessageAsync(string threadId, string messageId, BinaryContent content, RequestOptions options = null); |
| 182 | public virtual ClientResult ModifyRun(string threadId, string runId, BinaryContent content, RequestOptions options = null); |
| 183 | public virtual Task<ClientResult> ModifyRunAsync(string threadId, string runId, BinaryContent content, RequestOptions options = null); |
| 184 | public virtual ClientResult<AssistantThread> ModifyThread(string threadId, ThreadModificationOptions options, CancellationToken cancellationToken = default); |
| 185 | public virtual ClientResult ModifyThread(string threadId, BinaryContent content, RequestOptions options = null); |
| 186 | public virtual Task<ClientResult<AssistantThread>> ModifyThreadAsync(string threadId, ThreadModificationOptions options, CancellationToken cancellationToken = default); |
| 187 | public virtual Task<ClientResult> ModifyThreadAsync(string threadId, BinaryContent content, RequestOptions options = null); |
| 188 | public virtual ClientResult SubmitToolOutputsToRun(string threadId, string runId, BinaryContent content, RequestOptions options = null); |
| 189 | public virtual ClientResult<ThreadRun> SubmitToolOutputsToRun(string threadId, string runId, IEnumerable<ToolOutput> toolOutputs, CancellationToken cancellationToken = default); |
| 190 | public virtual Task<ClientResult> SubmitToolOutputsToRunAsync(string threadId, string runId, BinaryContent content, RequestOptions options = null); |
| 191 | public virtual Task<ClientResult<ThreadRun>> SubmitToolOutputsToRunAsync(string threadId, string runId, IEnumerable<ToolOutput> toolOutputs, CancellationToken cancellationToken = default); |
| 192 | public virtual CollectionResult<StreamingUpdate> SubmitToolOutputsToRunStreaming(string threadId, string runId, IEnumerable<ToolOutput> toolOutputs, CancellationToken cancellationToken = default); |
| 193 | public virtual AsyncCollectionResult<StreamingUpdate> SubmitToolOutputsToRunStreamingAsync(string threadId, string runId, IEnumerable<ToolOutput> toolOutputs, CancellationToken cancellationToken = default); |
| 194 | } |
| 195 | [Experimental("OPENAI001")] |
| 196 | public class AssistantCollectionOptions : IJsonModel<AssistantCollectionOptions>, IPersistableModel<AssistantCollectionOptions> { |
| 197 | public string AfterId { get; set; } |
| 198 | public string BeforeId { get; set; } |
| 199 | public AssistantCollectionOrder? Order { get; set; } |
| 200 | public int? PageSizeLimit { get; set; } |
| 201 | protected virtual AssistantCollectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 202 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 203 | protected virtual AssistantCollectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 204 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 205 | } |
| 206 | [Experimental("OPENAI001")] |
| 207 | public readonly partial struct AssistantCollectionOrder : IEquatable<AssistantCollectionOrder> { |
| 208 | public AssistantCollectionOrder(string value); |
| 209 | public static AssistantCollectionOrder Ascending { get; } |
| 210 | public static AssistantCollectionOrder Descending { get; } |
| 211 | public readonly bool Equals(AssistantCollectionOrder other); |
| 212 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 213 | public override readonly bool Equals(object obj); |
| 214 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 215 | public override readonly int GetHashCode(); |
| 216 | public static bool operator ==(AssistantCollectionOrder left, AssistantCollectionOrder right); |
| 217 | public static implicit operator AssistantCollectionOrder(string value); |
| 218 | public static implicit operator AssistantCollectionOrder?(string value); |
| 219 | public static bool operator !=(AssistantCollectionOrder left, AssistantCollectionOrder right); |
| 220 | public override readonly string ToString(); |
| 221 | } |
| 222 | [Experimental("OPENAI001")] |
| 223 | public class AssistantCreationOptions : IJsonModel<AssistantCreationOptions>, IPersistableModel<AssistantCreationOptions> { |
| 224 | public string Description { get; set; } |
| 225 | public string Instructions { get; set; } |
| 226 | public IDictionary<string, string> Metadata { get; } |
| 227 | public string Name { get; set; } |
| 228 | public float? NucleusSamplingFactor { get; set; } |
| 229 | public AssistantResponseFormat ResponseFormat { get; set; } |
| 230 | public float? Temperature { get; set; } |
| 231 | public ToolResources ToolResources { get; set; } |
| 232 | public IList<ToolDefinition> Tools { get; } |
| 233 | protected virtual AssistantCreationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 234 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 235 | protected virtual AssistantCreationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 236 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 237 | } |
| 238 | [Experimental("OPENAI001")] |
| 239 | public class AssistantDeletionResult : IJsonModel<AssistantDeletionResult>, IPersistableModel<AssistantDeletionResult> { |
| 240 | public string AssistantId { get; } |
| 241 | public bool Deleted { get; } |
| 242 | protected virtual AssistantDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 243 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 244 | public static explicit operator AssistantDeletionResult(ClientResult result); |
| 245 | protected virtual AssistantDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 246 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 247 | } |
| 248 | [Experimental("OPENAI001")] |
| 249 | public class AssistantModificationOptions : IJsonModel<AssistantModificationOptions>, IPersistableModel<AssistantModificationOptions> { |
| 250 | public IList<ToolDefinition> DefaultTools { get; } |
| 251 | public string Description { get; set; } |
| 252 | public string Instructions { get; set; } |
| 253 | public IDictionary<string, string> Metadata { get; } |
| 254 | public string Model { get; set; } |
| 255 | public string Name { get; set; } |
| 256 | public float? NucleusSamplingFactor { get; set; } |
| 257 | public AssistantResponseFormat ResponseFormat { get; set; } |
| 258 | public float? Temperature { get; set; } |
| 259 | public ToolResources ToolResources { get; set; } |
| 260 | protected virtual AssistantModificationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 261 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 262 | protected virtual AssistantModificationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 263 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 264 | } |
| 265 | [Experimental("OPENAI001")] |
| 266 | public class AssistantResponseFormat : IEquatable<AssistantResponseFormat>, IEquatable<string>, IJsonModel<AssistantResponseFormat>, IPersistableModel<AssistantResponseFormat> { |
| 267 | public static AssistantResponseFormat Auto { get; } |
| 268 | public static AssistantResponseFormat JsonObject { get; } |
| 269 | public static AssistantResponseFormat Text { get; } |
| 270 | public static AssistantResponseFormat CreateAutoFormat(); |
| 271 | public static AssistantResponseFormat CreateJsonObjectFormat(); |
| 272 | public static AssistantResponseFormat CreateJsonSchemaFormat(string name, BinaryData jsonSchema, string description = null, bool? strictSchemaEnabled = null); |
| 273 | public static AssistantResponseFormat CreateTextFormat(); |
| 274 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 275 | public override bool Equals(object obj); |
| 276 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 277 | public override int GetHashCode(); |
| 278 | protected virtual AssistantResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 279 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 280 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 281 | public static bool operator ==(AssistantResponseFormat first, AssistantResponseFormat second); |
| 282 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 283 | public static implicit operator AssistantResponseFormat(string plainTextFormat); |
| 284 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 285 | public static bool operator !=(AssistantResponseFormat first, AssistantResponseFormat second); |
| 286 | protected virtual AssistantResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 287 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 288 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 289 | bool IEquatable<AssistantResponseFormat>.Equals(AssistantResponseFormat other); |
| 290 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 291 | bool IEquatable<string>.Equals(string other); |
| 292 | public override string ToString(); |
| 293 | } |
| 294 | [Experimental("OPENAI001")] |
| 295 | public class AssistantThread : IJsonModel<AssistantThread>, IPersistableModel<AssistantThread> { |
| 296 | public DateTimeOffset CreatedAt { get; } |
| 297 | public string Id { get; } |
| 298 | public IReadOnlyDictionary<string, string> Metadata { get; } |
| 299 | public ToolResources ToolResources { get; } |
| 300 | protected virtual AssistantThread JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 301 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 302 | public static explicit operator AssistantThread(ClientResult result); |
| 303 | protected virtual AssistantThread PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 304 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 305 | } |
| 306 | [Experimental("OPENAI001")] |
| 307 | public class CodeInterpreterToolDefinition : ToolDefinition, IJsonModel<CodeInterpreterToolDefinition>, IPersistableModel<CodeInterpreterToolDefinition> { |
| 308 | public CodeInterpreterToolDefinition(); |
| 309 | protected override ToolDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 310 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 311 | protected override ToolDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 312 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 313 | } |
| 314 | [Experimental("OPENAI001")] |
| 315 | public class CodeInterpreterToolResources : IJsonModel<CodeInterpreterToolResources>, IPersistableModel<CodeInterpreterToolResources> { |
| 316 | public IList<string> FileIds { get; } |
| 317 | protected virtual CodeInterpreterToolResources JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 318 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 319 | protected virtual CodeInterpreterToolResources PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 320 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 321 | } |
| 322 | [Experimental("OPENAI001")] |
| 323 | public readonly partial struct FileSearchRanker : IEquatable<FileSearchRanker> { |
| 324 | public FileSearchRanker(string value); |
| 325 | public static FileSearchRanker Auto { get; } |
| 326 | public static FileSearchRanker Default20240821 { get; } |
| 327 | public readonly bool Equals(FileSearchRanker other); |
| 328 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 329 | public override readonly bool Equals(object obj); |
| 330 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 331 | public override readonly int GetHashCode(); |
| 332 | public static bool operator ==(FileSearchRanker left, FileSearchRanker right); |
| 333 | public static implicit operator FileSearchRanker(string value); |
| 334 | public static implicit operator FileSearchRanker?(string value); |
| 335 | public static bool operator !=(FileSearchRanker left, FileSearchRanker right); |
| 336 | public override readonly string ToString(); |
| 337 | } |
| 338 | [Experimental("OPENAI001")] |
| 339 | public class FileSearchRankingOptions : IJsonModel<FileSearchRankingOptions>, IPersistableModel<FileSearchRankingOptions> { |
| 340 | public FileSearchRankingOptions(float scoreThreshold); |
| 341 | public FileSearchRanker? Ranker { get; set; } |
| 342 | public float ScoreThreshold { get; set; } |
| 343 | protected virtual FileSearchRankingOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 344 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 345 | protected virtual FileSearchRankingOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 346 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 347 | } |
| 348 | [Experimental("OPENAI001")] |
| 349 | public class FileSearchToolDefinition : ToolDefinition, IJsonModel<FileSearchToolDefinition>, IPersistableModel<FileSearchToolDefinition> { |
| 350 | public FileSearchToolDefinition(); |
| 351 | public int? MaxResults { get; set; } |
| 352 | public FileSearchRankingOptions RankingOptions { get; set; } |
| 353 | protected override ToolDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 354 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 355 | protected override ToolDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 356 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 357 | } |
| 358 | [Experimental("OPENAI001")] |
| 359 | public class FileSearchToolResources : IJsonModel<FileSearchToolResources>, IPersistableModel<FileSearchToolResources> { |
| 360 | public IList<VectorStoreCreationHelper> NewVectorStores { get; } |
| 361 | public IList<string> VectorStoreIds { get; } |
| 362 | protected virtual FileSearchToolResources JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 363 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 364 | protected virtual FileSearchToolResources PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 365 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 366 | } |
| 367 | [Experimental("OPENAI001")] |
| 368 | public class FunctionToolDefinition : ToolDefinition, IJsonModel<FunctionToolDefinition>, IPersistableModel<FunctionToolDefinition> { |
| 369 | public FunctionToolDefinition(); |
| 370 | public FunctionToolDefinition(string name); |
| 371 | public string Description { get; set; } |
| 372 | public string FunctionName { get; set; } |
| 373 | public BinaryData Parameters { get; set; } |
| 374 | public bool? StrictParameterSchemaEnabled { get; set; } |
| 375 | protected override ToolDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 376 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 377 | protected override ToolDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 378 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 379 | } |
| 380 | [Experimental("OPENAI001")] |
| 381 | public class MessageCollectionOptions : IJsonModel<MessageCollectionOptions>, IPersistableModel<MessageCollectionOptions> { |
| 382 | public string AfterId { get; set; } |
| 383 | public string BeforeId { get; set; } |
| 384 | public MessageCollectionOrder? Order { get; set; } |
| 385 | public int? PageSizeLimit { get; set; } |
| 386 | protected virtual MessageCollectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 387 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 388 | protected virtual MessageCollectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 389 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 390 | } |
| 391 | [Experimental("OPENAI001")] |
| 392 | public readonly partial struct MessageCollectionOrder : IEquatable<MessageCollectionOrder> { |
| 393 | public MessageCollectionOrder(string value); |
| 394 | public static MessageCollectionOrder Ascending { get; } |
| 395 | public static MessageCollectionOrder Descending { get; } |
| 396 | public readonly bool Equals(MessageCollectionOrder other); |
| 397 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 398 | public override readonly bool Equals(object obj); |
| 399 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 400 | public override readonly int GetHashCode(); |
| 401 | public static bool operator ==(MessageCollectionOrder left, MessageCollectionOrder right); |
| 402 | public static implicit operator MessageCollectionOrder(string value); |
| 403 | public static implicit operator MessageCollectionOrder?(string value); |
| 404 | public static bool operator !=(MessageCollectionOrder left, MessageCollectionOrder right); |
| 405 | public override readonly string ToString(); |
| 406 | } |
| 407 | [Experimental("OPENAI001")] |
| 408 | public abstract class MessageContent : IJsonModel<MessageContent>, IPersistableModel<MessageContent> { |
| 409 | public MessageImageDetail? ImageDetail { get; } |
| 410 | public string ImageFileId { get; } |
| 411 | public Uri ImageUri { get; } |
| 412 | public string Refusal { get; } |
| 413 | public string Text { get; } |
| 414 | public IReadOnlyList<TextAnnotation> TextAnnotations { get; } |
| 415 | public static MessageContent FromImageFileId(string imageFileId, MessageImageDetail? detail = null); |
| 416 | public static MessageContent FromImageUri(Uri imageUri, MessageImageDetail? detail = null); |
| 417 | public static MessageContent FromText(string text); |
| 418 | protected virtual MessageContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 419 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 420 | public static implicit operator MessageContent(string value); |
| 421 | protected virtual MessageContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 422 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 423 | } |
| 424 | [Experimental("OPENAI001")] |
| 425 | public class MessageContentUpdate : StreamingUpdate { |
| 426 | public MessageImageDetail? ImageDetail { get; } |
| 427 | public string ImageFileId { get; } |
| 428 | public string MessageId { get; } |
| 429 | public int MessageIndex { get; } |
| 430 | public string RefusalUpdate { get; } |
| 431 | public MessageRole? Role { get; } |
| 432 | public string Text { get; } |
| 433 | public TextAnnotationUpdate TextAnnotation { get; } |
| 434 | } |
| 435 | [Experimental("OPENAI001")] |
| 436 | public class MessageCreationAttachment : IJsonModel<MessageCreationAttachment>, IPersistableModel<MessageCreationAttachment> { |
| 437 | public MessageCreationAttachment(string fileId, IEnumerable<ToolDefinition> tools); |
| 438 | public string FileId { get; } |
| 439 | public IReadOnlyList<ToolDefinition> Tools { get; } |
| 440 | protected virtual MessageCreationAttachment JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 441 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 442 | protected virtual MessageCreationAttachment PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 443 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 444 | } |
| 445 | [Experimental("OPENAI001")] |
| 446 | public class MessageCreationOptions : IJsonModel<MessageCreationOptions>, IPersistableModel<MessageCreationOptions> { |
| 447 | public IList<MessageCreationAttachment> Attachments { get; set; } |
| 448 | public IDictionary<string, string> Metadata { get; } |
| 449 | protected virtual MessageCreationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 450 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 451 | protected virtual MessageCreationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 452 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 453 | } |
| 454 | [Experimental("OPENAI001")] |
| 455 | public class MessageDeletionResult : IJsonModel<MessageDeletionResult>, IPersistableModel<MessageDeletionResult> { |
| 456 | public bool Deleted { get; } |
| 457 | public string MessageId { get; } |
| 458 | protected virtual MessageDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 459 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 460 | public static explicit operator MessageDeletionResult(ClientResult result); |
| 461 | protected virtual MessageDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 462 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 463 | } |
| 464 | [Experimental("OPENAI001")] |
| 465 | public class MessageFailureDetails : IJsonModel<MessageFailureDetails>, IPersistableModel<MessageFailureDetails> { |
| 466 | public MessageFailureReason Reason { get; } |
| 467 | protected virtual MessageFailureDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 468 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 469 | protected virtual MessageFailureDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 470 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 471 | } |
| 472 | [Experimental("OPENAI001")] |
| 473 | public readonly partial struct MessageFailureReason : IEquatable<MessageFailureReason> { |
| 474 | public MessageFailureReason(string value); |
| 475 | public static MessageFailureReason ContentFilter { get; } |
| 476 | public static MessageFailureReason MaxTokens { get; } |
| 477 | public static MessageFailureReason RunCancelled { get; } |
| 478 | public static MessageFailureReason RunExpired { get; } |
| 479 | public static MessageFailureReason RunFailed { get; } |
| 480 | public readonly bool Equals(MessageFailureReason other); |
| 481 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 482 | public override readonly bool Equals(object obj); |
| 483 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 484 | public override readonly int GetHashCode(); |
| 485 | public static bool operator ==(MessageFailureReason left, MessageFailureReason right); |
| 486 | public static implicit operator MessageFailureReason(string value); |
| 487 | public static implicit operator MessageFailureReason?(string value); |
| 488 | public static bool operator !=(MessageFailureReason left, MessageFailureReason right); |
| 489 | public override readonly string ToString(); |
| 490 | } |
| 491 | [Experimental("OPENAI001")] |
| 492 | public enum MessageImageDetail { |
| 493 | Auto = 0, |
| 494 | Low = 1, |
| 495 | High = 2 |
| 496 | } |
| 497 | [Experimental("OPENAI001")] |
| 498 | public class MessageModificationOptions : IJsonModel<MessageModificationOptions>, IPersistableModel<MessageModificationOptions> { |
| 499 | public IDictionary<string, string> Metadata { get; } |
| 500 | protected virtual MessageModificationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 501 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 502 | protected virtual MessageModificationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 503 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 504 | } |
| 505 | [Experimental("OPENAI001")] |
| 506 | public enum MessageRole { |
| 507 | User = 0, |
| 508 | Assistant = 1 |
| 509 | } |
| 510 | [Experimental("OPENAI001")] |
| 511 | public readonly partial struct MessageStatus : IEquatable<MessageStatus> { |
| 512 | public MessageStatus(string value); |
| 513 | public static MessageStatus Completed { get; } |
| 514 | public static MessageStatus Incomplete { get; } |
| 515 | public static MessageStatus InProgress { get; } |
| 516 | public readonly bool Equals(MessageStatus other); |
| 517 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 518 | public override readonly bool Equals(object obj); |
| 519 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 520 | public override readonly int GetHashCode(); |
| 521 | public static bool operator ==(MessageStatus left, MessageStatus right); |
| 522 | public static implicit operator MessageStatus(string value); |
| 523 | public static implicit operator MessageStatus?(string value); |
| 524 | public static bool operator !=(MessageStatus left, MessageStatus right); |
| 525 | public override readonly string ToString(); |
| 526 | } |
| 527 | [Experimental("OPENAI001")] |
| 528 | public class MessageStatusUpdate : StreamingUpdate<ThreadMessage> { |
| 529 | } |
| 530 | [Experimental("OPENAI001")] |
| 531 | public abstract class RequiredAction { |
| 532 | public string FunctionArguments { get; } |
| 533 | public string FunctionName { get; } |
| 534 | public string ToolCallId { get; } |
| 535 | } |
| 536 | [Experimental("OPENAI001")] |
| 537 | public class RequiredActionUpdate : RunUpdate { |
| 538 | public string FunctionArguments { get; } |
| 539 | public string FunctionName { get; } |
| 540 | public string ToolCallId { get; } |
| 541 | public ThreadRun GetThreadRun(); |
| 542 | } |
| 543 | [Experimental("OPENAI001")] |
| 544 | public class RunCollectionOptions : IJsonModel<RunCollectionOptions>, IPersistableModel<RunCollectionOptions> { |
| 545 | public string AfterId { get; set; } |
| 546 | public string BeforeId { get; set; } |
| 547 | public RunCollectionOrder? Order { get; set; } |
| 548 | public int? PageSizeLimit { get; set; } |
| 549 | protected virtual RunCollectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 550 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 551 | protected virtual RunCollectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 552 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 553 | } |
| 554 | [Experimental("OPENAI001")] |
| 555 | public readonly partial struct RunCollectionOrder : IEquatable<RunCollectionOrder> { |
| 556 | public RunCollectionOrder(string value); |
| 557 | public static RunCollectionOrder Ascending { get; } |
| 558 | public static RunCollectionOrder Descending { get; } |
| 559 | public readonly bool Equals(RunCollectionOrder other); |
| 560 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 561 | public override readonly bool Equals(object obj); |
| 562 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 563 | public override readonly int GetHashCode(); |
| 564 | public static bool operator ==(RunCollectionOrder left, RunCollectionOrder right); |
| 565 | public static implicit operator RunCollectionOrder(string value); |
| 566 | public static implicit operator RunCollectionOrder?(string value); |
| 567 | public static bool operator !=(RunCollectionOrder left, RunCollectionOrder right); |
| 568 | public override readonly string ToString(); |
| 569 | } |
| 570 | [Experimental("OPENAI001")] |
| 571 | public class RunCreationOptions : IJsonModel<RunCreationOptions>, IPersistableModel<RunCreationOptions> { |
| 572 | public string AdditionalInstructions { get; set; } |
| 573 | public IList<ThreadInitializationMessage> AdditionalMessages { get; } |
| 574 | public bool? AllowParallelToolCalls { get; set; } |
| 575 | public string InstructionsOverride { get; set; } |
| 576 | public int? MaxInputTokenCount { get; set; } |
| 577 | public int? MaxOutputTokenCount { get; set; } |
| 578 | public IDictionary<string, string> Metadata { get; } |
| 579 | public string ModelOverride { get; set; } |
| 580 | public float? NucleusSamplingFactor { get; set; } |
| 581 | public AssistantResponseFormat ResponseFormat { get; set; } |
| 582 | public float? Temperature { get; set; } |
| 583 | public ToolConstraint ToolConstraint { get; set; } |
| 584 | public IList<ToolDefinition> ToolsOverride { get; } |
| 585 | public RunTruncationStrategy TruncationStrategy { get; set; } |
| 586 | protected virtual RunCreationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 587 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 588 | protected virtual RunCreationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 589 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 590 | } |
| 591 | [Experimental("OPENAI001")] |
| 592 | public class RunError : IJsonModel<RunError>, IPersistableModel<RunError> { |
| 593 | public RunErrorCode Code { get; } |
| 594 | public string Message { get; } |
| 595 | protected virtual RunError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 596 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 597 | protected virtual RunError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 598 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 599 | } |
| 600 | [Experimental("OPENAI001")] |
| 601 | public readonly partial struct RunErrorCode : IEquatable<RunErrorCode> { |
| 602 | public RunErrorCode(string value); |
| 603 | public static RunErrorCode InvalidPrompt { get; } |
| 604 | public static RunErrorCode RateLimitExceeded { get; } |
| 605 | public static RunErrorCode ServerError { get; } |
| 606 | public readonly bool Equals(RunErrorCode other); |
| 607 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 608 | public override readonly bool Equals(object obj); |
| 609 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 610 | public override readonly int GetHashCode(); |
| 611 | public static bool operator ==(RunErrorCode left, RunErrorCode right); |
| 612 | public static implicit operator RunErrorCode(string value); |
| 613 | public static implicit operator RunErrorCode?(string value); |
| 614 | public static bool operator !=(RunErrorCode left, RunErrorCode right); |
| 615 | public override readonly string ToString(); |
| 616 | } |
| 617 | [Experimental("OPENAI001")] |
| 618 | public class RunIncompleteDetails : IJsonModel<RunIncompleteDetails>, IPersistableModel<RunIncompleteDetails> { |
| 619 | public RunIncompleteReason? Reason { get; } |
| 620 | protected virtual RunIncompleteDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 621 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 622 | protected virtual RunIncompleteDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 623 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 624 | } |
| 625 | [Experimental("OPENAI001")] |
| 626 | public readonly partial struct RunIncompleteReason : IEquatable<RunIncompleteReason> { |
| 627 | public RunIncompleteReason(string value); |
| 628 | public static RunIncompleteReason MaxInputTokenCount { get; } |
| 629 | public static RunIncompleteReason MaxOutputTokenCount { get; } |
| 630 | public readonly bool Equals(RunIncompleteReason other); |
| 631 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 632 | public override readonly bool Equals(object obj); |
| 633 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 634 | public override readonly int GetHashCode(); |
| 635 | public static bool operator ==(RunIncompleteReason left, RunIncompleteReason right); |
| 636 | public static implicit operator RunIncompleteReason(string value); |
| 637 | public static implicit operator RunIncompleteReason?(string value); |
| 638 | public static bool operator !=(RunIncompleteReason left, RunIncompleteReason right); |
| 639 | public override readonly string ToString(); |
| 640 | } |
| 641 | [Experimental("OPENAI001")] |
| 642 | public class RunModificationOptions : IJsonModel<RunModificationOptions>, IPersistableModel<RunModificationOptions> { |
| 643 | public IDictionary<string, string> Metadata { get; } |
| 644 | protected virtual RunModificationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 645 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 646 | protected virtual RunModificationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 647 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 648 | } |
| 649 | [Experimental("OPENAI001")] |
| 650 | public readonly partial struct RunStatus : IEquatable<RunStatus> { |
| 651 | public RunStatus(string value); |
| 652 | public static RunStatus Cancelled { get; } |
| 653 | public static RunStatus Cancelling { get; } |
| 654 | public static RunStatus Completed { get; } |
| 655 | public static RunStatus Expired { get; } |
| 656 | public static RunStatus Failed { get; } |
| 657 | public static RunStatus Incomplete { get; } |
| 658 | public static RunStatus InProgress { get; } |
| 659 | public bool IsTerminal { get; } |
| 660 | public static RunStatus Queued { get; } |
| 661 | public static RunStatus RequiresAction { get; } |
| 662 | public readonly bool Equals(RunStatus other); |
| 663 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 664 | public override readonly bool Equals(object obj); |
| 665 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 666 | public override readonly int GetHashCode(); |
| 667 | public static bool operator ==(RunStatus left, RunStatus right); |
| 668 | public static implicit operator RunStatus(string value); |
| 669 | public static implicit operator RunStatus?(string value); |
| 670 | public static bool operator !=(RunStatus left, RunStatus right); |
| 671 | public override readonly string ToString(); |
| 672 | } |
| 673 | [Experimental("OPENAI001")] |
| 674 | public class RunStep : IJsonModel<RunStep>, IPersistableModel<RunStep> { |
| 675 | public string AssistantId { get; } |
| 676 | public DateTimeOffset? CancelledAt { get; } |
| 677 | public DateTimeOffset? CompletedAt { get; } |
| 678 | public DateTimeOffset CreatedAt { get; } |
| 679 | public RunStepDetails Details { get; } |
| 680 | public DateTimeOffset? ExpiredAt { get; } |
| 681 | public DateTimeOffset? FailedAt { get; } |
| 682 | public string Id { get; } |
| 683 | public RunStepKind Kind { get; } |
| 684 | public RunStepError LastError { get; } |
| 685 | public IReadOnlyDictionary<string, string> Metadata { get; } |
| 686 | public string RunId { get; } |
| 687 | public RunStepStatus Status { get; } |
| 688 | public string ThreadId { get; } |
| 689 | public RunStepTokenUsage Usage { get; } |
| 690 | protected virtual RunStep JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 691 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 692 | public static explicit operator RunStep(ClientResult result); |
| 693 | protected virtual RunStep PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 694 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 695 | } |
| 696 | [Experimental("OPENAI001")] |
| 697 | public abstract class RunStepCodeInterpreterOutput : IJsonModel<RunStepCodeInterpreterOutput>, IPersistableModel<RunStepCodeInterpreterOutput> { |
| 698 | public string ImageFileId { get; } |
| 699 | public string Logs { get; } |
| 700 | protected virtual RunStepCodeInterpreterOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 701 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 702 | protected virtual RunStepCodeInterpreterOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 703 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 704 | } |
| 705 | [Experimental("OPENAI001")] |
| 706 | public class RunStepCollectionOptions : IJsonModel<RunStepCollectionOptions>, IPersistableModel<RunStepCollectionOptions> { |
| 707 | public string AfterId { get; set; } |
| 708 | public string BeforeId { get; set; } |
| 709 | public RunStepCollectionOrder? Order { get; set; } |
| 710 | public int? PageSizeLimit { get; set; } |
| 711 | protected virtual RunStepCollectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 712 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 713 | protected virtual RunStepCollectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 714 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 715 | } |
| 716 | [Experimental("OPENAI001")] |
| 717 | public readonly partial struct RunStepCollectionOrder : IEquatable<RunStepCollectionOrder> { |
| 718 | public RunStepCollectionOrder(string value); |
| 719 | public static RunStepCollectionOrder Ascending { get; } |
| 720 | public static RunStepCollectionOrder Descending { get; } |
| 721 | public readonly bool Equals(RunStepCollectionOrder other); |
| 722 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 723 | public override readonly bool Equals(object obj); |
| 724 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 725 | public override readonly int GetHashCode(); |
| 726 | public static bool operator ==(RunStepCollectionOrder left, RunStepCollectionOrder right); |
| 727 | public static implicit operator RunStepCollectionOrder(string value); |
| 728 | public static implicit operator RunStepCollectionOrder?(string value); |
| 729 | public static bool operator !=(RunStepCollectionOrder left, RunStepCollectionOrder right); |
| 730 | public override readonly string ToString(); |
| 731 | } |
| 732 | [Experimental("OPENAI001")] |
| 733 | public abstract class RunStepDetails : IJsonModel<RunStepDetails>, IPersistableModel<RunStepDetails> { |
| 734 | public string CreatedMessageId { get; } |
| 735 | public IReadOnlyList<RunStepToolCall> ToolCalls { get; } |
| 736 | protected virtual RunStepDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 737 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 738 | protected virtual RunStepDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 739 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 740 | } |
| 741 | [Experimental("OPENAI001")] |
| 742 | public class RunStepDetailsUpdate : StreamingUpdate { |
| 743 | public string CodeInterpreterInput { get; } |
| 744 | public IReadOnlyList<RunStepUpdateCodeInterpreterOutput> CodeInterpreterOutputs { get; } |
| 745 | public string CreatedMessageId { get; } |
| 746 | public FileSearchRankingOptions FileSearchRankingOptions { get; } |
| 747 | public IReadOnlyList<RunStepFileSearchResult> FileSearchResults { get; } |
| 748 | public string FunctionArguments { get; } |
| 749 | public string FunctionName { get; } |
| 750 | public string FunctionOutput { get; } |
| 751 | public string StepId { get; } |
| 752 | public string ToolCallId { get; } |
| 753 | public int? ToolCallIndex { get; } |
| 754 | } |
| 755 | [Experimental("OPENAI001")] |
| 756 | public class RunStepError : IJsonModel<RunStepError>, IPersistableModel<RunStepError> { |
| 757 | public RunStepErrorCode Code { get; } |
| 758 | public string Message { get; } |
| 759 | protected virtual RunStepError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 760 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 761 | protected virtual RunStepError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 762 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 763 | } |
| 764 | [Experimental("OPENAI001")] |
| 765 | public readonly partial struct RunStepErrorCode : IEquatable<RunStepErrorCode> { |
| 766 | public RunStepErrorCode(string value); |
| 767 | public static RunStepErrorCode RateLimitExceeded { get; } |
| 768 | public static RunStepErrorCode ServerError { get; } |
| 769 | public readonly bool Equals(RunStepErrorCode other); |
| 770 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 771 | public override readonly bool Equals(object obj); |
| 772 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 773 | public override readonly int GetHashCode(); |
| 774 | public static bool operator ==(RunStepErrorCode left, RunStepErrorCode right); |
| 775 | public static implicit operator RunStepErrorCode(string value); |
| 776 | public static implicit operator RunStepErrorCode?(string value); |
| 777 | public static bool operator !=(RunStepErrorCode left, RunStepErrorCode right); |
| 778 | public override readonly string ToString(); |
| 779 | } |
| 780 | [Experimental("OPENAI001")] |
| 781 | public class RunStepFileSearchResult : IJsonModel<RunStepFileSearchResult>, IPersistableModel<RunStepFileSearchResult> { |
| 782 | public IReadOnlyList<RunStepFileSearchResultContent> Content { get; } |
| 783 | public string FileId { get; } |
| 784 | public string FileName { get; } |
| 785 | public float Score { get; } |
| 786 | protected virtual RunStepFileSearchResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 787 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 788 | protected virtual RunStepFileSearchResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 789 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 790 | } |
| 791 | [Experimental("OPENAI001")] |
| 792 | public class RunStepFileSearchResultContent : IJsonModel<RunStepFileSearchResultContent>, IPersistableModel<RunStepFileSearchResultContent> { |
| 793 | public RunStepFileSearchResultContentKind Kind { get; } |
| 794 | public string Text { get; } |
| 795 | protected virtual RunStepFileSearchResultContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 796 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 797 | protected virtual RunStepFileSearchResultContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 798 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 799 | } |
| 800 | [Experimental("OPENAI001")] |
| 801 | public enum RunStepFileSearchResultContentKind { |
| 802 | Text = 0 |
| 803 | } |
| 804 | [Experimental("OPENAI001")] |
| 805 | public enum RunStepKind { |
| 806 | CreatedMessage = 0, |
| 807 | ToolCall = 1 |
| 808 | } |
| 809 | [Experimental("OPENAI001")] |
| 810 | public readonly partial struct RunStepStatus : IEquatable<RunStepStatus> { |
| 811 | public RunStepStatus(string value); |
| 812 | public static RunStepStatus Cancelled { get; } |
| 813 | public static RunStepStatus Completed { get; } |
| 814 | public static RunStepStatus Expired { get; } |
| 815 | public static RunStepStatus Failed { get; } |
| 816 | public static RunStepStatus InProgress { get; } |
| 817 | public readonly bool Equals(RunStepStatus other); |
| 818 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 819 | public override readonly bool Equals(object obj); |
| 820 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 821 | public override readonly int GetHashCode(); |
| 822 | public static bool operator ==(RunStepStatus left, RunStepStatus right); |
| 823 | public static implicit operator RunStepStatus(string value); |
| 824 | public static implicit operator RunStepStatus?(string value); |
| 825 | public static bool operator !=(RunStepStatus left, RunStepStatus right); |
| 826 | public override readonly string ToString(); |
| 827 | } |
| 828 | [Experimental("OPENAI001")] |
| 829 | public class RunStepTokenUsage : IJsonModel<RunStepTokenUsage>, IPersistableModel<RunStepTokenUsage> { |
| 830 | public int InputTokenCount { get; } |
| 831 | public int OutputTokenCount { get; } |
| 832 | public int TotalTokenCount { get; } |
| 833 | protected virtual RunStepTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 834 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 835 | protected virtual RunStepTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 836 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 837 | } |
| 838 | [Experimental("OPENAI001")] |
| 839 | public class RunStepToolCall : IJsonModel<RunStepToolCall>, IPersistableModel<RunStepToolCall> { |
| 840 | public string CodeInterpreterInput { get; } |
| 841 | public IReadOnlyList<RunStepCodeInterpreterOutput> CodeInterpreterOutputs { get; } |
| 842 | public FileSearchRankingOptions FileSearchRankingOptions { get; } |
| 843 | public IReadOnlyList<RunStepFileSearchResult> FileSearchResults { get; } |
| 844 | public string FunctionArguments { get; } |
| 845 | public string FunctionName { get; } |
| 846 | public string FunctionOutput { get; } |
| 847 | public string Id { get; } |
| 848 | public RunStepToolCallKind Kind { get; } |
| 849 | protected virtual RunStepToolCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 850 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 851 | protected virtual RunStepToolCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 852 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 853 | } |
| 854 | [Experimental("OPENAI001")] |
| 855 | public enum RunStepToolCallKind { |
| 856 | CodeInterpreter = 0, |
| 857 | FileSearch = 1, |
| 858 | Function = 2 |
| 859 | } |
| 860 | [Experimental("OPENAI001")] |
| 861 | public class RunStepUpdate : StreamingUpdate<RunStep> { |
| 862 | } |
| 863 | [Experimental("OPENAI001")] |
| 864 | public class RunStepUpdateCodeInterpreterOutput : IJsonModel<RunStepUpdateCodeInterpreterOutput>, IPersistableModel<RunStepUpdateCodeInterpreterOutput> { |
| 865 | public string ImageFileId { get; } |
| 866 | public string Logs { get; } |
| 867 | public int OutputIndex { get; } |
| 868 | protected virtual RunStepUpdateCodeInterpreterOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 869 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 870 | protected virtual RunStepUpdateCodeInterpreterOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 871 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 872 | } |
| 873 | [Experimental("OPENAI001")] |
| 874 | public class RunTokenUsage : IJsonModel<RunTokenUsage>, IPersistableModel<RunTokenUsage> { |
| 875 | public int InputTokenCount { get; } |
| 876 | public int OutputTokenCount { get; } |
| 877 | public int TotalTokenCount { get; } |
| 878 | protected virtual RunTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 879 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 880 | protected virtual RunTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 881 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 882 | } |
| 883 | [Experimental("OPENAI001")] |
| 884 | public class RunTruncationStrategy : IJsonModel<RunTruncationStrategy>, IPersistableModel<RunTruncationStrategy> { |
| 885 | public static RunTruncationStrategy Auto { get; } |
| 886 | public int? LastMessages { get; } |
| 887 | public static RunTruncationStrategy CreateLastMessagesStrategy(int lastMessageCount); |
| 888 | protected virtual RunTruncationStrategy JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 889 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 890 | protected virtual RunTruncationStrategy PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 891 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 892 | } |
| 893 | [Experimental("OPENAI001")] |
| 894 | public class RunUpdate : StreamingUpdate<ThreadRun> { |
| 895 | } |
| 896 | [Experimental("OPENAI001")] |
| 897 | public abstract class StreamingUpdate { |
| 898 | public StreamingUpdateReason UpdateKind { get; } |
| 899 | } |
| 900 | [Experimental("OPENAI001")] |
| 901 | public enum StreamingUpdateReason { |
| 902 | Unknown = 0, |
| 903 | ThreadCreated = 1, |
| 904 | RunCreated = 2, |
| 905 | RunQueued = 3, |
| 906 | RunInProgress = 4, |
| 907 | RunRequiresAction = 5, |
| 908 | RunCompleted = 6, |
| 909 | RunIncomplete = 7, |
| 910 | RunFailed = 8, |
| 911 | RunCancelling = 9, |
| 912 | RunCancelled = 10, |
| 913 | RunExpired = 11, |
| 914 | RunStepCreated = 12, |
| 915 | RunStepInProgress = 13, |
| 916 | RunStepUpdated = 14, |
| 917 | RunStepCompleted = 15, |
| 918 | RunStepFailed = 16, |
| 919 | RunStepCancelled = 17, |
| 920 | RunStepExpired = 18, |
| 921 | MessageCreated = 19, |
| 922 | MessageInProgress = 20, |
| 923 | MessageUpdated = 21, |
| 924 | MessageCompleted = 22, |
| 925 | MessageFailed = 23, |
| 926 | Error = 24, |
| 927 | Done = 25 |
| 928 | } |
| 929 | [Experimental("OPENAI001")] |
| 930 | public class StreamingUpdate<T> : StreamingUpdate where T : class { |
| 931 | public T Value { get; } |
| 932 | public static implicit operator T(StreamingUpdate<T> update); |
| 933 | } |
| 934 | [Experimental("OPENAI001")] |
| 935 | public class TextAnnotation { |
| 936 | public int EndIndex { get; } |
| 937 | public string InputFileId { get; } |
| 938 | public string OutputFileId { get; } |
| 939 | public int StartIndex { get; } |
| 940 | public string TextToReplace { get; } |
| 941 | } |
| 942 | [Experimental("OPENAI001")] |
| 943 | public class TextAnnotationUpdate { |
| 944 | public int ContentIndex { get; } |
| 945 | public int? EndIndex { get; } |
| 946 | public string InputFileId { get; } |
| 947 | public string OutputFileId { get; } |
| 948 | public int? StartIndex { get; } |
| 949 | public string TextToReplace { get; } |
| 950 | } |
| 951 | [Experimental("OPENAI001")] |
| 952 | public class ThreadCreationOptions : IJsonModel<ThreadCreationOptions>, IPersistableModel<ThreadCreationOptions> { |
| 953 | public IList<ThreadInitializationMessage> InitialMessages { get; } |
| 954 | public IDictionary<string, string> Metadata { get; } |
| 955 | public ToolResources ToolResources { get; set; } |
| 956 | protected virtual ThreadCreationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 957 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 958 | protected virtual ThreadCreationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 959 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 960 | } |
| 961 | [Experimental("OPENAI001")] |
| 962 | public class ThreadDeletionResult : IJsonModel<ThreadDeletionResult>, IPersistableModel<ThreadDeletionResult> { |
| 963 | public bool Deleted { get; } |
| 964 | public string ThreadId { get; } |
| 965 | protected virtual ThreadDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 966 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 967 | public static explicit operator ThreadDeletionResult(ClientResult result); |
| 968 | protected virtual ThreadDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 969 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 970 | } |
| 971 | [Experimental("OPENAI001")] |
| 972 | public class ThreadInitializationMessage : MessageCreationOptions { |
| 973 | public ThreadInitializationMessage(MessageRole role, IEnumerable<MessageContent> content); |
| 974 | public static implicit operator ThreadInitializationMessage(string initializationMessage); |
| 975 | } |
| 976 | [Experimental("OPENAI001")] |
| 977 | public class ThreadMessage : IJsonModel<ThreadMessage>, IPersistableModel<ThreadMessage> { |
| 978 | public string AssistantId { get; } |
| 979 | public IReadOnlyList<MessageCreationAttachment> Attachments { get; } |
| 980 | public DateTimeOffset? CompletedAt { get; } |
| 981 | public IReadOnlyList<MessageContent> Content { get; } |
| 982 | public DateTimeOffset CreatedAt { get; } |
| 983 | public string Id { get; } |
| 984 | public DateTimeOffset? IncompleteAt { get; } |
| 985 | public MessageFailureDetails IncompleteDetails { get; } |
| 986 | public IReadOnlyDictionary<string, string> Metadata { get; } |
| 987 | public MessageRole Role { get; } |
| 988 | public string RunId { get; } |
| 989 | public MessageStatus Status { get; } |
| 990 | public string ThreadId { get; } |
| 991 | protected virtual ThreadMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 992 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 993 | public static explicit operator ThreadMessage(ClientResult result); |
| 994 | protected virtual ThreadMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 995 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 996 | } |
| 997 | [Experimental("OPENAI001")] |
| 998 | public class ThreadModificationOptions : IJsonModel<ThreadModificationOptions>, IPersistableModel<ThreadModificationOptions> { |
| 999 | public IDictionary<string, string> Metadata { get; } |
| 1000 | public ToolResources ToolResources { get; set; } |
| 1001 | protected virtual ThreadModificationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1002 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1003 | protected virtual ThreadModificationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1004 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1005 | } |
| 1006 | [Experimental("OPENAI001")] |
| 1007 | public class ThreadRun : IJsonModel<ThreadRun>, IPersistableModel<ThreadRun> { |
| 1008 | public bool? AllowParallelToolCalls { get; } |
| 1009 | public string AssistantId { get; } |
| 1010 | public DateTimeOffset? CancelledAt { get; } |
| 1011 | public DateTimeOffset? CompletedAt { get; } |
| 1012 | public DateTimeOffset CreatedAt { get; } |
| 1013 | public DateTimeOffset? ExpiresAt { get; } |
| 1014 | public DateTimeOffset? FailedAt { get; } |
| 1015 | public string Id { get; } |
| 1016 | public RunIncompleteDetails IncompleteDetails { get; } |
| 1017 | public string Instructions { get; } |
| 1018 | public RunError LastError { get; } |
| 1019 | public int? MaxInputTokenCount { get; } |
| 1020 | public int? MaxOutputTokenCount { get; } |
| 1021 | public IReadOnlyDictionary<string, string> Metadata { get; } |
| 1022 | public string Model { get; } |
| 1023 | public float? NucleusSamplingFactor { get; } |
| 1024 | public IReadOnlyList<RequiredAction> RequiredActions { get; } |
| 1025 | public AssistantResponseFormat ResponseFormat { get; } |
| 1026 | public DateTimeOffset? StartedAt { get; } |
| 1027 | public RunStatus Status { get; } |
| 1028 | public float? Temperature { get; } |
| 1029 | public string ThreadId { get; } |
| 1030 | public ToolConstraint ToolConstraint { get; } |
| 1031 | public IReadOnlyList<ToolDefinition> Tools { get; } |
| 1032 | public RunTruncationStrategy TruncationStrategy { get; } |
| 1033 | public RunTokenUsage Usage { get; } |
| 1034 | protected virtual ThreadRun JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1035 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1036 | public static explicit operator ThreadRun(ClientResult result); |
| 1037 | protected virtual ThreadRun PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1038 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1039 | } |
| 1040 | [Experimental("OPENAI001")] |
| 1041 | public class ThreadUpdate : StreamingUpdate<AssistantThread> { |
| 1042 | public DateTimeOffset CreatedAt { get; } |
| 1043 | public string Id { get; } |
| 1044 | public IReadOnlyDictionary<string, string> Metadata { get; } |
| 1045 | public ToolResources ToolResources { get; } |
| 1046 | } |
| 1047 | [Experimental("OPENAI001")] |
| 1048 | public class ToolConstraint : IJsonModel<ToolConstraint>, IPersistableModel<ToolConstraint> { |
| 1049 | public ToolConstraint(ToolDefinition toolDefinition); |
| 1050 | public static ToolConstraint Auto { get; } |
| 1051 | public static ToolConstraint None { get; } |
| 1052 | public static ToolConstraint Required { get; } |
| 1053 | protected virtual ToolConstraint JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1054 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1055 | protected virtual ToolConstraint PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1056 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1057 | } |
| 1058 | [Experimental("OPENAI001")] |
| 1059 | public class ToolDefinition : IJsonModel<ToolDefinition>, IPersistableModel<ToolDefinition> { |
| 1060 | public static CodeInterpreterToolDefinition CreateCodeInterpreter(); |
| 1061 | public static FileSearchToolDefinition CreateFileSearch(int? maxResults = null); |
| 1062 | public static FunctionToolDefinition CreateFunction(string name, string description = null, BinaryData parameters = null, bool? strictParameterSchemaEnabled = null); |
| 1063 | protected virtual ToolDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1064 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1065 | protected virtual ToolDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1066 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1067 | } |
| 1068 | [Experimental("OPENAI001")] |
| 1069 | public class ToolOutput : IJsonModel<ToolOutput>, IPersistableModel<ToolOutput> { |
| 1070 | public ToolOutput(); |
| 1071 | public ToolOutput(string toolCallId, string output); |
| 1072 | public string Output { get; set; } |
| 1073 | public string ToolCallId { get; set; } |
| 1074 | protected virtual ToolOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1075 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1076 | protected virtual ToolOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1077 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1078 | } |
| 1079 | [Experimental("OPENAI001")] |
| 1080 | public class ToolResources : IJsonModel<ToolResources>, IPersistableModel<ToolResources> { |
| 1081 | public CodeInterpreterToolResources CodeInterpreter { get; set; } |
| 1082 | public FileSearchToolResources FileSearch { get; set; } |
| 1083 | protected virtual ToolResources JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1084 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1085 | protected virtual ToolResources PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1086 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1087 | } |
| 1088 | [Experimental("OPENAI001")] |
| 1089 | public class VectorStoreCreationHelper : IJsonModel<VectorStoreCreationHelper>, IPersistableModel<VectorStoreCreationHelper> { |
| 1090 | public VectorStoreCreationHelper(); |
| 1091 | public VectorStoreCreationHelper(IEnumerable<OpenAIFile> files); |
| 1092 | public VectorStoreCreationHelper(IEnumerable<string> fileIds); |
| 1093 | public FileChunkingStrategy ChunkingStrategy { get; set; } |
| 1094 | public IList<string> FileIds { get; } |
| 1095 | public IDictionary<string, string> Metadata { get; } |
| 1096 | protected virtual VectorStoreCreationHelper JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1097 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1098 | protected virtual VectorStoreCreationHelper PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1099 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1100 | } |
| 1101 | } |
| 1102 | namespace OpenAI.Audio { |
| 1103 | public class AudioClient { |
| 1104 | protected AudioClient(); |
| 1105 | protected internal AudioClient(ClientPipeline pipeline, string model, OpenAIClientOptions options); |
| 1106 | public AudioClient(string model, ApiKeyCredential credential, OpenAIClientOptions options); |
| 1107 | public AudioClient(string model, ApiKeyCredential credential); |
| 1108 | [Experimental("OPENAI001")] |
| 1109 | public AudioClient(string model, AuthenticationPolicy authenticationPolicy, OpenAIClientOptions options); |
| 1110 | [Experimental("OPENAI001")] |
| 1111 | public AudioClient(string model, AuthenticationPolicy authenticationPolicy); |
| 1112 | public AudioClient(string model, string apiKey); |
| 1113 | [Experimental("OPENAI001")] |
| 1114 | public Uri Endpoint { get; } |
| 1115 | [Experimental("OPENAI001")] |
| 1116 | public string Model { get; } |
| 1117 | public ClientPipeline Pipeline { get; } |
| 1118 | public virtual ClientResult GenerateSpeech(BinaryContent content, RequestOptions options = null); |
| 1119 | public virtual ClientResult<BinaryData> GenerateSpeech(string text, GeneratedSpeechVoice voice, SpeechGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 1120 | public virtual Task<ClientResult> GenerateSpeechAsync(BinaryContent content, RequestOptions options = null); |
| 1121 | public virtual Task<ClientResult<BinaryData>> GenerateSpeechAsync(string text, GeneratedSpeechVoice voice, SpeechGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 1122 | public virtual ClientResult TranscribeAudio(BinaryContent content, string contentType, RequestOptions options = null); |
| 1123 | public virtual ClientResult<AudioTranscription> TranscribeAudio(Stream audio, string audioFilename, AudioTranscriptionOptions options = null, CancellationToken cancellationToken = default); |
| 1124 | public virtual ClientResult<AudioTranscription> TranscribeAudio(string audioFilePath, AudioTranscriptionOptions options = null); |
| 1125 | public virtual Task<ClientResult> TranscribeAudioAsync(BinaryContent content, string contentType, RequestOptions options = null); |
| 1126 | public virtual Task<ClientResult<AudioTranscription>> TranscribeAudioAsync(Stream audio, string audioFilename, AudioTranscriptionOptions options = null, CancellationToken cancellationToken = default); |
| 1127 | public virtual Task<ClientResult<AudioTranscription>> TranscribeAudioAsync(string audioFilePath, AudioTranscriptionOptions options = null); |
| 1128 | [Experimental("OPENAI001")] |
| 1129 | public virtual CollectionResult<StreamingAudioTranscriptionUpdate> TranscribeAudioStreaming(Stream audio, string audioFilename, AudioTranscriptionOptions options = null, CancellationToken cancellationToken = default); |
| 1130 | [Experimental("OPENAI001")] |
| 1131 | public virtual CollectionResult<StreamingAudioTranscriptionUpdate> TranscribeAudioStreaming(string audioFilePath, AudioTranscriptionOptions options = null, CancellationToken cancellationToken = default); |
| 1132 | [Experimental("OPENAI001")] |
| 1133 | public virtual AsyncCollectionResult<StreamingAudioTranscriptionUpdate> TranscribeAudioStreamingAsync(Stream audio, string audioFilename, AudioTranscriptionOptions options = null, CancellationToken cancellationToken = default); |
| 1134 | [Experimental("OPENAI001")] |
| 1135 | public virtual AsyncCollectionResult<StreamingAudioTranscriptionUpdate> TranscribeAudioStreamingAsync(string audioFilePath, AudioTranscriptionOptions options = null, CancellationToken cancellationToken = default); |
| 1136 | public virtual ClientResult TranslateAudio(BinaryContent content, string contentType, RequestOptions options = null); |
| 1137 | public virtual ClientResult<AudioTranslation> TranslateAudio(Stream audio, string audioFilename, AudioTranslationOptions options = null, CancellationToken cancellationToken = default); |
| 1138 | public virtual ClientResult<AudioTranslation> TranslateAudio(string audioFilePath, AudioTranslationOptions options = null); |
| 1139 | public virtual Task<ClientResult> TranslateAudioAsync(BinaryContent content, string contentType, RequestOptions options = null); |
| 1140 | public virtual Task<ClientResult<AudioTranslation>> TranslateAudioAsync(Stream audio, string audioFilename, AudioTranslationOptions options = null, CancellationToken cancellationToken = default); |
| 1141 | public virtual Task<ClientResult<AudioTranslation>> TranslateAudioAsync(string audioFilePath, AudioTranslationOptions options = null); |
| 1142 | } |
| 1143 | [Flags] |
| 1144 | public enum AudioTimestampGranularities { |
| 1145 | Default = 0, |
| 1146 | Word = 1, |
| 1147 | Segment = 2 |
| 1148 | } |
| 1149 | [Experimental("OPENAI001")] |
| 1150 | public class AudioTokenLogProbabilityDetails : IJsonModel<AudioTokenLogProbabilityDetails>, IPersistableModel<AudioTokenLogProbabilityDetails> { |
| 1151 | public float LogProbability { get; } |
| 1152 | public string Token { get; } |
| 1153 | public ReadOnlyMemory<byte> Utf8Bytes { get; } |
| 1154 | protected virtual AudioTokenLogProbabilityDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1155 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1156 | protected virtual AudioTokenLogProbabilityDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1157 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1158 | } |
| 1159 | public class AudioTranscription : IJsonModel<AudioTranscription>, IPersistableModel<AudioTranscription> { |
| 1160 | public TimeSpan? Duration { get; } |
| 1161 | public string Language { get; } |
| 1162 | public IReadOnlyList<TranscribedSegment> Segments { get; } |
| 1163 | public string Text { get; } |
| 1164 | [Experimental("OPENAI001")] |
| 1165 | public IReadOnlyList<AudioTokenLogProbabilityDetails> TranscriptionTokenLogProbabilities { get; } |
| 1166 | public IReadOnlyList<TranscribedWord> Words { get; } |
| 1167 | [Experimental("OPENAI001")] |
| 1168 | protected virtual AudioTranscription JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1169 | [Experimental("OPENAI001")] |
| 1170 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1171 | [Experimental("OPENAI001")] |
| 1172 | public static explicit operator AudioTranscription(ClientResult result); |
| 1173 | [Experimental("OPENAI001")] |
| 1174 | protected virtual AudioTranscription PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1175 | [Experimental("OPENAI001")] |
| 1176 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1177 | } |
| 1178 | public readonly partial struct AudioTranscriptionFormat : IEquatable<AudioTranscriptionFormat> { |
| 1179 | public AudioTranscriptionFormat(string value); |
| 1180 | public static AudioTranscriptionFormat Simple { get; } |
| 1181 | public static AudioTranscriptionFormat Srt { get; } |
| 1182 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1183 | public static AudioTranscriptionFormat Text { get; } |
| 1184 | public static AudioTranscriptionFormat Verbose { get; } |
| 1185 | public static AudioTranscriptionFormat Vtt { get; } |
| 1186 | public readonly bool Equals(AudioTranscriptionFormat other); |
| 1187 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1188 | public override readonly bool Equals(object obj); |
| 1189 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1190 | public override readonly int GetHashCode(); |
| 1191 | public static bool operator ==(AudioTranscriptionFormat left, AudioTranscriptionFormat right); |
| 1192 | public static implicit operator AudioTranscriptionFormat(string value); |
| 1193 | public static implicit operator AudioTranscriptionFormat?(string value); |
| 1194 | public static bool operator !=(AudioTranscriptionFormat left, AudioTranscriptionFormat right); |
| 1195 | public override readonly string ToString(); |
| 1196 | } |
| 1197 | [Experimental("OPENAI001")] |
| 1198 | [Flags] |
| 1199 | public enum AudioTranscriptionIncludes { |
| 1200 | Default = 0, |
| 1201 | Logprobs = 1 |
| 1202 | } |
| 1203 | public class AudioTranscriptionOptions : IJsonModel<AudioTranscriptionOptions>, IPersistableModel<AudioTranscriptionOptions> { |
| 1204 | [Experimental("OPENAI001")] |
| 1205 | public AudioTranscriptionIncludes Includes { get; set; } |
| 1206 | public string Language { get; set; } |
| 1207 | public string Prompt { get; set; } |
| 1208 | public AudioTranscriptionFormat? ResponseFormat { get; set; } |
| 1209 | public float? Temperature { get; set; } |
| 1210 | public AudioTimestampGranularities TimestampGranularities { get; set; } |
| 1211 | [Experimental("OPENAI001")] |
| 1212 | protected virtual AudioTranscriptionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1213 | [Experimental("OPENAI001")] |
| 1214 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1215 | [Experimental("OPENAI001")] |
| 1216 | protected virtual AudioTranscriptionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1217 | [Experimental("OPENAI001")] |
| 1218 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1219 | } |
| 1220 | public class AudioTranslation : IJsonModel<AudioTranslation>, IPersistableModel<AudioTranslation> { |
| 1221 | public TimeSpan? Duration { get; } |
| 1222 | public string Language { get; } |
| 1223 | public IReadOnlyList<TranscribedSegment> Segments { get; } |
| 1224 | public string Text { get; } |
| 1225 | [Experimental("OPENAI001")] |
| 1226 | protected virtual AudioTranslation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1227 | [Experimental("OPENAI001")] |
| 1228 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1229 | [Experimental("OPENAI001")] |
| 1230 | public static explicit operator AudioTranslation(ClientResult result); |
| 1231 | [Experimental("OPENAI001")] |
| 1232 | protected virtual AudioTranslation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1233 | [Experimental("OPENAI001")] |
| 1234 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1235 | } |
| 1236 | public readonly partial struct AudioTranslationFormat : IEquatable<AudioTranslationFormat> { |
| 1237 | public AudioTranslationFormat(string value); |
| 1238 | public static AudioTranslationFormat Simple { get; } |
| 1239 | public static AudioTranslationFormat Srt { get; } |
| 1240 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1241 | public static AudioTranslationFormat Text { get; } |
| 1242 | public static AudioTranslationFormat Verbose { get; } |
| 1243 | public static AudioTranslationFormat Vtt { get; } |
| 1244 | public readonly bool Equals(AudioTranslationFormat other); |
| 1245 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1246 | public override readonly bool Equals(object obj); |
| 1247 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1248 | public override readonly int GetHashCode(); |
| 1249 | public static bool operator ==(AudioTranslationFormat left, AudioTranslationFormat right); |
| 1250 | public static implicit operator AudioTranslationFormat(string value); |
| 1251 | public static implicit operator AudioTranslationFormat?(string value); |
| 1252 | public static bool operator !=(AudioTranslationFormat left, AudioTranslationFormat right); |
| 1253 | public override readonly string ToString(); |
| 1254 | } |
| 1255 | public class AudioTranslationOptions : IJsonModel<AudioTranslationOptions>, IPersistableModel<AudioTranslationOptions> { |
| 1256 | public string Prompt { get; set; } |
| 1257 | public AudioTranslationFormat? ResponseFormat { get; set; } |
| 1258 | public float? Temperature { get; set; } |
| 1259 | [Experimental("OPENAI001")] |
| 1260 | protected virtual AudioTranslationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1261 | [Experimental("OPENAI001")] |
| 1262 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1263 | [Experimental("OPENAI001")] |
| 1264 | protected virtual AudioTranslationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1265 | [Experimental("OPENAI001")] |
| 1266 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1267 | } |
| 1268 | public readonly partial struct GeneratedSpeechFormat : IEquatable<GeneratedSpeechFormat> { |
| 1269 | public GeneratedSpeechFormat(string value); |
| 1270 | public static GeneratedSpeechFormat Aac { get; } |
| 1271 | public static GeneratedSpeechFormat Flac { get; } |
| 1272 | public static GeneratedSpeechFormat Mp3 { get; } |
| 1273 | public static GeneratedSpeechFormat Opus { get; } |
| 1274 | public static GeneratedSpeechFormat Pcm { get; } |
| 1275 | public static GeneratedSpeechFormat Wav { get; } |
| 1276 | public readonly bool Equals(GeneratedSpeechFormat other); |
| 1277 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1278 | public override readonly bool Equals(object obj); |
| 1279 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1280 | public override readonly int GetHashCode(); |
| 1281 | public static bool operator ==(GeneratedSpeechFormat left, GeneratedSpeechFormat right); |
| 1282 | public static implicit operator GeneratedSpeechFormat(string value); |
| 1283 | public static implicit operator GeneratedSpeechFormat?(string value); |
| 1284 | public static bool operator !=(GeneratedSpeechFormat left, GeneratedSpeechFormat right); |
| 1285 | public override readonly string ToString(); |
| 1286 | } |
| 1287 | public readonly partial struct GeneratedSpeechVoice : IEquatable<GeneratedSpeechVoice> { |
| 1288 | public GeneratedSpeechVoice(string value); |
| 1289 | public static GeneratedSpeechVoice Alloy { get; } |
| 1290 | [Experimental("OPENAI001")] |
| 1291 | public static GeneratedSpeechVoice Ash { get; } |
| 1292 | [Experimental("OPENAI001")] |
| 1293 | public static GeneratedSpeechVoice Ballad { get; } |
| 1294 | [Experimental("OPENAI001")] |
| 1295 | public static GeneratedSpeechVoice Coral { get; } |
| 1296 | public static GeneratedSpeechVoice Echo { get; } |
| 1297 | public static GeneratedSpeechVoice Fable { get; } |
| 1298 | public static GeneratedSpeechVoice Nova { get; } |
| 1299 | public static GeneratedSpeechVoice Onyx { get; } |
| 1300 | [Experimental("OPENAI001")] |
| 1301 | public static GeneratedSpeechVoice Sage { get; } |
| 1302 | public static GeneratedSpeechVoice Shimmer { get; } |
| 1303 | [Experimental("OPENAI001")] |
| 1304 | public static GeneratedSpeechVoice Verse { get; } |
| 1305 | public readonly bool Equals(GeneratedSpeechVoice other); |
| 1306 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1307 | public override readonly bool Equals(object obj); |
| 1308 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1309 | public override readonly int GetHashCode(); |
| 1310 | public static bool operator ==(GeneratedSpeechVoice left, GeneratedSpeechVoice right); |
| 1311 | public static implicit operator GeneratedSpeechVoice(string value); |
| 1312 | public static implicit operator GeneratedSpeechVoice?(string value); |
| 1313 | public static bool operator !=(GeneratedSpeechVoice left, GeneratedSpeechVoice right); |
| 1314 | public override readonly string ToString(); |
| 1315 | } |
| 1316 | public static class OpenAIAudioModelFactory { |
| 1317 | [Experimental("OPENAI001")] |
| 1318 | public static AudioTranscription AudioTranscription(string language = null, TimeSpan? duration = null, string text = null, IEnumerable<TranscribedWord> words = null, IEnumerable<TranscribedSegment> segments = null, IEnumerable<AudioTokenLogProbabilityDetails> transcriptionTokenLogProbabilities = null); |
| 1319 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1320 | public static AudioTranscription AudioTranscription(string language, TimeSpan? duration, string text, IEnumerable<TranscribedWord> words, IEnumerable<TranscribedSegment> segments); |
| 1321 | public static AudioTranslation AudioTranslation(string language = null, TimeSpan? duration = null, string text = null, IEnumerable<TranscribedSegment> segments = null); |
| 1322 | 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); |
| 1323 | public static TranscribedWord TranscribedWord(string word = null, TimeSpan startTime = default, TimeSpan endTime = default); |
| 1324 | } |
| 1325 | public class SpeechGenerationOptions : IJsonModel<SpeechGenerationOptions>, IPersistableModel<SpeechGenerationOptions> { |
| 1326 | [Experimental("OPENAI001")] |
| 1327 | public string Instructions { get; set; } |
| 1328 | public GeneratedSpeechFormat? ResponseFormat { get; set; } |
| 1329 | public float? SpeedRatio { get; set; } |
| 1330 | [Experimental("OPENAI001")] |
| 1331 | protected virtual SpeechGenerationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1332 | [Experimental("OPENAI001")] |
| 1333 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1334 | [Experimental("OPENAI001")] |
| 1335 | protected virtual SpeechGenerationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1336 | [Experimental("OPENAI001")] |
| 1337 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1338 | } |
| 1339 | [Experimental("OPENAI001")] |
| 1340 | public class StreamingAudioTranscriptionTextDeltaUpdate : StreamingAudioTranscriptionUpdate, IJsonModel<StreamingAudioTranscriptionTextDeltaUpdate>, IPersistableModel<StreamingAudioTranscriptionTextDeltaUpdate> { |
| 1341 | public string Delta { get; } |
| 1342 | public string SegmentId { get; } |
| 1343 | public IReadOnlyList<AudioTokenLogProbabilityDetails> TranscriptionTokenLogProbabilities { get; } |
| 1344 | protected override StreamingAudioTranscriptionUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1345 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1346 | protected override StreamingAudioTranscriptionUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1347 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1348 | } |
| 1349 | [Experimental("OPENAI001")] |
| 1350 | public class StreamingAudioTranscriptionTextDoneUpdate : StreamingAudioTranscriptionUpdate, IJsonModel<StreamingAudioTranscriptionTextDoneUpdate>, IPersistableModel<StreamingAudioTranscriptionTextDoneUpdate> { |
| 1351 | public string Text { get; } |
| 1352 | public IReadOnlyList<AudioTokenLogProbabilityDetails> TranscriptionTokenLogProbabilities { get; } |
| 1353 | protected override StreamingAudioTranscriptionUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1354 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1355 | protected override StreamingAudioTranscriptionUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1356 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1357 | } |
| 1358 | [Experimental("OPENAI001")] |
| 1359 | public class StreamingAudioTranscriptionTextSegmentUpdate : StreamingAudioTranscriptionUpdate, IJsonModel<StreamingAudioTranscriptionTextSegmentUpdate>, IPersistableModel<StreamingAudioTranscriptionTextSegmentUpdate> { |
| 1360 | public TimeSpan EndTime { get; } |
| 1361 | public string SegmentId { get; } |
| 1362 | public string SpeakerLabel { get; } |
| 1363 | public TimeSpan StartTime { get; } |
| 1364 | public string Text { get; } |
| 1365 | protected override StreamingAudioTranscriptionUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1366 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1367 | protected override StreamingAudioTranscriptionUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1368 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1369 | } |
| 1370 | [Experimental("OPENAI001")] |
| 1371 | public class StreamingAudioTranscriptionUpdate : IJsonModel<StreamingAudioTranscriptionUpdate>, IPersistableModel<StreamingAudioTranscriptionUpdate> { |
| 1372 | protected virtual StreamingAudioTranscriptionUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1373 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1374 | protected virtual StreamingAudioTranscriptionUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1375 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1376 | } |
| 1377 | [Experimental("OPENAI001")] |
| 1378 | public readonly partial struct StreamingAudioTranscriptionUpdateKind : IEquatable<StreamingAudioTranscriptionUpdateKind> { |
| 1379 | public StreamingAudioTranscriptionUpdateKind(string value); |
| 1380 | public static StreamingAudioTranscriptionUpdateKind TranscriptTextDelta { get; } |
| 1381 | public static StreamingAudioTranscriptionUpdateKind TranscriptTextDone { get; } |
| 1382 | public static StreamingAudioTranscriptionUpdateKind TranscriptTextSegment { get; } |
| 1383 | public readonly bool Equals(StreamingAudioTranscriptionUpdateKind other); |
| 1384 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1385 | public override readonly bool Equals(object obj); |
| 1386 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1387 | public override readonly int GetHashCode(); |
| 1388 | public static bool operator ==(StreamingAudioTranscriptionUpdateKind left, StreamingAudioTranscriptionUpdateKind right); |
| 1389 | public static implicit operator StreamingAudioTranscriptionUpdateKind(string value); |
| 1390 | public static implicit operator StreamingAudioTranscriptionUpdateKind?(string value); |
| 1391 | public static bool operator !=(StreamingAudioTranscriptionUpdateKind left, StreamingAudioTranscriptionUpdateKind right); |
| 1392 | public override readonly string ToString(); |
| 1393 | } |
| 1394 | public readonly partial struct TranscribedSegment : IJsonModel<TranscribedSegment>, IPersistableModel<TranscribedSegment>, IJsonModel<object>, IPersistableModel<object> { |
| 1395 | public float AverageLogProbability { get; } |
| 1396 | public float CompressionRatio { get; } |
| 1397 | public TimeSpan EndTime { get; } |
| 1398 | public int Id { get; } |
| 1399 | public float NoSpeechProbability { get; } |
| 1400 | public int SeekOffset { get; } |
| 1401 | public TimeSpan StartTime { get; } |
| 1402 | public float Temperature { get; } |
| 1403 | public string Text { get; } |
| 1404 | public ReadOnlyMemory<int> TokenIds { get; } |
| 1405 | } |
| 1406 | public readonly partial struct TranscribedWord : IJsonModel<TranscribedWord>, IPersistableModel<TranscribedWord>, IJsonModel<object>, IPersistableModel<object> { |
| 1407 | public TimeSpan EndTime { get; } |
| 1408 | public TimeSpan StartTime { get; } |
| 1409 | public string Word { get; } |
| 1410 | } |
| 1411 | } |
| 1412 | namespace OpenAI.Batch { |
| 1413 | [Experimental("OPENAI001")] |
| 1414 | public class BatchClient { |
| 1415 | protected BatchClient(); |
| 1416 | public BatchClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 1417 | public BatchClient(ApiKeyCredential credential); |
| 1418 | public BatchClient(AuthenticationPolicy authenticationPolicy, OpenAIClientOptions options); |
| 1419 | public BatchClient(AuthenticationPolicy authenticationPolicy); |
| 1420 | protected internal BatchClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 1421 | public BatchClient(string apiKey); |
| 1422 | [Experimental("OPENAI001")] |
| 1423 | public Uri Endpoint { get; } |
| 1424 | public ClientPipeline Pipeline { get; } |
| 1425 | public virtual CreateBatchOperation CreateBatch(BinaryContent content, bool waitUntilCompleted, RequestOptions options = null); |
| 1426 | public virtual Task<CreateBatchOperation> CreateBatchAsync(BinaryContent content, bool waitUntilCompleted, RequestOptions options = null); |
| 1427 | public virtual ClientResult GetBatch(string batchId, RequestOptions options); |
| 1428 | public virtual Task<ClientResult> GetBatchAsync(string batchId, RequestOptions options); |
| 1429 | public virtual CollectionResult<BatchJob> GetBatches(BatchCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 1430 | public virtual CollectionResult GetBatches(string after, int? limit, RequestOptions options); |
| 1431 | public virtual AsyncCollectionResult<BatchJob> GetBatchesAsync(BatchCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 1432 | public virtual AsyncCollectionResult GetBatchesAsync(string after, int? limit, RequestOptions options); |
| 1433 | } |
| 1434 | [Experimental("OPENAI001")] |
| 1435 | public class BatchCollectionOptions : IJsonModel<BatchCollectionOptions>, IPersistableModel<BatchCollectionOptions> { |
| 1436 | public string AfterId { get; set; } |
| 1437 | public int? PageSizeLimit { get; set; } |
| 1438 | protected virtual BatchCollectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1439 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1440 | protected virtual BatchCollectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1441 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1442 | } |
| 1443 | [Experimental("OPENAI001")] |
| 1444 | public class BatchJob : IJsonModel<BatchJob>, IPersistableModel<BatchJob> { |
| 1445 | public DateTimeOffset? CancelledAt { get; } |
| 1446 | public DateTimeOffset? CancellingAt { get; } |
| 1447 | public DateTimeOffset? CompletedAt { get; } |
| 1448 | public string CompletionWindow { get; } |
| 1449 | public DateTimeOffset CreatedAt { get; } |
| 1450 | public string Endpoint { get; } |
| 1451 | public string ErrorFileId { get; } |
| 1452 | public DateTimeOffset? ExpiredAt { get; } |
| 1453 | public DateTimeOffset? ExpiresAt { get; } |
| 1454 | public DateTimeOffset? FailedAt { get; } |
| 1455 | public DateTimeOffset? FinalizingAt { get; } |
| 1456 | public string Id { get; } |
| 1457 | public DateTimeOffset? InProgressAt { get; } |
| 1458 | public string InputFileId { get; } |
| 1459 | public IDictionary<string, string> Metadata { get; } |
| 1460 | public string Object { get; } |
| 1461 | public string OutputFileId { get; } |
| 1462 | protected virtual BatchJob JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1463 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1464 | public static explicit operator BatchJob(ClientResult result); |
| 1465 | protected virtual BatchJob PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1466 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1467 | } |
| 1468 | [Experimental("OPENAI001")] |
| 1469 | public class CreateBatchOperation : OperationResult { |
| 1470 | public string BatchId { get; } |
| 1471 | public override ContinuationToken? RehydrationToken { get; protected set; } |
| 1472 | public virtual ClientResult Cancel(RequestOptions? options); |
| 1473 | public virtual Task<ClientResult> CancelAsync(RequestOptions? options); |
| 1474 | public virtual ClientResult GetBatch(RequestOptions? options); |
| 1475 | public virtual Task<ClientResult> GetBatchAsync(RequestOptions? options); |
| 1476 | public static CreateBatchOperation Rehydrate(BatchClient client, ContinuationToken rehydrationToken, CancellationToken cancellationToken = default); |
| 1477 | public static CreateBatchOperation Rehydrate(BatchClient client, string batchId, CancellationToken cancellationToken = default); |
| 1478 | public static Task<CreateBatchOperation> RehydrateAsync(BatchClient client, ContinuationToken rehydrationToken, CancellationToken cancellationToken = default); |
| 1479 | public static Task<CreateBatchOperation> RehydrateAsync(BatchClient client, string batchId, CancellationToken cancellationToken = default); |
| 1480 | public override ClientResult UpdateStatus(RequestOptions? options = null); |
| 1481 | public override ValueTask<ClientResult> UpdateStatusAsync(RequestOptions? options = null); |
| 1482 | } |
| 1483 | } |
| 1484 | namespace OpenAI.Chat { |
| 1485 | public class AssistantChatMessage : ChatMessage, IJsonModel<AssistantChatMessage>, IPersistableModel<AssistantChatMessage> { |
| 1486 | public AssistantChatMessage(ChatCompletion chatCompletion); |
| 1487 | [Obsolete("This constructor is obsolete. Please use the constructor that takes an IEnumerable<ChatToolCall> parameter instead.")] |
| 1488 | public AssistantChatMessage(ChatFunctionCall functionCall); |
| 1489 | public AssistantChatMessage(params ChatMessageContentPart[] contentParts); |
| 1490 | [Experimental("OPENAI001")] |
| 1491 | public AssistantChatMessage(ChatOutputAudioReference outputAudioReference); |
| 1492 | public AssistantChatMessage(IEnumerable<ChatMessageContentPart> contentParts); |
| 1493 | public AssistantChatMessage(IEnumerable<ChatToolCall> toolCalls); |
| 1494 | public AssistantChatMessage(string content); |
| 1495 | [Obsolete("This property is obsolete. Please use ToolCalls instead.")] |
| 1496 | public ChatFunctionCall FunctionCall { get; set; } |
| 1497 | [Experimental("OPENAI001")] |
| 1498 | public ChatOutputAudioReference OutputAudioReference { get; set; } |
| 1499 | public string ParticipantName { get; set; } |
| 1500 | public string Refusal { get; set; } |
| 1501 | public IList<ChatToolCall> ToolCalls { get; } |
| 1502 | [Experimental("OPENAI001")] |
| 1503 | protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1504 | [Experimental("OPENAI001")] |
| 1505 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1506 | [Experimental("OPENAI001")] |
| 1507 | protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1508 | [Experimental("OPENAI001")] |
| 1509 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1510 | } |
| 1511 | [Experimental("OPENAI001")] |
| 1512 | public class ChatAudioOptions : IJsonModel<ChatAudioOptions>, IPersistableModel<ChatAudioOptions> { |
| 1513 | public ChatAudioOptions(ChatOutputAudioVoice outputAudioVoice, ChatOutputAudioFormat outputAudioFormat); |
| 1514 | public ChatOutputAudioFormat OutputAudioFormat { get; } |
| 1515 | public ChatOutputAudioVoice OutputAudioVoice { get; } |
| 1516 | [Serialization.JsonIgnore] |
| 1517 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1518 | [Experimental("SCME0001")] |
| 1519 | public ref JsonPatch Patch { get; } |
| 1520 | protected virtual ChatAudioOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1521 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1522 | protected virtual ChatAudioOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1523 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1524 | } |
| 1525 | public class ChatClient { |
| 1526 | protected ChatClient(); |
| 1527 | protected internal ChatClient(ClientPipeline pipeline, string model, OpenAIClientOptions options); |
| 1528 | public ChatClient(string model, ApiKeyCredential credential, OpenAIClientOptions options); |
| 1529 | public ChatClient(string model, ApiKeyCredential credential); |
| 1530 | [Experimental("OPENAI001")] |
| 1531 | public ChatClient(string model, AuthenticationPolicy authenticationPolicy, OpenAIClientOptions options); |
| 1532 | [Experimental("OPENAI001")] |
| 1533 | public ChatClient(string model, AuthenticationPolicy authenticationPolicy); |
| 1534 | public ChatClient(string model, string apiKey); |
| 1535 | [Experimental("OPENAI001")] |
| 1536 | public Uri Endpoint { get; } |
| 1537 | [Experimental("OPENAI001")] |
| 1538 | public string Model { get; } |
| 1539 | public ClientPipeline Pipeline { get; } |
| 1540 | public virtual ClientResult<ChatCompletion> CompleteChat(params ChatMessage[] messages); |
| 1541 | public virtual ClientResult CompleteChat(BinaryContent content, RequestOptions options = null); |
| 1542 | public virtual ClientResult<ChatCompletion> CompleteChat(IEnumerable<ChatMessage> messages, ChatCompletionOptions options = null, CancellationToken cancellationToken = default); |
| 1543 | public virtual Task<ClientResult<ChatCompletion>> CompleteChatAsync(params ChatMessage[] messages); |
| 1544 | public virtual Task<ClientResult> CompleteChatAsync(BinaryContent content, RequestOptions options = null); |
| 1545 | public virtual Task<ClientResult<ChatCompletion>> CompleteChatAsync(IEnumerable<ChatMessage> messages, ChatCompletionOptions options = null, CancellationToken cancellationToken = default); |
| 1546 | public virtual CollectionResult<StreamingChatCompletionUpdate> CompleteChatStreaming(params ChatMessage[] messages); |
| 1547 | public virtual CollectionResult<StreamingChatCompletionUpdate> CompleteChatStreaming(IEnumerable<ChatMessage> messages, ChatCompletionOptions options = null, CancellationToken cancellationToken = default); |
| 1548 | public virtual AsyncCollectionResult<StreamingChatCompletionUpdate> CompleteChatStreamingAsync(params ChatMessage[] messages); |
| 1549 | public virtual AsyncCollectionResult<StreamingChatCompletionUpdate> CompleteChatStreamingAsync(IEnumerable<ChatMessage> messages, ChatCompletionOptions options = null, CancellationToken cancellationToken = default); |
| 1550 | [Experimental("OPENAI001")] |
| 1551 | public virtual ClientResult DeleteChatCompletion(string completionId, RequestOptions options); |
| 1552 | [Experimental("OPENAI001")] |
| 1553 | public virtual ClientResult<ChatCompletionDeletionResult> DeleteChatCompletion(string completionId, CancellationToken cancellationToken = default); |
| 1554 | [Experimental("OPENAI001")] |
| 1555 | public virtual Task<ClientResult> DeleteChatCompletionAsync(string completionId, RequestOptions options); |
| 1556 | [Experimental("OPENAI001")] |
| 1557 | public virtual Task<ClientResult<ChatCompletionDeletionResult>> DeleteChatCompletionAsync(string completionId, CancellationToken cancellationToken = default); |
| 1558 | [Experimental("OPENAI001")] |
| 1559 | public virtual ClientResult GetChatCompletion(string completionId, RequestOptions options); |
| 1560 | [Experimental("OPENAI001")] |
| 1561 | public virtual ClientResult<ChatCompletion> GetChatCompletion(string completionId, CancellationToken cancellationToken = default); |
| 1562 | [Experimental("OPENAI001")] |
| 1563 | public virtual Task<ClientResult> GetChatCompletionAsync(string completionId, RequestOptions options); |
| 1564 | [Experimental("OPENAI001")] |
| 1565 | public virtual Task<ClientResult<ChatCompletion>> GetChatCompletionAsync(string completionId, CancellationToken cancellationToken = default); |
| 1566 | [Experimental("OPENAI001")] |
| 1567 | public virtual CollectionResult<ChatCompletionMessageListDatum> GetChatCompletionMessages(string completionId, ChatCompletionMessageCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 1568 | [Experimental("OPENAI001")] |
| 1569 | public virtual CollectionResult GetChatCompletionMessages(string completionId, string after, int? limit, string order, RequestOptions options); |
| 1570 | [Experimental("OPENAI001")] |
| 1571 | public virtual AsyncCollectionResult<ChatCompletionMessageListDatum> GetChatCompletionMessagesAsync(string completionId, ChatCompletionMessageCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 1572 | [Experimental("OPENAI001")] |
| 1573 | public virtual AsyncCollectionResult GetChatCompletionMessagesAsync(string completionId, string after, int? limit, string order, RequestOptions options); |
| 1574 | [Experimental("OPENAI001")] |
| 1575 | public virtual CollectionResult<ChatCompletion> GetChatCompletions(ChatCompletionCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 1576 | [Experimental("OPENAI001")] |
| 1577 | public virtual CollectionResult GetChatCompletions(string after, int? limit, string order, IDictionary<string, string> metadata, string model, RequestOptions options); |
| 1578 | [Experimental("OPENAI001")] |
| 1579 | public virtual AsyncCollectionResult<ChatCompletion> GetChatCompletionsAsync(ChatCompletionCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 1580 | [Experimental("OPENAI001")] |
| 1581 | public virtual AsyncCollectionResult GetChatCompletionsAsync(string after, int? limit, string order, IDictionary<string, string> metadata, string model, RequestOptions options); |
| 1582 | [Experimental("OPENAI001")] |
| 1583 | public virtual ClientResult UpdateChatCompletion(string completionId, BinaryContent content, RequestOptions options = null); |
| 1584 | [Experimental("OPENAI001")] |
| 1585 | public virtual ClientResult<ChatCompletion> UpdateChatCompletion(string completionId, IDictionary<string, string> metadata, CancellationToken cancellationToken = default); |
| 1586 | [Experimental("OPENAI001")] |
| 1587 | public virtual Task<ClientResult> UpdateChatCompletionAsync(string completionId, BinaryContent content, RequestOptions options = null); |
| 1588 | [Experimental("OPENAI001")] |
| 1589 | public virtual Task<ClientResult<ChatCompletion>> UpdateChatCompletionAsync(string completionId, IDictionary<string, string> metadata, CancellationToken cancellationToken = default); |
| 1590 | } |
| 1591 | public class ChatCompletion : IJsonModel<ChatCompletion>, IPersistableModel<ChatCompletion> { |
| 1592 | [Experimental("OPENAI001")] |
| 1593 | public IReadOnlyList<ChatMessageAnnotation> Annotations { get; } |
| 1594 | public ChatMessageContent Content { get; } |
| 1595 | public IReadOnlyList<ChatTokenLogProbabilityDetails> ContentTokenLogProbabilities { get; } |
| 1596 | public DateTimeOffset CreatedAt { get; } |
| 1597 | public ChatFinishReason FinishReason { get; } |
| 1598 | [Obsolete("This property is obsolete. Please use ToolCalls instead.")] |
| 1599 | public ChatFunctionCall FunctionCall { get; } |
| 1600 | public string Id { get; } |
| 1601 | public string Model { get; } |
| 1602 | [Experimental("OPENAI001")] |
| 1603 | public ChatOutputAudio OutputAudio { get; } |
| 1604 | [Serialization.JsonIgnore] |
| 1605 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1606 | [Experimental("SCME0001")] |
| 1607 | public ref JsonPatch Patch { get; } |
| 1608 | public string Refusal { get; } |
| 1609 | public IReadOnlyList<ChatTokenLogProbabilityDetails> RefusalTokenLogProbabilities { get; } |
| 1610 | public ChatMessageRole Role { get; } |
| 1611 | [Experimental("OPENAI001")] |
| 1612 | public ChatServiceTier? ServiceTier { get; } |
| 1613 | public string SystemFingerprint { get; } |
| 1614 | public IReadOnlyList<ChatToolCall> ToolCalls { get; } |
| 1615 | public ChatTokenUsage Usage { get; } |
| 1616 | [Experimental("OPENAI001")] |
| 1617 | protected virtual ChatCompletion JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1618 | [Experimental("OPENAI001")] |
| 1619 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1620 | [Experimental("OPENAI001")] |
| 1621 | public static explicit operator ChatCompletion(ClientResult result); |
| 1622 | [Experimental("OPENAI001")] |
| 1623 | protected virtual ChatCompletion PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1624 | [Experimental("OPENAI001")] |
| 1625 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1626 | } |
| 1627 | [Experimental("OPENAI001")] |
| 1628 | public class ChatCompletionCollectionOptions : IJsonModel<ChatCompletionCollectionOptions>, IPersistableModel<ChatCompletionCollectionOptions> { |
| 1629 | public string AfterId { get; set; } |
| 1630 | public IDictionary<string, string> Metadata { get; } |
| 1631 | public string Model { get; set; } |
| 1632 | public ChatCompletionCollectionOrder? Order { get; set; } |
| 1633 | public int? PageSizeLimit { get; set; } |
| 1634 | [Serialization.JsonIgnore] |
| 1635 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1636 | [Experimental("SCME0001")] |
| 1637 | public ref JsonPatch Patch { get; } |
| 1638 | protected virtual ChatCompletionCollectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1639 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1640 | protected virtual ChatCompletionCollectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1641 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1642 | } |
| 1643 | [Experimental("OPENAI001")] |
| 1644 | public readonly partial struct ChatCompletionCollectionOrder : IEquatable<ChatCompletionCollectionOrder> { |
| 1645 | public ChatCompletionCollectionOrder(string value); |
| 1646 | public static ChatCompletionCollectionOrder Ascending { get; } |
| 1647 | public static ChatCompletionCollectionOrder Descending { get; } |
| 1648 | public readonly bool Equals(ChatCompletionCollectionOrder other); |
| 1649 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1650 | public override readonly bool Equals(object obj); |
| 1651 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1652 | public override readonly int GetHashCode(); |
| 1653 | public static bool operator ==(ChatCompletionCollectionOrder left, ChatCompletionCollectionOrder right); |
| 1654 | public static implicit operator ChatCompletionCollectionOrder(string value); |
| 1655 | public static implicit operator ChatCompletionCollectionOrder?(string value); |
| 1656 | public static bool operator !=(ChatCompletionCollectionOrder left, ChatCompletionCollectionOrder right); |
| 1657 | public override readonly string ToString(); |
| 1658 | } |
| 1659 | [Experimental("OPENAI001")] |
| 1660 | public class ChatCompletionDeletionResult : IJsonModel<ChatCompletionDeletionResult>, IPersistableModel<ChatCompletionDeletionResult> { |
| 1661 | public string ChatCompletionId { get; } |
| 1662 | public bool Deleted { get; } |
| 1663 | [Serialization.JsonIgnore] |
| 1664 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1665 | [Experimental("SCME0001")] |
| 1666 | public ref JsonPatch Patch { get; } |
| 1667 | protected virtual ChatCompletionDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1668 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1669 | public static explicit operator ChatCompletionDeletionResult(ClientResult result); |
| 1670 | protected virtual ChatCompletionDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1671 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1672 | } |
| 1673 | [Experimental("OPENAI001")] |
| 1674 | public class ChatCompletionMessageCollectionOptions : IJsonModel<ChatCompletionMessageCollectionOptions>, IPersistableModel<ChatCompletionMessageCollectionOptions> { |
| 1675 | public string AfterId { get; set; } |
| 1676 | public ChatCompletionMessageCollectionOrder? Order { get; set; } |
| 1677 | public int? PageSizeLimit { get; set; } |
| 1678 | [Serialization.JsonIgnore] |
| 1679 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1680 | [Experimental("SCME0001")] |
| 1681 | public ref JsonPatch Patch { get; } |
| 1682 | protected virtual ChatCompletionMessageCollectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1683 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1684 | protected virtual ChatCompletionMessageCollectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1685 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1686 | } |
| 1687 | [Experimental("OPENAI001")] |
| 1688 | public readonly partial struct ChatCompletionMessageCollectionOrder : IEquatable<ChatCompletionMessageCollectionOrder> { |
| 1689 | public ChatCompletionMessageCollectionOrder(string value); |
| 1690 | public static ChatCompletionMessageCollectionOrder Ascending { get; } |
| 1691 | public static ChatCompletionMessageCollectionOrder Descending { get; } |
| 1692 | public readonly bool Equals(ChatCompletionMessageCollectionOrder other); |
| 1693 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1694 | public override readonly bool Equals(object obj); |
| 1695 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1696 | public override readonly int GetHashCode(); |
| 1697 | public static bool operator ==(ChatCompletionMessageCollectionOrder left, ChatCompletionMessageCollectionOrder right); |
| 1698 | public static implicit operator ChatCompletionMessageCollectionOrder(string value); |
| 1699 | public static implicit operator ChatCompletionMessageCollectionOrder?(string value); |
| 1700 | public static bool operator !=(ChatCompletionMessageCollectionOrder left, ChatCompletionMessageCollectionOrder right); |
| 1701 | public override readonly string ToString(); |
| 1702 | } |
| 1703 | [Experimental("OPENAI001")] |
| 1704 | public class ChatCompletionMessageListDatum : IJsonModel<ChatCompletionMessageListDatum>, IPersistableModel<ChatCompletionMessageListDatum> { |
| 1705 | public IReadOnlyList<ChatMessageAnnotation> Annotations { get; } |
| 1706 | public string Content { get; } |
| 1707 | public IList<ChatMessageContentPart> ContentParts { get; } |
| 1708 | public string Id { get; } |
| 1709 | public ChatOutputAudio OutputAudio { get; } |
| 1710 | [Serialization.JsonIgnore] |
| 1711 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1712 | [Experimental("SCME0001")] |
| 1713 | public ref JsonPatch Patch { get; } |
| 1714 | public string Refusal { get; } |
| 1715 | public IReadOnlyList<ChatToolCall> ToolCalls { get; } |
| 1716 | protected virtual ChatCompletionMessageListDatum JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1717 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1718 | protected virtual ChatCompletionMessageListDatum PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1719 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1720 | } |
| 1721 | public class ChatCompletionOptions : IJsonModel<ChatCompletionOptions>, IPersistableModel<ChatCompletionOptions> { |
| 1722 | public bool? AllowParallelToolCalls { get; set; } |
| 1723 | [Experimental("OPENAI001")] |
| 1724 | public ChatAudioOptions AudioOptions { get; set; } |
| 1725 | public string EndUserId { get; set; } |
| 1726 | public float? FrequencyPenalty { get; set; } |
| 1727 | [Obsolete("This property is obsolete. Please use ToolChoice instead.")] |
| 1728 | public ChatFunctionChoice FunctionChoice { get; set; } |
| 1729 | [Obsolete("This property is obsolete. Please use Tools instead.")] |
| 1730 | public IList<ChatFunction> Functions { get; } |
| 1731 | public bool? IncludeLogProbabilities { get; set; } |
| 1732 | public IDictionary<int, int> LogitBiases { get; } |
| 1733 | public int? MaxOutputTokenCount { get; set; } |
| 1734 | public IDictionary<string, string> Metadata { get; } |
| 1735 | [Experimental("OPENAI001")] |
| 1736 | public ChatOutputPrediction OutputPrediction { get; set; } |
| 1737 | [Serialization.JsonIgnore] |
| 1738 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1739 | [Experimental("SCME0001")] |
| 1740 | public ref JsonPatch Patch { get; } |
| 1741 | public float? PresencePenalty { get; set; } |
| 1742 | [Experimental("OPENAI001")] |
| 1743 | public ChatReasoningEffortLevel? ReasoningEffortLevel { get; set; } |
| 1744 | public ChatResponseFormat ResponseFormat { get; set; } |
| 1745 | [Experimental("OPENAI001")] |
| 1746 | public ChatResponseModalities ResponseModalities { get; set; } |
| 1747 | [Experimental("OPENAI001")] |
| 1748 | public string SafetyIdentifier { get; set; } |
| 1749 | [Experimental("OPENAI001")] |
| 1750 | public long? Seed { get; set; } |
| 1751 | [Experimental("OPENAI001")] |
| 1752 | public ChatServiceTier? ServiceTier { get; set; } |
| 1753 | public IList<string> StopSequences { get; } |
| 1754 | public bool? StoredOutputEnabled { get; set; } |
| 1755 | public float? Temperature { get; set; } |
| 1756 | public ChatToolChoice ToolChoice { get; set; } |
| 1757 | public IList<ChatTool> Tools { get; } |
| 1758 | public int? TopLogProbabilityCount { get; set; } |
| 1759 | public float? TopP { get; set; } |
| 1760 | [Experimental("OPENAI001")] |
| 1761 | public ChatWebSearchOptions WebSearchOptions { get; set; } |
| 1762 | [Experimental("OPENAI001")] |
| 1763 | protected virtual ChatCompletionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1764 | [Experimental("OPENAI001")] |
| 1765 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1766 | [Experimental("OPENAI001")] |
| 1767 | protected virtual ChatCompletionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1768 | [Experimental("OPENAI001")] |
| 1769 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1770 | } |
| 1771 | public enum ChatFinishReason { |
| 1772 | Stop = 0, |
| 1773 | Length = 1, |
| 1774 | ContentFilter = 2, |
| 1775 | ToolCalls = 3, |
| 1776 | FunctionCall = 4 |
| 1777 | } |
| 1778 | [Obsolete("This class is obsolete. Please use ChatTool instead.")] |
| 1779 | public class ChatFunction : IJsonModel<ChatFunction>, IPersistableModel<ChatFunction> { |
| 1780 | public ChatFunction(string functionName); |
| 1781 | public string FunctionDescription { get; set; } |
| 1782 | public string FunctionName { get; } |
| 1783 | public BinaryData FunctionParameters { get; set; } |
| 1784 | [Serialization.JsonIgnore] |
| 1785 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1786 | [Experimental("SCME0001")] |
| 1787 | public ref JsonPatch Patch { get; } |
| 1788 | [Experimental("OPENAI001")] |
| 1789 | protected virtual ChatFunction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1790 | [Experimental("OPENAI001")] |
| 1791 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1792 | [Experimental("OPENAI001")] |
| 1793 | protected virtual ChatFunction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1794 | [Experimental("OPENAI001")] |
| 1795 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1796 | } |
| 1797 | [Obsolete("This class is obsolete. Please use ChatToolCall instead.")] |
| 1798 | public class ChatFunctionCall : IJsonModel<ChatFunctionCall>, IPersistableModel<ChatFunctionCall> { |
| 1799 | public ChatFunctionCall(string functionName, BinaryData functionArguments); |
| 1800 | public BinaryData FunctionArguments { get; } |
| 1801 | public string FunctionName { get; } |
| 1802 | [Serialization.JsonIgnore] |
| 1803 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1804 | [Experimental("SCME0001")] |
| 1805 | public ref JsonPatch Patch { get; } |
| 1806 | [Experimental("OPENAI001")] |
| 1807 | protected virtual ChatFunctionCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1808 | [Experimental("OPENAI001")] |
| 1809 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1810 | [Experimental("OPENAI001")] |
| 1811 | protected virtual ChatFunctionCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1812 | [Experimental("OPENAI001")] |
| 1813 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1814 | } |
| 1815 | [Obsolete("This class is obsolete. Please use ChatToolChoice instead.")] |
| 1816 | public class ChatFunctionChoice : IJsonModel<ChatFunctionChoice>, IPersistableModel<ChatFunctionChoice> { |
| 1817 | [Serialization.JsonIgnore] |
| 1818 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1819 | [Experimental("SCME0001")] |
| 1820 | public ref JsonPatch Patch { get; } |
| 1821 | public static ChatFunctionChoice CreateAutoChoice(); |
| 1822 | public static ChatFunctionChoice CreateNamedChoice(string functionName); |
| 1823 | public static ChatFunctionChoice CreateNoneChoice(); |
| 1824 | [Experimental("OPENAI001")] |
| 1825 | protected virtual ChatFunctionChoice JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1826 | [Experimental("OPENAI001")] |
| 1827 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1828 | [Experimental("OPENAI001")] |
| 1829 | protected virtual ChatFunctionChoice PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1830 | [Experimental("OPENAI001")] |
| 1831 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1832 | } |
| 1833 | public readonly partial struct ChatImageDetailLevel : IEquatable<ChatImageDetailLevel> { |
| 1834 | public ChatImageDetailLevel(string value); |
| 1835 | public static ChatImageDetailLevel Auto { get; } |
| 1836 | public static ChatImageDetailLevel High { get; } |
| 1837 | public static ChatImageDetailLevel Low { get; } |
| 1838 | public readonly bool Equals(ChatImageDetailLevel other); |
| 1839 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1840 | public override readonly bool Equals(object obj); |
| 1841 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1842 | public override readonly int GetHashCode(); |
| 1843 | public static bool operator ==(ChatImageDetailLevel left, ChatImageDetailLevel right); |
| 1844 | public static implicit operator ChatImageDetailLevel(string value); |
| 1845 | public static implicit operator ChatImageDetailLevel?(string value); |
| 1846 | public static bool operator !=(ChatImageDetailLevel left, ChatImageDetailLevel right); |
| 1847 | public override readonly string ToString(); |
| 1848 | } |
| 1849 | [Experimental("OPENAI001")] |
| 1850 | public readonly partial struct ChatInputAudioFormat : IEquatable<ChatInputAudioFormat> { |
| 1851 | public ChatInputAudioFormat(string value); |
| 1852 | public static ChatInputAudioFormat Mp3 { get; } |
| 1853 | public static ChatInputAudioFormat Wav { get; } |
| 1854 | public readonly bool Equals(ChatInputAudioFormat other); |
| 1855 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1856 | public override readonly bool Equals(object obj); |
| 1857 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1858 | public override readonly int GetHashCode(); |
| 1859 | public static bool operator ==(ChatInputAudioFormat left, ChatInputAudioFormat right); |
| 1860 | public static implicit operator ChatInputAudioFormat(string value); |
| 1861 | public static implicit operator ChatInputAudioFormat?(string value); |
| 1862 | public static bool operator !=(ChatInputAudioFormat left, ChatInputAudioFormat right); |
| 1863 | public override readonly string ToString(); |
| 1864 | } |
| 1865 | public class ChatInputTokenUsageDetails : IJsonModel<ChatInputTokenUsageDetails>, IPersistableModel<ChatInputTokenUsageDetails> { |
| 1866 | public int AudioTokenCount { get; } |
| 1867 | public int CachedTokenCount { get; } |
| 1868 | [Serialization.JsonIgnore] |
| 1869 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1870 | [Experimental("SCME0001")] |
| 1871 | public ref JsonPatch Patch { get; } |
| 1872 | [Experimental("OPENAI001")] |
| 1873 | protected virtual ChatInputTokenUsageDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1874 | [Experimental("OPENAI001")] |
| 1875 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1876 | [Experimental("OPENAI001")] |
| 1877 | protected virtual ChatInputTokenUsageDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1878 | [Experimental("OPENAI001")] |
| 1879 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1880 | } |
| 1881 | public class ChatMessage : IJsonModel<ChatMessage>, IPersistableModel<ChatMessage> { |
| 1882 | public ChatMessageContent Content { get; } |
| 1883 | [Serialization.JsonIgnore] |
| 1884 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1885 | [Experimental("SCME0001")] |
| 1886 | public ref JsonPatch Patch { get; } |
| 1887 | public static AssistantChatMessage CreateAssistantMessage(ChatCompletion chatCompletion); |
| 1888 | public static AssistantChatMessage CreateAssistantMessage(ChatFunctionCall functionCall); |
| 1889 | public static AssistantChatMessage CreateAssistantMessage(params ChatMessageContentPart[] contentParts); |
| 1890 | [Experimental("OPENAI001")] |
| 1891 | public static AssistantChatMessage CreateAssistantMessage(ChatOutputAudioReference outputAudioReference); |
| 1892 | public static AssistantChatMessage CreateAssistantMessage(IEnumerable<ChatMessageContentPart> contentParts); |
| 1893 | public static AssistantChatMessage CreateAssistantMessage(IEnumerable<ChatToolCall> toolCalls); |
| 1894 | public static AssistantChatMessage CreateAssistantMessage(string content); |
| 1895 | [Experimental("OPENAI001")] |
| 1896 | public static DeveloperChatMessage CreateDeveloperMessage(params ChatMessageContentPart[] contentParts); |
| 1897 | [Experimental("OPENAI001")] |
| 1898 | public static DeveloperChatMessage CreateDeveloperMessage(IEnumerable<ChatMessageContentPart> contentParts); |
| 1899 | [Experimental("OPENAI001")] |
| 1900 | public static DeveloperChatMessage CreateDeveloperMessage(string content); |
| 1901 | [Obsolete("This method is obsolete. Please use CreateToolMessage instead.")] |
| 1902 | public static FunctionChatMessage CreateFunctionMessage(string functionName, string content); |
| 1903 | public static SystemChatMessage CreateSystemMessage(params ChatMessageContentPart[] contentParts); |
| 1904 | public static SystemChatMessage CreateSystemMessage(IEnumerable<ChatMessageContentPart> contentParts); |
| 1905 | public static SystemChatMessage CreateSystemMessage(string content); |
| 1906 | public static ToolChatMessage CreateToolMessage(string toolCallId, params ChatMessageContentPart[] contentParts); |
| 1907 | public static ToolChatMessage CreateToolMessage(string toolCallId, IEnumerable<ChatMessageContentPart> contentParts); |
| 1908 | public static ToolChatMessage CreateToolMessage(string toolCallId, string content); |
| 1909 | public static UserChatMessage CreateUserMessage(params ChatMessageContentPart[] contentParts); |
| 1910 | public static UserChatMessage CreateUserMessage(IEnumerable<ChatMessageContentPart> contentParts); |
| 1911 | public static UserChatMessage CreateUserMessage(string content); |
| 1912 | [Experimental("OPENAI001")] |
| 1913 | protected virtual ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1914 | [Experimental("OPENAI001")] |
| 1915 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1916 | public static implicit operator ChatMessage(string content); |
| 1917 | [Experimental("OPENAI001")] |
| 1918 | protected virtual ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1919 | [Experimental("OPENAI001")] |
| 1920 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1921 | } |
| 1922 | [Experimental("OPENAI001")] |
| 1923 | public class ChatMessageAnnotation : IJsonModel<ChatMessageAnnotation>, IPersistableModel<ChatMessageAnnotation> { |
| 1924 | public int EndIndex { get; } |
| 1925 | [Serialization.JsonIgnore] |
| 1926 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1927 | [Experimental("SCME0001")] |
| 1928 | public ref JsonPatch Patch { get; } |
| 1929 | public int StartIndex { get; } |
| 1930 | public string WebResourceTitle { get; } |
| 1931 | public Uri WebResourceUri { get; } |
| 1932 | protected virtual ChatMessageAnnotation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1933 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1934 | protected virtual ChatMessageAnnotation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1935 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1936 | } |
| 1937 | public class ChatMessageContent : ObjectModel.Collection<ChatMessageContentPart> { |
| 1938 | public ChatMessageContent(); |
| 1939 | public ChatMessageContent(params ChatMessageContentPart[] contentParts); |
| 1940 | public ChatMessageContent(IEnumerable<ChatMessageContentPart> contentParts); |
| 1941 | public ChatMessageContent(string content); |
| 1942 | } |
| 1943 | public class ChatMessageContentPart : IJsonModel<ChatMessageContentPart>, IPersistableModel<ChatMessageContentPart> { |
| 1944 | [Experimental("OPENAI001")] |
| 1945 | public BinaryData FileBytes { get; } |
| 1946 | [Experimental("OPENAI001")] |
| 1947 | public string FileBytesMediaType { get; } |
| 1948 | [Experimental("OPENAI001")] |
| 1949 | public string FileId { get; } |
| 1950 | [Experimental("OPENAI001")] |
| 1951 | public string Filename { get; } |
| 1952 | public BinaryData ImageBytes { get; } |
| 1953 | public string ImageBytesMediaType { get; } |
| 1954 | public ChatImageDetailLevel? ImageDetailLevel { get; } |
| 1955 | public Uri ImageUri { get; } |
| 1956 | [Experimental("OPENAI001")] |
| 1957 | public BinaryData InputAudioBytes { get; } |
| 1958 | [Experimental("OPENAI001")] |
| 1959 | public ChatInputAudioFormat? InputAudioFormat { get; } |
| 1960 | public ChatMessageContentPartKind Kind { get; } |
| 1961 | [Serialization.JsonIgnore] |
| 1962 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 1963 | [Experimental("SCME0001")] |
| 1964 | public ref JsonPatch Patch { get; } |
| 1965 | public string Refusal { get; } |
| 1966 | public string Text { get; } |
| 1967 | [Experimental("OPENAI001")] |
| 1968 | public static ChatMessageContentPart CreateFilePart(BinaryData fileBytes, string fileBytesMediaType, string filename); |
| 1969 | [Experimental("OPENAI001")] |
| 1970 | public static ChatMessageContentPart CreateFilePart(string fileId); |
| 1971 | public static ChatMessageContentPart CreateImagePart(BinaryData imageBytes, string imageBytesMediaType, ChatImageDetailLevel? imageDetailLevel = null); |
| 1972 | public static ChatMessageContentPart CreateImagePart(Uri imageUri, ChatImageDetailLevel? imageDetailLevel = null); |
| 1973 | [Experimental("OPENAI001")] |
| 1974 | public static ChatMessageContentPart CreateInputAudioPart(BinaryData inputAudioBytes, ChatInputAudioFormat inputAudioFormat); |
| 1975 | public static ChatMessageContentPart CreateRefusalPart(string refusal); |
| 1976 | public static ChatMessageContentPart CreateTextPart(string text); |
| 1977 | [Experimental("OPENAI001")] |
| 1978 | protected virtual ChatMessageContentPart JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 1979 | [Experimental("OPENAI001")] |
| 1980 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 1981 | public static implicit operator ChatMessageContentPart(string text); |
| 1982 | [Experimental("OPENAI001")] |
| 1983 | protected virtual ChatMessageContentPart PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 1984 | [Experimental("OPENAI001")] |
| 1985 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 1986 | } |
| 1987 | public enum ChatMessageContentPartKind { |
| 1988 | Text = 0, |
| 1989 | Refusal = 1, |
| 1990 | Image = 2, |
| 1991 | InputAudio = 3, |
| 1992 | File = 4 |
| 1993 | } |
| 1994 | public enum ChatMessageRole { |
| 1995 | System = 0, |
| 1996 | User = 1, |
| 1997 | Assistant = 2, |
| 1998 | Tool = 3, |
| 1999 | Function = 4, |
| 2000 | Developer = 5 |
| 2001 | } |
| 2002 | [Experimental("OPENAI001")] |
| 2003 | public class ChatOutputAudio : IJsonModel<ChatOutputAudio>, IPersistableModel<ChatOutputAudio> { |
| 2004 | public BinaryData AudioBytes { get; } |
| 2005 | public DateTimeOffset ExpiresAt { get; } |
| 2006 | public string Id { get; } |
| 2007 | [Serialization.JsonIgnore] |
| 2008 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2009 | [Experimental("SCME0001")] |
| 2010 | public ref JsonPatch Patch { get; } |
| 2011 | public string Transcript { get; } |
| 2012 | protected virtual ChatOutputAudio JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2013 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2014 | protected virtual ChatOutputAudio PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2015 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2016 | } |
| 2017 | [Experimental("OPENAI001")] |
| 2018 | public readonly partial struct ChatOutputAudioFormat : IEquatable<ChatOutputAudioFormat> { |
| 2019 | public ChatOutputAudioFormat(string value); |
| 2020 | public static ChatOutputAudioFormat Aac { get; } |
| 2021 | public static ChatOutputAudioFormat Flac { get; } |
| 2022 | public static ChatOutputAudioFormat Mp3 { get; } |
| 2023 | public static ChatOutputAudioFormat Opus { get; } |
| 2024 | public static ChatOutputAudioFormat Pcm16 { get; } |
| 2025 | public static ChatOutputAudioFormat Wav { get; } |
| 2026 | public readonly bool Equals(ChatOutputAudioFormat other); |
| 2027 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2028 | public override readonly bool Equals(object obj); |
| 2029 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2030 | public override readonly int GetHashCode(); |
| 2031 | public static bool operator ==(ChatOutputAudioFormat left, ChatOutputAudioFormat right); |
| 2032 | public static implicit operator ChatOutputAudioFormat(string value); |
| 2033 | public static implicit operator ChatOutputAudioFormat?(string value); |
| 2034 | public static bool operator !=(ChatOutputAudioFormat left, ChatOutputAudioFormat right); |
| 2035 | public override readonly string ToString(); |
| 2036 | } |
| 2037 | [Experimental("OPENAI001")] |
| 2038 | public class ChatOutputAudioReference : IJsonModel<ChatOutputAudioReference>, IPersistableModel<ChatOutputAudioReference> { |
| 2039 | public ChatOutputAudioReference(string id); |
| 2040 | public string Id { get; } |
| 2041 | [Serialization.JsonIgnore] |
| 2042 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2043 | [Experimental("SCME0001")] |
| 2044 | public ref JsonPatch Patch { get; } |
| 2045 | protected virtual ChatOutputAudioReference JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2046 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2047 | protected virtual ChatOutputAudioReference PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2048 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2049 | } |
| 2050 | [Experimental("OPENAI001")] |
| 2051 | public readonly partial struct ChatOutputAudioVoice : IEquatable<ChatOutputAudioVoice> { |
| 2052 | public ChatOutputAudioVoice(string value); |
| 2053 | public static ChatOutputAudioVoice Alloy { get; } |
| 2054 | public static ChatOutputAudioVoice Ash { get; } |
| 2055 | public static ChatOutputAudioVoice Ballad { get; } |
| 2056 | public static ChatOutputAudioVoice Coral { get; } |
| 2057 | public static ChatOutputAudioVoice Echo { get; } |
| 2058 | public static ChatOutputAudioVoice Fable { get; } |
| 2059 | public static ChatOutputAudioVoice Nova { get; } |
| 2060 | public static ChatOutputAudioVoice Onyx { get; } |
| 2061 | public static ChatOutputAudioVoice Sage { get; } |
| 2062 | public static ChatOutputAudioVoice Shimmer { get; } |
| 2063 | public static ChatOutputAudioVoice Verse { get; } |
| 2064 | public readonly bool Equals(ChatOutputAudioVoice other); |
| 2065 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2066 | public override readonly bool Equals(object obj); |
| 2067 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2068 | public override readonly int GetHashCode(); |
| 2069 | public static bool operator ==(ChatOutputAudioVoice left, ChatOutputAudioVoice right); |
| 2070 | public static implicit operator ChatOutputAudioVoice(string value); |
| 2071 | public static implicit operator ChatOutputAudioVoice?(string value); |
| 2072 | public static bool operator !=(ChatOutputAudioVoice left, ChatOutputAudioVoice right); |
| 2073 | public override readonly string ToString(); |
| 2074 | } |
| 2075 | [Experimental("OPENAI001")] |
| 2076 | public class ChatOutputPrediction : IJsonModel<ChatOutputPrediction>, IPersistableModel<ChatOutputPrediction> { |
| 2077 | [Serialization.JsonIgnore] |
| 2078 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2079 | [Experimental("SCME0001")] |
| 2080 | public ref JsonPatch Patch { get; } |
| 2081 | public static ChatOutputPrediction CreateStaticContentPrediction(IEnumerable<ChatMessageContentPart> staticContentParts); |
| 2082 | public static ChatOutputPrediction CreateStaticContentPrediction(string staticContent); |
| 2083 | protected virtual ChatOutputPrediction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2084 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2085 | protected virtual ChatOutputPrediction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2086 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2087 | } |
| 2088 | public class ChatOutputTokenUsageDetails : IJsonModel<ChatOutputTokenUsageDetails>, IPersistableModel<ChatOutputTokenUsageDetails> { |
| 2089 | [Experimental("OPENAI001")] |
| 2090 | public int AcceptedPredictionTokenCount { get; } |
| 2091 | public int AudioTokenCount { get; } |
| 2092 | [Serialization.JsonIgnore] |
| 2093 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2094 | [Experimental("SCME0001")] |
| 2095 | public ref JsonPatch Patch { get; } |
| 2096 | public int ReasoningTokenCount { get; } |
| 2097 | [Experimental("OPENAI001")] |
| 2098 | public int RejectedPredictionTokenCount { get; } |
| 2099 | [Experimental("OPENAI001")] |
| 2100 | protected virtual ChatOutputTokenUsageDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2101 | [Experimental("OPENAI001")] |
| 2102 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2103 | [Experimental("OPENAI001")] |
| 2104 | protected virtual ChatOutputTokenUsageDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2105 | [Experimental("OPENAI001")] |
| 2106 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2107 | } |
| 2108 | [Experimental("OPENAI001")] |
| 2109 | public readonly partial struct ChatReasoningEffortLevel : IEquatable<ChatReasoningEffortLevel> { |
| 2110 | public ChatReasoningEffortLevel(string value); |
| 2111 | public static ChatReasoningEffortLevel High { get; } |
| 2112 | public static ChatReasoningEffortLevel Low { get; } |
| 2113 | public static ChatReasoningEffortLevel Medium { get; } |
| 2114 | public static ChatReasoningEffortLevel Minimal { get; } |
| 2115 | public static ChatReasoningEffortLevel None { get; } |
| 2116 | public readonly bool Equals(ChatReasoningEffortLevel other); |
| 2117 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2118 | public override readonly bool Equals(object obj); |
| 2119 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2120 | public override readonly int GetHashCode(); |
| 2121 | public static bool operator ==(ChatReasoningEffortLevel left, ChatReasoningEffortLevel right); |
| 2122 | public static implicit operator ChatReasoningEffortLevel(string value); |
| 2123 | public static implicit operator ChatReasoningEffortLevel?(string value); |
| 2124 | public static bool operator !=(ChatReasoningEffortLevel left, ChatReasoningEffortLevel right); |
| 2125 | public override readonly string ToString(); |
| 2126 | } |
| 2127 | public class ChatResponseFormat : IJsonModel<ChatResponseFormat>, IPersistableModel<ChatResponseFormat> { |
| 2128 | [Serialization.JsonIgnore] |
| 2129 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2130 | [Experimental("SCME0001")] |
| 2131 | public ref JsonPatch Patch { get; } |
| 2132 | public static ChatResponseFormat CreateJsonObjectFormat(); |
| 2133 | public static ChatResponseFormat CreateJsonSchemaFormat(string jsonSchemaFormatName, BinaryData jsonSchema, string jsonSchemaFormatDescription = null, bool? jsonSchemaIsStrict = null); |
| 2134 | public static ChatResponseFormat CreateTextFormat(); |
| 2135 | [Experimental("OPENAI001")] |
| 2136 | protected virtual ChatResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2137 | [Experimental("OPENAI001")] |
| 2138 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2139 | [Experimental("OPENAI001")] |
| 2140 | protected virtual ChatResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2141 | [Experimental("OPENAI001")] |
| 2142 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2143 | } |
| 2144 | [Experimental("OPENAI001")] |
| 2145 | [Flags] |
| 2146 | public enum ChatResponseModalities { |
| 2147 | Default = 0, |
| 2148 | Text = 1, |
| 2149 | Audio = 2 |
| 2150 | } |
| 2151 | [Experimental("OPENAI001")] |
| 2152 | public readonly partial struct ChatServiceTier : IEquatable<ChatServiceTier> { |
| 2153 | public ChatServiceTier(string value); |
| 2154 | public static ChatServiceTier Auto { get; } |
| 2155 | public static ChatServiceTier Default { get; } |
| 2156 | public static ChatServiceTier Flex { get; } |
| 2157 | public static ChatServiceTier Scale { get; } |
| 2158 | public readonly bool Equals(ChatServiceTier other); |
| 2159 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2160 | public override readonly bool Equals(object obj); |
| 2161 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2162 | public override readonly int GetHashCode(); |
| 2163 | public static bool operator ==(ChatServiceTier left, ChatServiceTier right); |
| 2164 | public static implicit operator ChatServiceTier(string value); |
| 2165 | public static implicit operator ChatServiceTier?(string value); |
| 2166 | public static bool operator !=(ChatServiceTier left, ChatServiceTier right); |
| 2167 | public override readonly string ToString(); |
| 2168 | } |
| 2169 | public class ChatTokenLogProbabilityDetails : IJsonModel<ChatTokenLogProbabilityDetails>, IPersistableModel<ChatTokenLogProbabilityDetails> { |
| 2170 | public float LogProbability { get; } |
| 2171 | [Serialization.JsonIgnore] |
| 2172 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2173 | [Experimental("SCME0001")] |
| 2174 | public ref JsonPatch Patch { get; } |
| 2175 | public string Token { get; } |
| 2176 | public IReadOnlyList<ChatTokenTopLogProbabilityDetails> TopLogProbabilities { get; } |
| 2177 | public ReadOnlyMemory<byte>? Utf8Bytes { get; } |
| 2178 | [Experimental("OPENAI001")] |
| 2179 | protected virtual ChatTokenLogProbabilityDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2180 | [Experimental("OPENAI001")] |
| 2181 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2182 | [Experimental("OPENAI001")] |
| 2183 | protected virtual ChatTokenLogProbabilityDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2184 | [Experimental("OPENAI001")] |
| 2185 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2186 | } |
| 2187 | public class ChatTokenTopLogProbabilityDetails : IJsonModel<ChatTokenTopLogProbabilityDetails>, IPersistableModel<ChatTokenTopLogProbabilityDetails> { |
| 2188 | public float LogProbability { get; } |
| 2189 | [Serialization.JsonIgnore] |
| 2190 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2191 | [Experimental("SCME0001")] |
| 2192 | public ref JsonPatch Patch { get; } |
| 2193 | public string Token { get; } |
| 2194 | public ReadOnlyMemory<byte>? Utf8Bytes { get; } |
| 2195 | [Experimental("OPENAI001")] |
| 2196 | protected virtual ChatTokenTopLogProbabilityDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2197 | [Experimental("OPENAI001")] |
| 2198 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2199 | [Experimental("OPENAI001")] |
| 2200 | protected virtual ChatTokenTopLogProbabilityDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2201 | [Experimental("OPENAI001")] |
| 2202 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2203 | } |
| 2204 | public class ChatTokenUsage : IJsonModel<ChatTokenUsage>, IPersistableModel<ChatTokenUsage> { |
| 2205 | public int InputTokenCount { get; } |
| 2206 | public ChatInputTokenUsageDetails InputTokenDetails { get; } |
| 2207 | public int OutputTokenCount { get; } |
| 2208 | public ChatOutputTokenUsageDetails OutputTokenDetails { get; } |
| 2209 | [Serialization.JsonIgnore] |
| 2210 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2211 | [Experimental("SCME0001")] |
| 2212 | public ref JsonPatch Patch { get; } |
| 2213 | public int TotalTokenCount { get; } |
| 2214 | [Experimental("OPENAI001")] |
| 2215 | protected virtual ChatTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2216 | [Experimental("OPENAI001")] |
| 2217 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2218 | [Experimental("OPENAI001")] |
| 2219 | protected virtual ChatTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2220 | [Experimental("OPENAI001")] |
| 2221 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2222 | } |
| 2223 | public class ChatTool : IJsonModel<ChatTool>, IPersistableModel<ChatTool> { |
| 2224 | public string FunctionDescription { get; } |
| 2225 | public string FunctionName { get; } |
| 2226 | public BinaryData FunctionParameters { get; } |
| 2227 | public bool? FunctionSchemaIsStrict { get; } |
| 2228 | public ChatToolKind Kind { get; } |
| 2229 | [Serialization.JsonIgnore] |
| 2230 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2231 | [Experimental("SCME0001")] |
| 2232 | public ref JsonPatch Patch { get; } |
| 2233 | public static ChatTool CreateFunctionTool(string functionName, string functionDescription = null, BinaryData functionParameters = null, bool? functionSchemaIsStrict = null); |
| 2234 | [Experimental("OPENAI001")] |
| 2235 | protected virtual ChatTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2236 | [Experimental("OPENAI001")] |
| 2237 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2238 | [Experimental("OPENAI001")] |
| 2239 | protected virtual ChatTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2240 | [Experimental("OPENAI001")] |
| 2241 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2242 | } |
| 2243 | public class ChatToolCall : IJsonModel<ChatToolCall>, IPersistableModel<ChatToolCall> { |
| 2244 | public BinaryData FunctionArguments { get; } |
| 2245 | public string FunctionName { get; } |
| 2246 | public string Id { get; set; } |
| 2247 | public ChatToolCallKind Kind { get; } |
| 2248 | [Serialization.JsonIgnore] |
| 2249 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2250 | [Experimental("SCME0001")] |
| 2251 | public ref JsonPatch Patch { get; } |
| 2252 | public static ChatToolCall CreateFunctionToolCall(string id, string functionName, BinaryData functionArguments); |
| 2253 | [Experimental("OPENAI001")] |
| 2254 | protected virtual ChatToolCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2255 | [Experimental("OPENAI001")] |
| 2256 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2257 | [Experimental("OPENAI001")] |
| 2258 | protected virtual ChatToolCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2259 | [Experimental("OPENAI001")] |
| 2260 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2261 | } |
| 2262 | public enum ChatToolCallKind { |
| 2263 | Function = 0 |
| 2264 | } |
| 2265 | public class ChatToolChoice : IJsonModel<ChatToolChoice>, IPersistableModel<ChatToolChoice> { |
| 2266 | [Serialization.JsonIgnore] |
| 2267 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2268 | [Experimental("SCME0001")] |
| 2269 | public ref JsonPatch Patch { get; } |
| 2270 | public static ChatToolChoice CreateAutoChoice(); |
| 2271 | public static ChatToolChoice CreateFunctionChoice(string functionName); |
| 2272 | public static ChatToolChoice CreateNoneChoice(); |
| 2273 | public static ChatToolChoice CreateRequiredChoice(); |
| 2274 | [Experimental("OPENAI001")] |
| 2275 | protected virtual ChatToolChoice JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2276 | [Experimental("OPENAI001")] |
| 2277 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2278 | [Experimental("OPENAI001")] |
| 2279 | protected virtual ChatToolChoice PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2280 | [Experimental("OPENAI001")] |
| 2281 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2282 | } |
| 2283 | public enum ChatToolKind { |
| 2284 | Function = 0 |
| 2285 | } |
| 2286 | [Experimental("OPENAI001")] |
| 2287 | public class ChatWebSearchOptions : IJsonModel<ChatWebSearchOptions>, IPersistableModel<ChatWebSearchOptions> { |
| 2288 | [Serialization.JsonIgnore] |
| 2289 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2290 | [Experimental("SCME0001")] |
| 2291 | public ref JsonPatch Patch { get; } |
| 2292 | protected virtual ChatWebSearchOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2293 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2294 | protected virtual ChatWebSearchOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2295 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2296 | } |
| 2297 | [Experimental("OPENAI001")] |
| 2298 | public class DeveloperChatMessage : ChatMessage, IJsonModel<DeveloperChatMessage>, IPersistableModel<DeveloperChatMessage> { |
| 2299 | public DeveloperChatMessage(params ChatMessageContentPart[] contentParts); |
| 2300 | public DeveloperChatMessage(IEnumerable<ChatMessageContentPart> contentParts); |
| 2301 | public DeveloperChatMessage(string content); |
| 2302 | public string ParticipantName { get; set; } |
| 2303 | protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2304 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2305 | protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2306 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2307 | } |
| 2308 | [Obsolete("This class is obsolete. Please use ToolChatMessage instead.")] |
| 2309 | public class FunctionChatMessage : ChatMessage, IJsonModel<FunctionChatMessage>, IPersistableModel<FunctionChatMessage> { |
| 2310 | public FunctionChatMessage(string functionName, string content); |
| 2311 | public string FunctionName { get; } |
| 2312 | [Experimental("OPENAI001")] |
| 2313 | protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2314 | [Experimental("OPENAI001")] |
| 2315 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2316 | [Experimental("OPENAI001")] |
| 2317 | protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2318 | [Experimental("OPENAI001")] |
| 2319 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2320 | } |
| 2321 | public static class OpenAIChatModelFactory { |
| 2322 | [Experimental("OPENAI001")] |
| 2323 | 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, ChatServiceTier? serviceTier = null, string systemFingerprint = null, ChatTokenUsage usage = null, ChatOutputAudio outputAudio = null, IEnumerable<ChatMessageAnnotation> messageAnnotations = null); |
| 2324 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2325 | 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); |
| 2326 | [Experimental("OPENAI001")] |
| 2327 | public static ChatCompletionMessageListDatum ChatCompletionMessageListDatum(string id, string content, string refusal, ChatMessageRole role, IList<ChatMessageContentPart> contentParts = null, IList<ChatToolCall> toolCalls = null, IList<ChatMessageAnnotation> annotations = null, string functionName = null, string functionArguments = null, ChatOutputAudio outputAudio = null); |
| 2328 | public static ChatInputTokenUsageDetails ChatInputTokenUsageDetails(int audioTokenCount = 0, int cachedTokenCount = 0); |
| 2329 | [Experimental("OPENAI001")] |
| 2330 | public static ChatMessageAnnotation ChatMessageAnnotation(int startIndex = 0, int endIndex = 0, Uri webResourceUri = null, string webResourceTitle = null); |
| 2331 | [Experimental("OPENAI001")] |
| 2332 | public static ChatOutputAudio ChatOutputAudio(BinaryData audioBytes, string id = null, string transcript = null, DateTimeOffset expiresAt = default); |
| 2333 | [Experimental("OPENAI001")] |
| 2334 | public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reasoningTokenCount = 0, int audioTokenCount = 0, int acceptedPredictionTokenCount = 0, int rejectedPredictionTokenCount = 0); |
| 2335 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2336 | public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reasoningTokenCount, int audioTokenCount); |
| 2337 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2338 | public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reasoningTokenCount); |
| 2339 | public static ChatTokenLogProbabilityDetails ChatTokenLogProbabilityDetails(string token = null, float logProbability = 0, ReadOnlyMemory<byte>? utf8Bytes = null, IEnumerable<ChatTokenTopLogProbabilityDetails> topLogProbabilities = null); |
| 2340 | public static ChatTokenTopLogProbabilityDetails ChatTokenTopLogProbabilityDetails(string token = null, float logProbability = 0, ReadOnlyMemory<byte>? utf8Bytes = null); |
| 2341 | public static ChatTokenUsage ChatTokenUsage(int outputTokenCount = 0, int inputTokenCount = 0, int totalTokenCount = 0, ChatOutputTokenUsageDetails outputTokenDetails = null, ChatInputTokenUsageDetails inputTokenDetails = null); |
| 2342 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2343 | public static ChatTokenUsage ChatTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount, ChatOutputTokenUsageDetails outputTokenDetails); |
| 2344 | [Experimental("OPENAI001")] |
| 2345 | 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, ChatServiceTier? serviceTier = null, string systemFingerprint = null, ChatTokenUsage usage = null, StreamingChatOutputAudioUpdate outputAudioUpdate = null); |
| 2346 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2347 | 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); |
| 2348 | [Obsolete("This class is obsolete. Please use StreamingChatToolCallUpdate instead.")] |
| 2349 | public static StreamingChatFunctionCallUpdate StreamingChatFunctionCallUpdate(string functionName = null, BinaryData functionArgumentsUpdate = null); |
| 2350 | [Experimental("OPENAI001")] |
| 2351 | public static StreamingChatOutputAudioUpdate StreamingChatOutputAudioUpdate(string id = null, DateTimeOffset? expiresAt = null, string transcriptUpdate = null, BinaryData audioBytesUpdate = null); |
| 2352 | public static StreamingChatToolCallUpdate StreamingChatToolCallUpdate(int index = 0, string toolCallId = null, ChatToolCallKind kind = ChatToolCallKind.Function, string functionName = null, BinaryData functionArgumentsUpdate = null); |
| 2353 | } |
| 2354 | public class StreamingChatCompletionUpdate : IJsonModel<StreamingChatCompletionUpdate>, IPersistableModel<StreamingChatCompletionUpdate> { |
| 2355 | public string CompletionId { get; } |
| 2356 | public IReadOnlyList<ChatTokenLogProbabilityDetails> ContentTokenLogProbabilities { get; } |
| 2357 | public ChatMessageContent ContentUpdate { get; } |
| 2358 | public DateTimeOffset CreatedAt { get; } |
| 2359 | public ChatFinishReason? FinishReason { get; } |
| 2360 | [Obsolete("This property is obsolete. Please use ToolCallUpdates instead.")] |
| 2361 | public StreamingChatFunctionCallUpdate FunctionCallUpdate { get; } |
| 2362 | public string Model { get; } |
| 2363 | [Experimental("OPENAI001")] |
| 2364 | public StreamingChatOutputAudioUpdate OutputAudioUpdate { get; } |
| 2365 | [Serialization.JsonIgnore] |
| 2366 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2367 | [Experimental("SCME0001")] |
| 2368 | public ref JsonPatch Patch { get; } |
| 2369 | public IReadOnlyList<ChatTokenLogProbabilityDetails> RefusalTokenLogProbabilities { get; } |
| 2370 | public string RefusalUpdate { get; } |
| 2371 | public ChatMessageRole? Role { get; } |
| 2372 | [Experimental("OPENAI001")] |
| 2373 | public ChatServiceTier? ServiceTier { get; } |
| 2374 | public string SystemFingerprint { get; } |
| 2375 | public IReadOnlyList<StreamingChatToolCallUpdate> ToolCallUpdates { get; } |
| 2376 | public ChatTokenUsage Usage { get; } |
| 2377 | [Experimental("OPENAI001")] |
| 2378 | protected virtual StreamingChatCompletionUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2379 | [Experimental("OPENAI001")] |
| 2380 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2381 | [Experimental("OPENAI001")] |
| 2382 | protected virtual StreamingChatCompletionUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2383 | [Experimental("OPENAI001")] |
| 2384 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2385 | } |
| 2386 | [Obsolete("This class is obsolete. Please use StreamingChatToolCallUpdate instead.")] |
| 2387 | public class StreamingChatFunctionCallUpdate : IJsonModel<StreamingChatFunctionCallUpdate>, IPersistableModel<StreamingChatFunctionCallUpdate> { |
| 2388 | public BinaryData FunctionArgumentsUpdate { get; } |
| 2389 | public string FunctionName { get; } |
| 2390 | [Serialization.JsonIgnore] |
| 2391 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2392 | [Experimental("SCME0001")] |
| 2393 | public ref JsonPatch Patch { get; } |
| 2394 | [Experimental("OPENAI001")] |
| 2395 | protected virtual StreamingChatFunctionCallUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2396 | [Experimental("OPENAI001")] |
| 2397 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2398 | [Experimental("OPENAI001")] |
| 2399 | protected virtual StreamingChatFunctionCallUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2400 | [Experimental("OPENAI001")] |
| 2401 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2402 | } |
| 2403 | [Experimental("OPENAI001")] |
| 2404 | public class StreamingChatOutputAudioUpdate : IJsonModel<StreamingChatOutputAudioUpdate>, IPersistableModel<StreamingChatOutputAudioUpdate> { |
| 2405 | public BinaryData AudioBytesUpdate { get; } |
| 2406 | public DateTimeOffset? ExpiresAt { get; } |
| 2407 | public string Id { get; } |
| 2408 | [Serialization.JsonIgnore] |
| 2409 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2410 | [Experimental("SCME0001")] |
| 2411 | public ref JsonPatch Patch { get; } |
| 2412 | public string TranscriptUpdate { get; } |
| 2413 | protected virtual StreamingChatOutputAudioUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2414 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2415 | protected virtual StreamingChatOutputAudioUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2416 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2417 | } |
| 2418 | public class StreamingChatToolCallUpdate : IJsonModel<StreamingChatToolCallUpdate>, IPersistableModel<StreamingChatToolCallUpdate> { |
| 2419 | public BinaryData FunctionArgumentsUpdate { get; } |
| 2420 | public string FunctionName { get; } |
| 2421 | public int Index { get; } |
| 2422 | public ChatToolCallKind Kind { get; } |
| 2423 | [Serialization.JsonIgnore] |
| 2424 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2425 | [Experimental("SCME0001")] |
| 2426 | public ref JsonPatch Patch { get; } |
| 2427 | public string ToolCallId { get; } |
| 2428 | [Experimental("OPENAI001")] |
| 2429 | protected virtual StreamingChatToolCallUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2430 | [Experimental("OPENAI001")] |
| 2431 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2432 | [Experimental("OPENAI001")] |
| 2433 | protected virtual StreamingChatToolCallUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2434 | [Experimental("OPENAI001")] |
| 2435 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2436 | } |
| 2437 | public class SystemChatMessage : ChatMessage, IJsonModel<SystemChatMessage>, IPersistableModel<SystemChatMessage> { |
| 2438 | public SystemChatMessage(params ChatMessageContentPart[] contentParts); |
| 2439 | public SystemChatMessage(IEnumerable<ChatMessageContentPart> contentParts); |
| 2440 | public SystemChatMessage(string content); |
| 2441 | public string ParticipantName { get; set; } |
| 2442 | [Experimental("OPENAI001")] |
| 2443 | protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2444 | [Experimental("OPENAI001")] |
| 2445 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2446 | [Experimental("OPENAI001")] |
| 2447 | protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2448 | [Experimental("OPENAI001")] |
| 2449 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2450 | } |
| 2451 | public class ToolChatMessage : ChatMessage, IJsonModel<ToolChatMessage>, IPersistableModel<ToolChatMessage> { |
| 2452 | public ToolChatMessage(string toolCallId, params ChatMessageContentPart[] contentParts); |
| 2453 | public ToolChatMessage(string toolCallId, IEnumerable<ChatMessageContentPart> contentParts); |
| 2454 | public ToolChatMessage(string toolCallId, string content); |
| 2455 | public string ToolCallId { get; } |
| 2456 | [Experimental("OPENAI001")] |
| 2457 | protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2458 | [Experimental("OPENAI001")] |
| 2459 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2460 | [Experimental("OPENAI001")] |
| 2461 | protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2462 | [Experimental("OPENAI001")] |
| 2463 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2464 | } |
| 2465 | public class UserChatMessage : ChatMessage, IJsonModel<UserChatMessage>, IPersistableModel<UserChatMessage> { |
| 2466 | public UserChatMessage(params ChatMessageContentPart[] contentParts); |
| 2467 | public UserChatMessage(IEnumerable<ChatMessageContentPart> contentParts); |
| 2468 | public UserChatMessage(string content); |
| 2469 | public string ParticipantName { get; set; } |
| 2470 | [Experimental("OPENAI001")] |
| 2471 | protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2472 | [Experimental("OPENAI001")] |
| 2473 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2474 | [Experimental("OPENAI001")] |
| 2475 | protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2476 | [Experimental("OPENAI001")] |
| 2477 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2478 | } |
| 2479 | } |
| 2480 | namespace OpenAI.Containers { |
| 2481 | [Experimental("OPENAI001")] |
| 2482 | public class ContainerClient { |
| 2483 | protected ContainerClient(); |
| 2484 | public ContainerClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 2485 | public ContainerClient(ApiKeyCredential credential); |
| 2486 | public ContainerClient(AuthenticationPolicy authenticationPolicy, OpenAIClientOptions options); |
| 2487 | public ContainerClient(AuthenticationPolicy authenticationPolicy); |
| 2488 | protected internal ContainerClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 2489 | public ContainerClient(string apiKey); |
| 2490 | [Experimental("OPENAI001")] |
| 2491 | public Uri Endpoint { get; } |
| 2492 | public ClientPipeline Pipeline { get; } |
| 2493 | public virtual ClientResult<ContainerResource> CreateContainer(CreateContainerBody body, CancellationToken cancellationToken = default); |
| 2494 | public virtual ClientResult CreateContainer(BinaryContent content, RequestOptions options = null); |
| 2495 | public virtual Task<ClientResult<ContainerResource>> CreateContainerAsync(CreateContainerBody body, CancellationToken cancellationToken = default); |
| 2496 | public virtual Task<ClientResult> CreateContainerAsync(BinaryContent content, RequestOptions options = null); |
| 2497 | public virtual ClientResult CreateContainerFile(string containerId, BinaryContent content, string contentType, RequestOptions options = null); |
| 2498 | public virtual Task<ClientResult> CreateContainerFileAsync(string containerId, BinaryContent content, string contentType, RequestOptions options = null); |
| 2499 | public virtual ClientResult DeleteContainer(string containerId, RequestOptions options); |
| 2500 | public virtual ClientResult<DeleteContainerResponse> DeleteContainer(string containerId, CancellationToken cancellationToken = default); |
| 2501 | public virtual Task<ClientResult> DeleteContainerAsync(string containerId, RequestOptions options); |
| 2502 | public virtual Task<ClientResult<DeleteContainerResponse>> DeleteContainerAsync(string containerId, CancellationToken cancellationToken = default); |
| 2503 | public virtual ClientResult DeleteContainerFile(string containerId, string fileId, RequestOptions options); |
| 2504 | public virtual ClientResult<DeleteContainerFileResponse> DeleteContainerFile(string containerId, string fileId, CancellationToken cancellationToken = default); |
| 2505 | public virtual Task<ClientResult> DeleteContainerFileAsync(string containerId, string fileId, RequestOptions options); |
| 2506 | public virtual Task<ClientResult<DeleteContainerFileResponse>> DeleteContainerFileAsync(string containerId, string fileId, CancellationToken cancellationToken = default); |
| 2507 | public virtual ClientResult DownloadContainerFile(string containerId, string fileId, RequestOptions options); |
| 2508 | public virtual ClientResult<BinaryData> DownloadContainerFile(string containerId, string fileId, CancellationToken cancellationToken = default); |
| 2509 | public virtual Task<ClientResult> DownloadContainerFileAsync(string containerId, string fileId, RequestOptions options); |
| 2510 | public virtual Task<ClientResult<BinaryData>> DownloadContainerFileAsync(string containerId, string fileId, CancellationToken cancellationToken = default); |
| 2511 | public virtual ClientResult GetContainer(string containerId, RequestOptions options); |
| 2512 | public virtual ClientResult<ContainerResource> GetContainer(string containerId, CancellationToken cancellationToken = default); |
| 2513 | public virtual Task<ClientResult> GetContainerAsync(string containerId, RequestOptions options); |
| 2514 | public virtual Task<ClientResult<ContainerResource>> GetContainerAsync(string containerId, CancellationToken cancellationToken = default); |
| 2515 | public virtual ClientResult GetContainerFile(string containerId, string fileId, RequestOptions options); |
| 2516 | public virtual ClientResult<ContainerFileResource> GetContainerFile(string containerId, string fileId, CancellationToken cancellationToken = default); |
| 2517 | public virtual Task<ClientResult> GetContainerFileAsync(string containerId, string fileId, RequestOptions options); |
| 2518 | public virtual Task<ClientResult<ContainerFileResource>> GetContainerFileAsync(string containerId, string fileId, CancellationToken cancellationToken = default); |
| 2519 | public virtual CollectionResult<ContainerFileResource> GetContainerFiles(string containerId, ContainerFileCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 2520 | public virtual CollectionResult GetContainerFiles(string containerId, int? limit, string order, string after, RequestOptions options); |
| 2521 | public virtual AsyncCollectionResult<ContainerFileResource> GetContainerFilesAsync(string containerId, ContainerFileCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 2522 | public virtual AsyncCollectionResult GetContainerFilesAsync(string containerId, int? limit, string order, string after, RequestOptions options); |
| 2523 | public virtual CollectionResult<ContainerResource> GetContainers(ContainerCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 2524 | public virtual CollectionResult GetContainers(int? limit, string order, string after, RequestOptions options); |
| 2525 | public virtual AsyncCollectionResult<ContainerResource> GetContainersAsync(ContainerCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 2526 | public virtual AsyncCollectionResult GetContainersAsync(int? limit, string order, string after, RequestOptions options); |
| 2527 | } |
| 2528 | [Experimental("OPENAI001")] |
| 2529 | public class ContainerCollectionOptions : IJsonModel<ContainerCollectionOptions>, IPersistableModel<ContainerCollectionOptions> { |
| 2530 | public string AfterId { get; set; } |
| 2531 | public ContainerCollectionOrder? Order { get; set; } |
| 2532 | public int? PageSizeLimit { get; set; } |
| 2533 | protected virtual ContainerCollectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2534 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2535 | protected virtual ContainerCollectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2536 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2537 | } |
| 2538 | [Experimental("OPENAI001")] |
| 2539 | public readonly partial struct ContainerCollectionOrder : IEquatable<ContainerCollectionOrder> { |
| 2540 | public ContainerCollectionOrder(string value); |
| 2541 | public static ContainerCollectionOrder Ascending { get; } |
| 2542 | public static ContainerCollectionOrder Descending { get; } |
| 2543 | public readonly bool Equals(ContainerCollectionOrder other); |
| 2544 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2545 | public override readonly bool Equals(object obj); |
| 2546 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2547 | public override readonly int GetHashCode(); |
| 2548 | public static bool operator ==(ContainerCollectionOrder left, ContainerCollectionOrder right); |
| 2549 | public static implicit operator ContainerCollectionOrder(string value); |
| 2550 | public static implicit operator ContainerCollectionOrder?(string value); |
| 2551 | public static bool operator !=(ContainerCollectionOrder left, ContainerCollectionOrder right); |
| 2552 | public override readonly string ToString(); |
| 2553 | } |
| 2554 | [Experimental("OPENAI001")] |
| 2555 | public class ContainerFileCollectionOptions : IJsonModel<ContainerFileCollectionOptions>, IPersistableModel<ContainerFileCollectionOptions> { |
| 2556 | public string AfterId { get; set; } |
| 2557 | public ContainerCollectionOrder? Order { get; set; } |
| 2558 | public int? PageSizeLimit { get; set; } |
| 2559 | protected virtual ContainerFileCollectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2560 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2561 | protected virtual ContainerFileCollectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2562 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2563 | } |
| 2564 | [Experimental("OPENAI001")] |
| 2565 | public class ContainerFileResource : IJsonModel<ContainerFileResource>, IPersistableModel<ContainerFileResource> { |
| 2566 | public int Bytes { get; } |
| 2567 | public string ContainerId { get; } |
| 2568 | public DateTimeOffset CreatedAt { get; } |
| 2569 | public string Id { get; } |
| 2570 | public string Object { get; } |
| 2571 | public string Path { get; } |
| 2572 | public string Source { get; } |
| 2573 | protected virtual ContainerFileResource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2574 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2575 | public static explicit operator ContainerFileResource(ClientResult result); |
| 2576 | protected virtual ContainerFileResource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2577 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2578 | } |
| 2579 | [Experimental("OPENAI001")] |
| 2580 | public class ContainerResource : IJsonModel<ContainerResource>, IPersistableModel<ContainerResource> { |
| 2581 | public DateTimeOffset CreatedAt { get; } |
| 2582 | public ContainerResourceExpiresAfter ExpiresAfter { get; } |
| 2583 | public string Id { get; } |
| 2584 | public string Name { get; } |
| 2585 | public string Object { get; } |
| 2586 | public string Status { get; } |
| 2587 | protected virtual ContainerResource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2588 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2589 | public static explicit operator ContainerResource(ClientResult result); |
| 2590 | protected virtual ContainerResource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2591 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2592 | } |
| 2593 | [Experimental("OPENAI001")] |
| 2594 | public class ContainerResourceExpiresAfter : IJsonModel<ContainerResourceExpiresAfter>, IPersistableModel<ContainerResourceExpiresAfter> { |
| 2595 | public string Anchor { get; } |
| 2596 | public int? Minutes { get; } |
| 2597 | protected virtual ContainerResourceExpiresAfter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2598 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2599 | protected virtual ContainerResourceExpiresAfter PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2600 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2601 | } |
| 2602 | [Experimental("OPENAI001")] |
| 2603 | public class CreateContainerBody : IJsonModel<CreateContainerBody>, IPersistableModel<CreateContainerBody> { |
| 2604 | public CreateContainerBody(string name); |
| 2605 | public CreateContainerBodyExpiresAfter ExpiresAfter { get; set; } |
| 2606 | public IList<string> FileIds { get; } |
| 2607 | public string Name { get; } |
| 2608 | protected virtual CreateContainerBody JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2609 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2610 | public static implicit operator BinaryContent(CreateContainerBody createContainerBody); |
| 2611 | protected virtual CreateContainerBody PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2612 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2613 | } |
| 2614 | [Experimental("OPENAI001")] |
| 2615 | public class CreateContainerBodyExpiresAfter : IJsonModel<CreateContainerBodyExpiresAfter>, IPersistableModel<CreateContainerBodyExpiresAfter> { |
| 2616 | public CreateContainerBodyExpiresAfter(int minutes); |
| 2617 | public string Anchor { get; } |
| 2618 | public int Minutes { get; } |
| 2619 | protected virtual CreateContainerBodyExpiresAfter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2620 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2621 | protected virtual CreateContainerBodyExpiresAfter PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2622 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2623 | } |
| 2624 | [Experimental("OPENAI001")] |
| 2625 | public class CreateContainerFileBody : IJsonModel<CreateContainerFileBody>, IPersistableModel<CreateContainerFileBody> { |
| 2626 | public BinaryData File { get; set; } |
| 2627 | public string FileId { get; set; } |
| 2628 | protected virtual CreateContainerFileBody JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2629 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2630 | protected virtual CreateContainerFileBody PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2631 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2632 | } |
| 2633 | [Experimental("OPENAI001")] |
| 2634 | public class DeleteContainerFileResponse : IJsonModel<DeleteContainerFileResponse>, IPersistableModel<DeleteContainerFileResponse> { |
| 2635 | public bool Deleted { get; } |
| 2636 | public string Id { get; } |
| 2637 | public string Object { get; } |
| 2638 | protected virtual DeleteContainerFileResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2639 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2640 | public static explicit operator DeleteContainerFileResponse(ClientResult result); |
| 2641 | protected virtual DeleteContainerFileResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2642 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2643 | } |
| 2644 | [Experimental("OPENAI001")] |
| 2645 | public class DeleteContainerResponse : IJsonModel<DeleteContainerResponse>, IPersistableModel<DeleteContainerResponse> { |
| 2646 | public bool Deleted { get; } |
| 2647 | public string Id { get; } |
| 2648 | public string Object { get; } |
| 2649 | protected virtual DeleteContainerResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2650 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2651 | public static explicit operator DeleteContainerResponse(ClientResult result); |
| 2652 | protected virtual DeleteContainerResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2653 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2654 | } |
| 2655 | } |
| 2656 | namespace OpenAI.Conversations { |
| 2657 | [Experimental("OPENAI001")] |
| 2658 | public class ConversationClient { |
| 2659 | protected ConversationClient(); |
| 2660 | public ConversationClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 2661 | public ConversationClient(ApiKeyCredential credential); |
| 2662 | public ConversationClient(AuthenticationPolicy authenticationPolicy, OpenAIClientOptions options); |
| 2663 | public ConversationClient(AuthenticationPolicy authenticationPolicy); |
| 2664 | protected internal ConversationClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 2665 | public ConversationClient(string apiKey); |
| 2666 | [Experimental("OPENAI001")] |
| 2667 | public Uri Endpoint { get; } |
| 2668 | public ClientPipeline Pipeline { get; } |
| 2669 | public virtual ClientResult CreateConversation(BinaryContent content, RequestOptions options = null); |
| 2670 | public virtual Task<ClientResult> CreateConversationAsync(BinaryContent content, RequestOptions options = null); |
| 2671 | public virtual ClientResult CreateConversationItems(string conversationId, BinaryContent content, IEnumerable<IncludedConversationItemProperty> include = null, RequestOptions options = null); |
| 2672 | public virtual Task<ClientResult> CreateConversationItemsAsync(string conversationId, BinaryContent content, IEnumerable<IncludedConversationItemProperty> include = null, RequestOptions options = null); |
| 2673 | public virtual ClientResult DeleteConversation(string conversationId, RequestOptions options = null); |
| 2674 | public virtual Task<ClientResult> DeleteConversationAsync(string conversationId, RequestOptions options = null); |
| 2675 | public virtual ClientResult DeleteConversationItem(string conversationId, string itemId, RequestOptions options = null); |
| 2676 | public virtual Task<ClientResult> DeleteConversationItemAsync(string conversationId, string itemId, RequestOptions options = null); |
| 2677 | public virtual ClientResult GetConversation(string conversationId, RequestOptions options = null); |
| 2678 | public virtual Task<ClientResult> GetConversationAsync(string conversationId, RequestOptions options = null); |
| 2679 | public virtual ClientResult GetConversationItem(string conversationId, string itemId, IEnumerable<IncludedConversationItemProperty> include = null, RequestOptions options = null); |
| 2680 | public virtual Task<ClientResult> GetConversationItemAsync(string conversationId, string itemId, IEnumerable<IncludedConversationItemProperty> include = null, RequestOptions options = null); |
| 2681 | public virtual CollectionResult GetConversationItems(string conversationId, long? limit = null, string order = null, string after = null, IEnumerable<IncludedConversationItemProperty> include = null, RequestOptions options = null); |
| 2682 | public virtual AsyncCollectionResult GetConversationItemsAsync(string conversationId, long? limit = null, string order = null, string after = null, IEnumerable<IncludedConversationItemProperty> include = null, RequestOptions options = null); |
| 2683 | public virtual ClientResult UpdateConversation(string conversationId, BinaryContent content, RequestOptions options = null); |
| 2684 | public virtual Task<ClientResult> UpdateConversationAsync(string conversationId, BinaryContent content, RequestOptions options = null); |
| 2685 | } |
| 2686 | [Experimental("OPENAI001")] |
| 2687 | public readonly partial struct IncludedConversationItemProperty : IEquatable<IncludedConversationItemProperty> { |
| 2688 | public IncludedConversationItemProperty(string value); |
| 2689 | public static IncludedConversationItemProperty CodeInterpreterCallOutputs { get; } |
| 2690 | public static IncludedConversationItemProperty ComputerCallOutputImageUri { get; } |
| 2691 | public static IncludedConversationItemProperty FileSearchCallResults { get; } |
| 2692 | public static IncludedConversationItemProperty MessageInputImageUri { get; } |
| 2693 | public static IncludedConversationItemProperty MessageOutputTextLogprobs { get; } |
| 2694 | public static IncludedConversationItemProperty ReasoningEncryptedContent { get; } |
| 2695 | public static IncludedConversationItemProperty WebSearchCallActionSources { get; } |
| 2696 | public static IncludedConversationItemProperty WebSearchCallResults { get; } |
| 2697 | public readonly bool Equals(IncludedConversationItemProperty other); |
| 2698 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2699 | public override readonly bool Equals(object obj); |
| 2700 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2701 | public override readonly int GetHashCode(); |
| 2702 | public static bool operator ==(IncludedConversationItemProperty left, IncludedConversationItemProperty right); |
| 2703 | public static implicit operator IncludedConversationItemProperty(string value); |
| 2704 | public static implicit operator IncludedConversationItemProperty?(string value); |
| 2705 | public static bool operator !=(IncludedConversationItemProperty left, IncludedConversationItemProperty right); |
| 2706 | public override readonly string ToString(); |
| 2707 | } |
| 2708 | } |
| 2709 | namespace OpenAI.Embeddings { |
| 2710 | public class EmbeddingClient { |
| 2711 | protected EmbeddingClient(); |
| 2712 | protected internal EmbeddingClient(ClientPipeline pipeline, string model, OpenAIClientOptions options); |
| 2713 | public EmbeddingClient(string model, ApiKeyCredential credential, OpenAIClientOptions options); |
| 2714 | public EmbeddingClient(string model, ApiKeyCredential credential); |
| 2715 | [Experimental("OPENAI001")] |
| 2716 | public EmbeddingClient(string model, AuthenticationPolicy authenticationPolicy, OpenAIClientOptions options); |
| 2717 | [Experimental("OPENAI001")] |
| 2718 | public EmbeddingClient(string model, AuthenticationPolicy authenticationPolicy); |
| 2719 | public EmbeddingClient(string model, string apiKey); |
| 2720 | [Experimental("OPENAI001")] |
| 2721 | public Uri Endpoint { get; } |
| 2722 | [Experimental("OPENAI001")] |
| 2723 | public string Model { get; } |
| 2724 | public ClientPipeline Pipeline { get; } |
| 2725 | public virtual ClientResult<OpenAIEmbedding> GenerateEmbedding(string input, EmbeddingGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 2726 | public virtual Task<ClientResult<OpenAIEmbedding>> GenerateEmbeddingAsync(string input, EmbeddingGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 2727 | public virtual ClientResult GenerateEmbeddings(BinaryContent content, RequestOptions options = null); |
| 2728 | public virtual ClientResult<OpenAIEmbeddingCollection> GenerateEmbeddings(IEnumerable<ReadOnlyMemory<int>> inputs, EmbeddingGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 2729 | public virtual ClientResult<OpenAIEmbeddingCollection> GenerateEmbeddings(IEnumerable<string> inputs, EmbeddingGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 2730 | public virtual Task<ClientResult> GenerateEmbeddingsAsync(BinaryContent content, RequestOptions options = null); |
| 2731 | public virtual Task<ClientResult<OpenAIEmbeddingCollection>> GenerateEmbeddingsAsync(IEnumerable<ReadOnlyMemory<int>> inputs, EmbeddingGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 2732 | public virtual Task<ClientResult<OpenAIEmbeddingCollection>> GenerateEmbeddingsAsync(IEnumerable<string> inputs, EmbeddingGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 2733 | } |
| 2734 | public class EmbeddingGenerationOptions : IJsonModel<EmbeddingGenerationOptions>, IPersistableModel<EmbeddingGenerationOptions> { |
| 2735 | public int? Dimensions { get; set; } |
| 2736 | public string EndUserId { get; set; } |
| 2737 | [Serialization.JsonIgnore] |
| 2738 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2739 | [Experimental("SCME0001")] |
| 2740 | public ref JsonPatch Patch { get; } |
| 2741 | [Experimental("OPENAI001")] |
| 2742 | protected virtual EmbeddingGenerationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2743 | [Experimental("OPENAI001")] |
| 2744 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2745 | [Experimental("OPENAI001")] |
| 2746 | protected virtual EmbeddingGenerationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2747 | [Experimental("OPENAI001")] |
| 2748 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2749 | } |
| 2750 | public class EmbeddingTokenUsage : IJsonModel<EmbeddingTokenUsage>, IPersistableModel<EmbeddingTokenUsage> { |
| 2751 | public int InputTokenCount { get; } |
| 2752 | [Serialization.JsonIgnore] |
| 2753 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2754 | [Experimental("SCME0001")] |
| 2755 | public ref JsonPatch Patch { get; } |
| 2756 | public int TotalTokenCount { get; } |
| 2757 | [Experimental("OPENAI001")] |
| 2758 | protected virtual EmbeddingTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2759 | [Experimental("OPENAI001")] |
| 2760 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2761 | [Experimental("OPENAI001")] |
| 2762 | protected virtual EmbeddingTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2763 | [Experimental("OPENAI001")] |
| 2764 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2765 | } |
| 2766 | public class OpenAIEmbedding : IJsonModel<OpenAIEmbedding>, IPersistableModel<OpenAIEmbedding> { |
| 2767 | public int Index { get; } |
| 2768 | [Serialization.JsonIgnore] |
| 2769 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2770 | [Experimental("SCME0001")] |
| 2771 | public ref JsonPatch Patch { get; } |
| 2772 | [Experimental("OPENAI001")] |
| 2773 | protected virtual OpenAIEmbedding JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2774 | [Experimental("OPENAI001")] |
| 2775 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2776 | [Experimental("OPENAI001")] |
| 2777 | protected virtual OpenAIEmbedding PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2778 | [Experimental("OPENAI001")] |
| 2779 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2780 | public ReadOnlyMemory<float> ToFloats(); |
| 2781 | } |
| 2782 | public class OpenAIEmbeddingCollection : ObjectModel.ReadOnlyCollection<OpenAIEmbedding>, IJsonModel<OpenAIEmbeddingCollection>, IPersistableModel<OpenAIEmbeddingCollection> { |
| 2783 | public string Model { get; } |
| 2784 | [Serialization.JsonIgnore] |
| 2785 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2786 | [Experimental("SCME0001")] |
| 2787 | public ref JsonPatch Patch { get; } |
| 2788 | public EmbeddingTokenUsage Usage { get; } |
| 2789 | [Experimental("OPENAI001")] |
| 2790 | protected virtual OpenAIEmbeddingCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2791 | [Experimental("OPENAI001")] |
| 2792 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2793 | [Experimental("OPENAI001")] |
| 2794 | public static explicit operator OpenAIEmbeddingCollection(ClientResult result); |
| 2795 | [Experimental("OPENAI001")] |
| 2796 | protected virtual OpenAIEmbeddingCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2797 | [Experimental("OPENAI001")] |
| 2798 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2799 | } |
| 2800 | public static class OpenAIEmbeddingsModelFactory { |
| 2801 | public static EmbeddingTokenUsage EmbeddingTokenUsage(int inputTokenCount = 0, int totalTokenCount = 0); |
| 2802 | public static OpenAIEmbedding OpenAIEmbedding(int index = 0, IEnumerable<float> vector = null); |
| 2803 | public static OpenAIEmbeddingCollection OpenAIEmbeddingCollection(IEnumerable<OpenAIEmbedding> items = null, string model = null, EmbeddingTokenUsage usage = null); |
| 2804 | } |
| 2805 | } |
| 2806 | namespace OpenAI.Evals { |
| 2807 | [Experimental("OPENAI001")] |
| 2808 | public class EvaluationClient { |
| 2809 | protected EvaluationClient(); |
| 2810 | public EvaluationClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 2811 | public EvaluationClient(ApiKeyCredential credential); |
| 2812 | public EvaluationClient(AuthenticationPolicy authenticationPolicy, OpenAIClientOptions options); |
| 2813 | public EvaluationClient(AuthenticationPolicy authenticationPolicy); |
| 2814 | protected internal EvaluationClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 2815 | public EvaluationClient(string apiKey); |
| 2816 | [Experimental("OPENAI001")] |
| 2817 | public Uri Endpoint { get; } |
| 2818 | public ClientPipeline Pipeline { get; } |
| 2819 | public virtual ClientResult CancelEvaluationRun(string evaluationId, string evaluationRunId, RequestOptions options); |
| 2820 | public virtual Task<ClientResult> CancelEvaluationRunAsync(string evaluationId, string evaluationRunId, RequestOptions options); |
| 2821 | public virtual ClientResult CreateEvaluation(BinaryContent content, RequestOptions options = null); |
| 2822 | public virtual Task<ClientResult> CreateEvaluationAsync(BinaryContent content, RequestOptions options = null); |
| 2823 | public virtual ClientResult CreateEvaluationRun(string evaluationId, BinaryContent content, RequestOptions options = null); |
| 2824 | public virtual Task<ClientResult> CreateEvaluationRunAsync(string evaluationId, BinaryContent content, RequestOptions options = null); |
| 2825 | public virtual ClientResult DeleteEvaluation(string evaluationId, RequestOptions options); |
| 2826 | public virtual Task<ClientResult> DeleteEvaluationAsync(string evaluationId, RequestOptions options); |
| 2827 | public virtual ClientResult DeleteEvaluationRun(string evaluationId, string evaluationRunId, RequestOptions options); |
| 2828 | public virtual Task<ClientResult> DeleteEvaluationRunAsync(string evaluationId, string evaluationRunId, RequestOptions options); |
| 2829 | public virtual ClientResult GetEvaluation(string evaluationId, RequestOptions options); |
| 2830 | public virtual Task<ClientResult> GetEvaluationAsync(string evaluationId, RequestOptions options); |
| 2831 | public virtual ClientResult GetEvaluationRun(string evaluationId, string evaluationRunId, RequestOptions options); |
| 2832 | public virtual Task<ClientResult> GetEvaluationRunAsync(string evaluationId, string evaluationRunId, RequestOptions options); |
| 2833 | public virtual ClientResult GetEvaluationRunOutputItem(string evaluationId, string evaluationRunId, string outputItemId, RequestOptions options); |
| 2834 | public virtual Task<ClientResult> GetEvaluationRunOutputItemAsync(string evaluationId, string evaluationRunId, string outputItemId, RequestOptions options); |
| 2835 | public virtual ClientResult GetEvaluationRunOutputItems(string evaluationId, string evaluationRunId, int? limit, string order, string after, string outputItemStatus, RequestOptions options); |
| 2836 | public virtual Task<ClientResult> GetEvaluationRunOutputItemsAsync(string evaluationId, string evaluationRunId, int? limit, string order, string after, string outputItemStatus, RequestOptions options); |
| 2837 | public virtual ClientResult GetEvaluationRuns(string evaluationId, int? limit, string order, string after, string evaluationRunStatus, RequestOptions options); |
| 2838 | public virtual Task<ClientResult> GetEvaluationRunsAsync(string evaluationId, int? limit, string order, string after, string evaluationRunStatus, RequestOptions options); |
| 2839 | public virtual ClientResult GetEvaluations(int? limit, string orderBy, string order, string after, RequestOptions options); |
| 2840 | public virtual Task<ClientResult> GetEvaluationsAsync(int? limit, string orderBy, string order, string after, RequestOptions options); |
| 2841 | public virtual ClientResult UpdateEvaluation(string evaluationId, BinaryContent content, RequestOptions options = null); |
| 2842 | public virtual Task<ClientResult> UpdateEvaluationAsync(string evaluationId, BinaryContent content, RequestOptions options = null); |
| 2843 | } |
| 2844 | } |
| 2845 | namespace OpenAI.Files { |
| 2846 | public class FileDeletionResult : IJsonModel<FileDeletionResult>, IPersistableModel<FileDeletionResult> { |
| 2847 | public bool Deleted { get; } |
| 2848 | public string FileId { get; } |
| 2849 | [Experimental("OPENAI001")] |
| 2850 | protected virtual FileDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2851 | [Experimental("OPENAI001")] |
| 2852 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2853 | [Experimental("OPENAI001")] |
| 2854 | public static explicit operator FileDeletionResult(ClientResult result); |
| 2855 | [Experimental("OPENAI001")] |
| 2856 | protected virtual FileDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2857 | [Experimental("OPENAI001")] |
| 2858 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2859 | } |
| 2860 | public enum FilePurpose { |
| 2861 | Assistants = 0, |
| 2862 | AssistantsOutput = 1, |
| 2863 | Batch = 2, |
| 2864 | BatchOutput = 3, |
| 2865 | FineTune = 4, |
| 2866 | FineTuneResults = 5, |
| 2867 | Vision = 6, |
| 2868 | UserData = 7, |
| 2869 | Evaluations = 8 |
| 2870 | } |
| 2871 | [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.")] |
| 2872 | public enum FileStatus { |
| 2873 | Uploaded = 0, |
| 2874 | Processed = 1, |
| 2875 | Error = 2 |
| 2876 | } |
| 2877 | public readonly partial struct FileUploadPurpose : IEquatable<FileUploadPurpose> { |
| 2878 | public FileUploadPurpose(string value); |
| 2879 | public static FileUploadPurpose Assistants { get; } |
| 2880 | public static FileUploadPurpose Batch { get; } |
| 2881 | [Experimental("OPENAI001")] |
| 2882 | public static FileUploadPurpose Evaluations { get; } |
| 2883 | public static FileUploadPurpose FineTune { get; } |
| 2884 | [Experimental("OPENAI001")] |
| 2885 | public static FileUploadPurpose UserData { get; } |
| 2886 | public static FileUploadPurpose Vision { get; } |
| 2887 | public readonly bool Equals(FileUploadPurpose other); |
| 2888 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2889 | public override readonly bool Equals(object obj); |
| 2890 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2891 | public override readonly int GetHashCode(); |
| 2892 | public static bool operator ==(FileUploadPurpose left, FileUploadPurpose right); |
| 2893 | public static implicit operator FileUploadPurpose(string value); |
| 2894 | public static implicit operator FileUploadPurpose?(string value); |
| 2895 | public static bool operator !=(FileUploadPurpose left, FileUploadPurpose right); |
| 2896 | public override readonly string ToString(); |
| 2897 | } |
| 2898 | public class OpenAIFile : IJsonModel<OpenAIFile>, IPersistableModel<OpenAIFile> { |
| 2899 | public DateTimeOffset CreatedAt { get; } |
| 2900 | [Experimental("OPENAI001")] |
| 2901 | public DateTimeOffset? ExpiresAt { get; } |
| 2902 | public string Filename { get; } |
| 2903 | public string Id { get; } |
| 2904 | public FilePurpose Purpose { get; } |
| 2905 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 2906 | public int? SizeInBytes { get; } |
| 2907 | [Experimental("OPENAI001")] |
| 2908 | public long? SizeInBytesLong { get; } |
| 2909 | [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.")] |
| 2910 | public FileStatus Status { get; } |
| 2911 | [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.")] |
| 2912 | public string StatusDetails { get; } |
| 2913 | [Experimental("OPENAI001")] |
| 2914 | protected virtual OpenAIFile JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2915 | [Experimental("OPENAI001")] |
| 2916 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2917 | [Experimental("OPENAI001")] |
| 2918 | public static explicit operator OpenAIFile(ClientResult result); |
| 2919 | [Experimental("OPENAI001")] |
| 2920 | protected virtual OpenAIFile PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2921 | [Experimental("OPENAI001")] |
| 2922 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2923 | } |
| 2924 | public class OpenAIFileClient { |
| 2925 | protected OpenAIFileClient(); |
| 2926 | public OpenAIFileClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 2927 | public OpenAIFileClient(ApiKeyCredential credential); |
| 2928 | [Experimental("OPENAI001")] |
| 2929 | public OpenAIFileClient(AuthenticationPolicy authenticationPolicy, OpenAIClientOptions options); |
| 2930 | [Experimental("OPENAI001")] |
| 2931 | public OpenAIFileClient(AuthenticationPolicy authenticationPolicy); |
| 2932 | protected internal OpenAIFileClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 2933 | public OpenAIFileClient(string apiKey); |
| 2934 | [Experimental("OPENAI001")] |
| 2935 | public Uri Endpoint { get; } |
| 2936 | public ClientPipeline Pipeline { get; } |
| 2937 | [Experimental("OPENAI001")] |
| 2938 | public virtual ClientResult AddUploadPart(string uploadId, BinaryContent content, string contentType, RequestOptions options = null); |
| 2939 | [Experimental("OPENAI001")] |
| 2940 | public virtual Task<ClientResult> AddUploadPartAsync(string uploadId, BinaryContent content, string contentType, RequestOptions options = null); |
| 2941 | [Experimental("OPENAI001")] |
| 2942 | public virtual ClientResult CancelUpload(string uploadId, RequestOptions options = null); |
| 2943 | [Experimental("OPENAI001")] |
| 2944 | public virtual Task<ClientResult> CancelUploadAsync(string uploadId, RequestOptions options = null); |
| 2945 | [Experimental("OPENAI001")] |
| 2946 | public virtual ClientResult CompleteUpload(string uploadId, BinaryContent content, RequestOptions options = null); |
| 2947 | [Experimental("OPENAI001")] |
| 2948 | public virtual Task<ClientResult> CompleteUploadAsync(string uploadId, BinaryContent content, RequestOptions options = null); |
| 2949 | [Experimental("OPENAI001")] |
| 2950 | public virtual ClientResult CreateUpload(BinaryContent content, RequestOptions options = null); |
| 2951 | [Experimental("OPENAI001")] |
| 2952 | public virtual Task<ClientResult> CreateUploadAsync(BinaryContent content, RequestOptions options = null); |
| 2953 | public virtual ClientResult DeleteFile(string fileId, RequestOptions options); |
| 2954 | public virtual ClientResult<FileDeletionResult> DeleteFile(string fileId, CancellationToken cancellationToken = default); |
| 2955 | public virtual Task<ClientResult> DeleteFileAsync(string fileId, RequestOptions options); |
| 2956 | public virtual Task<ClientResult<FileDeletionResult>> DeleteFileAsync(string fileId, CancellationToken cancellationToken = default); |
| 2957 | public virtual ClientResult DownloadFile(string fileId, RequestOptions options); |
| 2958 | public virtual ClientResult<BinaryData> DownloadFile(string fileId, CancellationToken cancellationToken = default); |
| 2959 | public virtual Task<ClientResult> DownloadFileAsync(string fileId, RequestOptions options); |
| 2960 | public virtual Task<ClientResult<BinaryData>> DownloadFileAsync(string fileId, CancellationToken cancellationToken = default); |
| 2961 | public virtual ClientResult GetFile(string fileId, RequestOptions options); |
| 2962 | public virtual ClientResult<OpenAIFile> GetFile(string fileId, CancellationToken cancellationToken = default); |
| 2963 | public virtual Task<ClientResult> GetFileAsync(string fileId, RequestOptions options); |
| 2964 | public virtual Task<ClientResult<OpenAIFile>> GetFileAsync(string fileId, CancellationToken cancellationToken = default); |
| 2965 | public virtual ClientResult<OpenAIFileCollection> GetFiles(FilePurpose purpose, CancellationToken cancellationToken = default); |
| 2966 | public virtual ClientResult GetFiles(string purpose, RequestOptions options); |
| 2967 | [Experimental("OPENAI001")] |
| 2968 | public virtual ClientResult GetFiles(string purpose, long? limit, string order, string after, RequestOptions options); |
| 2969 | public virtual ClientResult<OpenAIFileCollection> GetFiles(CancellationToken cancellationToken = default); |
| 2970 | public virtual Task<ClientResult<OpenAIFileCollection>> GetFilesAsync(FilePurpose purpose, CancellationToken cancellationToken = default); |
| 2971 | public virtual Task<ClientResult> GetFilesAsync(string purpose, RequestOptions options); |
| 2972 | [Experimental("OPENAI001")] |
| 2973 | public virtual Task<ClientResult> GetFilesAsync(string purpose, long? limit, string order, string after, RequestOptions options); |
| 2974 | public virtual Task<ClientResult<OpenAIFileCollection>> GetFilesAsync(CancellationToken cancellationToken = default); |
| 2975 | public virtual ClientResult<OpenAIFile> UploadFile(BinaryData file, string filename, FileUploadPurpose purpose); |
| 2976 | public virtual ClientResult UploadFile(BinaryContent content, string contentType, RequestOptions options = null); |
| 2977 | public virtual ClientResult<OpenAIFile> UploadFile(Stream file, string filename, FileUploadPurpose purpose, CancellationToken cancellationToken = default); |
| 2978 | public virtual ClientResult<OpenAIFile> UploadFile(string filePath, FileUploadPurpose purpose); |
| 2979 | public virtual Task<ClientResult<OpenAIFile>> UploadFileAsync(BinaryData file, string filename, FileUploadPurpose purpose); |
| 2980 | public virtual Task<ClientResult> UploadFileAsync(BinaryContent content, string contentType, RequestOptions options = null); |
| 2981 | public virtual Task<ClientResult<OpenAIFile>> UploadFileAsync(Stream file, string filename, FileUploadPurpose purpose, CancellationToken cancellationToken = default); |
| 2982 | public virtual Task<ClientResult<OpenAIFile>> UploadFileAsync(string filePath, FileUploadPurpose purpose); |
| 2983 | } |
| 2984 | public class OpenAIFileCollection : ObjectModel.ReadOnlyCollection<OpenAIFile>, IJsonModel<OpenAIFileCollection>, IPersistableModel<OpenAIFileCollection> { |
| 2985 | [Experimental("OPENAI001")] |
| 2986 | protected virtual OpenAIFileCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 2987 | [Experimental("OPENAI001")] |
| 2988 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 2989 | [Experimental("OPENAI001")] |
| 2990 | public static explicit operator OpenAIFileCollection(ClientResult result); |
| 2991 | [Experimental("OPENAI001")] |
| 2992 | protected virtual OpenAIFileCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 2993 | [Experimental("OPENAI001")] |
| 2994 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 2995 | } |
| 2996 | public static class OpenAIFilesModelFactory { |
| 2997 | public static FileDeletionResult FileDeletionResult(string fileId = null, bool deleted = false); |
| 2998 | public static OpenAIFileCollection OpenAIFileCollection(IEnumerable<OpenAIFile> items = null); |
| 2999 | [Experimental("OPENAI001")] |
| 3000 | 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, long? sizeInBytesLong = null); |
| 3001 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3002 | public static OpenAIFile OpenAIFileInfo(string id, int? sizeInBytes, DateTimeOffset createdAt, string filename, FilePurpose purpose, FileStatus status, string statusDetails); |
| 3003 | } |
| 3004 | } |
| 3005 | namespace OpenAI.FineTuning { |
| 3006 | [Experimental("OPENAI001")] |
| 3007 | public class FineTuningCheckpoint : IJsonModel<FineTuningCheckpoint>, IPersistableModel<FineTuningCheckpoint> { |
| 3008 | public DateTimeOffset CreatedAt { get; } |
| 3009 | public string Id { get; } |
| 3010 | public string JobId { get; } |
| 3011 | public FineTuningCheckpointMetrics Metrics { get; } |
| 3012 | public string ModelId { get; } |
| 3013 | public int StepNumber { get; } |
| 3014 | protected virtual FineTuningCheckpoint JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3015 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3016 | protected virtual FineTuningCheckpoint PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3017 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3018 | public override string ToString(); |
| 3019 | } |
| 3020 | [Experimental("OPENAI001")] |
| 3021 | public class FineTuningCheckpointMetrics : IJsonModel<FineTuningCheckpointMetrics>, IPersistableModel<FineTuningCheckpointMetrics> { |
| 3022 | public float? FullValidLoss { get; } |
| 3023 | public float? FullValidMeanTokenAccuracy { get; } |
| 3024 | public int StepNumber { get; } |
| 3025 | public float? TrainLoss { get; } |
| 3026 | public float? TrainMeanTokenAccuracy { get; } |
| 3027 | public float? ValidLoss { get; } |
| 3028 | public float? ValidMeanTokenAccuracy { get; } |
| 3029 | protected virtual FineTuningCheckpointMetrics JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3030 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3031 | protected virtual FineTuningCheckpointMetrics PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3032 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3033 | } |
| 3034 | [Experimental("OPENAI001")] |
| 3035 | public class FineTuningClient { |
| 3036 | protected FineTuningClient(); |
| 3037 | public FineTuningClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 3038 | public FineTuningClient(ApiKeyCredential credential); |
| 3039 | public FineTuningClient(AuthenticationPolicy authenticationPolicy, OpenAIClientOptions options); |
| 3040 | public FineTuningClient(AuthenticationPolicy authenticationPolicy); |
| 3041 | protected internal FineTuningClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 3042 | protected internal FineTuningClient(ClientPipeline pipeline, Uri endpoint); |
| 3043 | public FineTuningClient(string apiKey); |
| 3044 | [Experimental("OPENAI001")] |
| 3045 | public Uri Endpoint { get; } |
| 3046 | public ClientPipeline Pipeline { get; } |
| 3047 | public virtual ClientResult CreateFineTuningCheckpointPermission(string fineTunedModelCheckpoint, BinaryContent content, RequestOptions options = null); |
| 3048 | public virtual Task<ClientResult> CreateFineTuningCheckpointPermissionAsync(string fineTunedModelCheckpoint, BinaryContent content, RequestOptions options = null); |
| 3049 | public virtual ClientResult DeleteFineTuningCheckpointPermission(string fineTunedModelCheckpoint, string permissionId, RequestOptions options); |
| 3050 | public virtual Task<ClientResult> DeleteFineTuningCheckpointPermissionAsync(string fineTunedModelCheckpoint, string permissionId, RequestOptions options); |
| 3051 | public virtual FineTuningJob FineTune(BinaryContent content, bool waitUntilCompleted, RequestOptions options); |
| 3052 | public virtual FineTuningJob FineTune(string baseModel, string trainingFileId, bool waitUntilCompleted, FineTuningOptions options = null, CancellationToken cancellationToken = default); |
| 3053 | public virtual Task<FineTuningJob> FineTuneAsync(BinaryContent content, bool waitUntilCompleted, RequestOptions options); |
| 3054 | public virtual Task<FineTuningJob> FineTuneAsync(string baseModel, string trainingFileId, bool waitUntilCompleted, FineTuningOptions options = null, CancellationToken cancellationToken = default); |
| 3055 | public virtual ClientResult GetFineTuningCheckpointPermissions(string fineTunedModelCheckpoint, string after, int? limit, string order, string projectId, RequestOptions options); |
| 3056 | public virtual Task<ClientResult> GetFineTuningCheckpointPermissionsAsync(string fineTunedModelCheckpoint, string after, int? limit, string order, string projectId, RequestOptions options); |
| 3057 | public virtual FineTuningJob GetJob(string jobId, CancellationToken cancellationToken = default); |
| 3058 | public virtual Task<FineTuningJob> GetJobAsync(string jobId, CancellationToken cancellationToken = default); |
| 3059 | public virtual CollectionResult<FineTuningJob> GetJobs(FineTuningJobCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 3060 | public virtual AsyncCollectionResult<FineTuningJob> GetJobsAsync(FineTuningJobCollectionOptions options = null, CancellationToken cancellationToken = default); |
| 3061 | public virtual ClientResult PauseFineTuningJob(string fineTuningJobId, RequestOptions options); |
| 3062 | public virtual Task<ClientResult> PauseFineTuningJobAsync(string fineTuningJobId, RequestOptions options); |
| 3063 | public virtual ClientResult ResumeFineTuningJob(string fineTuningJobId, RequestOptions options); |
| 3064 | public virtual Task<ClientResult> ResumeFineTuningJobAsync(string fineTuningJobId, RequestOptions options); |
| 3065 | } |
| 3066 | [Experimental("OPENAI001")] |
| 3067 | public class FineTuningError : IJsonModel<FineTuningError>, IPersistableModel<FineTuningError> { |
| 3068 | public string Code { get; } |
| 3069 | public string InvalidParameter { get; } |
| 3070 | public string Message { get; } |
| 3071 | protected virtual FineTuningError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3072 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3073 | protected virtual FineTuningError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3074 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3075 | } |
| 3076 | [Experimental("OPENAI001")] |
| 3077 | public class FineTuningEvent : IJsonModel<FineTuningEvent>, IPersistableModel<FineTuningEvent> { |
| 3078 | public string Level; |
| 3079 | public DateTimeOffset CreatedAt { get; } |
| 3080 | public BinaryData Data { get; } |
| 3081 | public string Id { get; } |
| 3082 | public FineTuningJobEventKind? Kind { get; } |
| 3083 | public string Message { get; } |
| 3084 | protected virtual FineTuningEvent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3085 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3086 | protected virtual FineTuningEvent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3087 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3088 | } |
| 3089 | [Experimental("OPENAI001")] |
| 3090 | public readonly partial struct FineTuningHyperparameters : IJsonModel<FineTuningHyperparameters>, IPersistableModel<FineTuningHyperparameters>, IJsonModel<object>, IPersistableModel<object> { |
| 3091 | public int BatchSize { get; } |
| 3092 | public int EpochCount { get; } |
| 3093 | public float LearningRateMultiplier { get; } |
| 3094 | } |
| 3095 | [Experimental("OPENAI001")] |
| 3096 | public class FineTuningIntegration : IJsonModel<FineTuningIntegration>, IPersistableModel<FineTuningIntegration> { |
| 3097 | protected virtual FineTuningIntegration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3098 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3099 | protected virtual FineTuningIntegration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3100 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3101 | } |
| 3102 | [Experimental("OPENAI001")] |
| 3103 | public class FineTuningJob : OperationResult { |
| 3104 | public string? Value; |
| 3105 | public string BaseModel { get; } |
| 3106 | public int BillableTrainedTokenCount { get; } |
| 3107 | public DateTimeOffset? EstimatedFinishAt { get; } |
| 3108 | [Obsolete("This property is deprecated. Use the MethodHyperparameters property instead.")] |
| 3109 | public FineTuningHyperparameters Hyperparameters { get; } |
| 3110 | public IReadOnlyList<FineTuningIntegration> Integrations { get; } |
| 3111 | public string JobId { get; } |
| 3112 | public IDictionary<string, string> Metadata { get; } |
| 3113 | public MethodHyperparameters? MethodHyperparameters { get; } |
| 3114 | public override ContinuationToken? RehydrationToken { get; protected set; } |
| 3115 | public IReadOnlyList<string> ResultFileIds { get; } |
| 3116 | public int? Seed { get; } |
| 3117 | public FineTuningStatus Status { get; } |
| 3118 | public string TrainingFileId { get; } |
| 3119 | public FineTuningTrainingMethod? TrainingMethod { get; } |
| 3120 | public string? UserProvidedSuffix { get; } |
| 3121 | public string ValidationFileId { get; } |
| 3122 | public virtual ClientResult Cancel(RequestOptions options); |
| 3123 | public virtual ClientResult CancelAndUpdate(CancellationToken cancellationToken = default); |
| 3124 | public virtual Task<ClientResult> CancelAndUpdateAsync(CancellationToken cancellationToken = default); |
| 3125 | public virtual Task<ClientResult> CancelAsync(RequestOptions options); |
| 3126 | public virtual CollectionResult<FineTuningCheckpoint> GetCheckpoints(GetCheckpointsOptions? options = null, CancellationToken cancellationToken = default); |
| 3127 | public virtual CollectionResult GetCheckpoints(string? after, int? limit, RequestOptions? options); |
| 3128 | public virtual AsyncCollectionResult<FineTuningCheckpoint> GetCheckpointsAsync(GetCheckpointsOptions? options = null, CancellationToken cancellationToken = default); |
| 3129 | public virtual AsyncCollectionResult GetCheckpointsAsync(string? after, int? limit, RequestOptions? options); |
| 3130 | public virtual CollectionResult<FineTuningEvent> GetEvents(GetEventsOptions options, CancellationToken cancellationToken = default); |
| 3131 | public virtual CollectionResult GetEvents(string? after, int? limit, RequestOptions options); |
| 3132 | public virtual AsyncCollectionResult<FineTuningEvent> GetEventsAsync(GetEventsOptions options, CancellationToken cancellationToken = default); |
| 3133 | public virtual AsyncCollectionResult GetEventsAsync(string? after, int? limit, RequestOptions options); |
| 3134 | public static FineTuningJob Rehydrate(FineTuningClient client, ContinuationToken rehydrationToken, RequestOptions options); |
| 3135 | public static FineTuningJob Rehydrate(FineTuningClient client, ContinuationToken rehydrationToken, CancellationToken cancellationToken = default); |
| 3136 | public static FineTuningJob Rehydrate(FineTuningClient client, string JobId, RequestOptions options); |
| 3137 | public static FineTuningJob Rehydrate(FineTuningClient client, string JobId, CancellationToken cancellationToken = default); |
| 3138 | public static Task<FineTuningJob> RehydrateAsync(FineTuningClient client, ContinuationToken rehydrationToken, RequestOptions options); |
| 3139 | public static Task<FineTuningJob> RehydrateAsync(FineTuningClient client, ContinuationToken rehydrationToken, CancellationToken cancellationToken = default); |
| 3140 | public static Task<FineTuningJob> RehydrateAsync(FineTuningClient client, string JobId, RequestOptions options); |
| 3141 | public static Task<FineTuningJob> RehydrateAsync(FineTuningClient client, string JobId, CancellationToken cancellationToken = default); |
| 3142 | public override ClientResult UpdateStatus(RequestOptions? options); |
| 3143 | public ClientResult UpdateStatus(CancellationToken cancellationToken = default); |
| 3144 | public override ValueTask<ClientResult> UpdateStatusAsync(RequestOptions? options); |
| 3145 | public ValueTask<ClientResult> UpdateStatusAsync(CancellationToken cancellationToken = default); |
| 3146 | public override void WaitForCompletion(CancellationToken cancellationToken = default); |
| 3147 | public override ValueTask WaitForCompletionAsync(CancellationToken cancellationToken = default); |
| 3148 | } |
| 3149 | [Experimental("OPENAI001")] |
| 3150 | public class FineTuningJobCollectionOptions { |
| 3151 | public string AfterJobId { get; set; } |
| 3152 | public int? PageSize { get; set; } |
| 3153 | } |
| 3154 | [Experimental("OPENAI001")] |
| 3155 | public readonly partial struct FineTuningJobEventKind : IEquatable<FineTuningJobEventKind> { |
| 3156 | public FineTuningJobEventKind(string value); |
| 3157 | public static FineTuningJobEventKind Message { get; } |
| 3158 | public static FineTuningJobEventKind Metrics { get; } |
| 3159 | public readonly bool Equals(FineTuningJobEventKind other); |
| 3160 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3161 | public override readonly bool Equals(object obj); |
| 3162 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3163 | public override readonly int GetHashCode(); |
| 3164 | public static bool operator ==(FineTuningJobEventKind left, FineTuningJobEventKind right); |
| 3165 | public static implicit operator FineTuningJobEventKind(string value); |
| 3166 | public static implicit operator FineTuningJobEventKind?(string value); |
| 3167 | public static bool operator !=(FineTuningJobEventKind left, FineTuningJobEventKind right); |
| 3168 | public override readonly string ToString(); |
| 3169 | } |
| 3170 | [Experimental("OPENAI001")] |
| 3171 | public class FineTuningOptions : IJsonModel<FineTuningOptions>, IPersistableModel<FineTuningOptions> { |
| 3172 | public IList<FineTuningIntegration> Integrations { get; } |
| 3173 | public IDictionary<string, string> Metadata { get; } |
| 3174 | public int? Seed { get; set; } |
| 3175 | public string Suffix { get; set; } |
| 3176 | public FineTuningTrainingMethod TrainingMethod { get; set; } |
| 3177 | public string ValidationFile { get; set; } |
| 3178 | protected virtual FineTuningOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3179 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3180 | protected virtual FineTuningOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3181 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3182 | } |
| 3183 | [Experimental("OPENAI001")] |
| 3184 | public readonly partial struct FineTuningStatus : IEquatable<string>, IEquatable<FineTuningStatus> { |
| 3185 | public FineTuningStatus(string value); |
| 3186 | public static FineTuningStatus Cancelled { get; } |
| 3187 | public static FineTuningStatus Failed { get; } |
| 3188 | public bool InProgress { get; } |
| 3189 | public static FineTuningStatus Queued { get; } |
| 3190 | public static FineTuningStatus Running { get; } |
| 3191 | public static FineTuningStatus Succeeded { get; } |
| 3192 | public static FineTuningStatus ValidatingFiles { get; } |
| 3193 | public readonly bool Equals(FineTuningStatus other); |
| 3194 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3195 | public override readonly bool Equals(object obj); |
| 3196 | public readonly bool Equals(string other); |
| 3197 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3198 | public override readonly int GetHashCode(); |
| 3199 | public static bool operator ==(FineTuningStatus left, FineTuningStatus right); |
| 3200 | public static implicit operator FineTuningStatus(string value); |
| 3201 | public static implicit operator FineTuningStatus?(string value); |
| 3202 | public static bool operator !=(FineTuningStatus left, FineTuningStatus right); |
| 3203 | public override readonly string ToString(); |
| 3204 | } |
| 3205 | [Experimental("OPENAI001")] |
| 3206 | public class FineTuningTrainingMethod : IJsonModel<FineTuningTrainingMethod>, IPersistableModel<FineTuningTrainingMethod> { |
| 3207 | public static FineTuningTrainingMethod CreateDirectPreferenceOptimization(HyperparameterBatchSize batchSize = null, HyperparameterEpochCount epochCount = null, HyperparameterLearningRate learningRate = null, HyperparameterBetaFactor betaFactor = null); |
| 3208 | public static FineTuningTrainingMethod CreateSupervised(HyperparameterBatchSize batchSize = null, HyperparameterEpochCount epochCount = null, HyperparameterLearningRate learningRate = null); |
| 3209 | protected virtual FineTuningTrainingMethod JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3210 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3211 | protected virtual FineTuningTrainingMethod PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3212 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3213 | } |
| 3214 | [Experimental("OPENAI001")] |
| 3215 | public class GetCheckpointsOptions { |
| 3216 | public string AfterCheckpointId { get; set; } |
| 3217 | public int? PageSize { get; set; } |
| 3218 | } |
| 3219 | [Experimental("OPENAI001")] |
| 3220 | public class GetEventsOptions { |
| 3221 | public string AfterEventId { get; set; } |
| 3222 | public int? PageSize { get; set; } |
| 3223 | } |
| 3224 | [Experimental("OPENAI001")] |
| 3225 | public class HyperparameterBatchSize : IEquatable<int>, IEquatable<string>, IJsonModel<HyperparameterBatchSize>, IPersistableModel<HyperparameterBatchSize> { |
| 3226 | public HyperparameterBatchSize(int batchSize); |
| 3227 | public static HyperparameterBatchSize CreateAuto(); |
| 3228 | public static HyperparameterBatchSize CreateSize(int batchSize); |
| 3229 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3230 | public bool Equals(int other); |
| 3231 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3232 | public override bool Equals(object other); |
| 3233 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3234 | public bool Equals(string other); |
| 3235 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3236 | public override int GetHashCode(); |
| 3237 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3238 | public static bool operator ==(HyperparameterBatchSize first, HyperparameterBatchSize second); |
| 3239 | public static implicit operator HyperparameterBatchSize(int batchSize); |
| 3240 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3241 | public static bool operator !=(HyperparameterBatchSize first, HyperparameterBatchSize second); |
| 3242 | } |
| 3243 | [Experimental("OPENAI001")] |
| 3244 | public class HyperparameterBetaFactor : IEquatable<int>, IEquatable<string>, IJsonModel<HyperparameterBetaFactor>, IPersistableModel<HyperparameterBetaFactor> { |
| 3245 | public HyperparameterBetaFactor(int beta); |
| 3246 | public static HyperparameterBetaFactor CreateAuto(); |
| 3247 | public static HyperparameterBetaFactor CreateBeta(int beta); |
| 3248 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3249 | public bool Equals(int other); |
| 3250 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3251 | public override bool Equals(object other); |
| 3252 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3253 | public bool Equals(string other); |
| 3254 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3255 | public override int GetHashCode(); |
| 3256 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3257 | public static bool operator ==(HyperparameterBetaFactor first, HyperparameterBetaFactor second); |
| 3258 | public static implicit operator HyperparameterBetaFactor(int beta); |
| 3259 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3260 | public static bool operator !=(HyperparameterBetaFactor first, HyperparameterBetaFactor second); |
| 3261 | } |
| 3262 | [Experimental("OPENAI001")] |
| 3263 | public class HyperparameterEpochCount : IEquatable<int>, IEquatable<string>, IJsonModel<HyperparameterEpochCount>, IPersistableModel<HyperparameterEpochCount> { |
| 3264 | public HyperparameterEpochCount(int epochCount); |
| 3265 | public static HyperparameterEpochCount CreateAuto(); |
| 3266 | public static HyperparameterEpochCount CreateEpochCount(int epochCount); |
| 3267 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3268 | public bool Equals(int other); |
| 3269 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3270 | public override bool Equals(object other); |
| 3271 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3272 | public bool Equals(string other); |
| 3273 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3274 | public override int GetHashCode(); |
| 3275 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3276 | public static bool operator ==(HyperparameterEpochCount first, HyperparameterEpochCount second); |
| 3277 | public static implicit operator HyperparameterEpochCount(int epochCount); |
| 3278 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3279 | public static bool operator !=(HyperparameterEpochCount first, HyperparameterEpochCount second); |
| 3280 | } |
| 3281 | [Experimental("OPENAI001")] |
| 3282 | public class HyperparameterLearningRate : IEquatable<double>, IEquatable<int>, IEquatable<string>, IJsonModel<HyperparameterLearningRate>, IPersistableModel<HyperparameterLearningRate> { |
| 3283 | public HyperparameterLearningRate(double learningRateMultiplier); |
| 3284 | public static HyperparameterLearningRate CreateAuto(); |
| 3285 | public static HyperparameterLearningRate CreateMultiplier(double learningRateMultiplier); |
| 3286 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3287 | public bool Equals(double other); |
| 3288 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3289 | public bool Equals(int other); |
| 3290 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3291 | public override bool Equals(object other); |
| 3292 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3293 | public bool Equals(string other); |
| 3294 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3295 | public override int GetHashCode(); |
| 3296 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3297 | public static bool operator ==(HyperparameterLearningRate first, HyperparameterLearningRate second); |
| 3298 | public static implicit operator HyperparameterLearningRate(double learningRateMultiplier); |
| 3299 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3300 | public static bool operator !=(HyperparameterLearningRate first, HyperparameterLearningRate second); |
| 3301 | } |
| 3302 | [Experimental("OPENAI001")] |
| 3303 | public class HyperparametersForDPO : MethodHyperparameters, IJsonModel<HyperparametersForDPO>, IPersistableModel<HyperparametersForDPO> { |
| 3304 | public int BatchSize { get; } |
| 3305 | public float Beta { get; } |
| 3306 | public int EpochCount { get; } |
| 3307 | public float LearningRateMultiplier { get; } |
| 3308 | protected virtual HyperparametersForDPO JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3309 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3310 | protected virtual HyperparametersForDPO PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3311 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3312 | } |
| 3313 | [Experimental("OPENAI001")] |
| 3314 | public class HyperparametersForSupervised : MethodHyperparameters, IJsonModel<HyperparametersForSupervised>, IPersistableModel<HyperparametersForSupervised> { |
| 3315 | public int BatchSize { get; } |
| 3316 | public int EpochCount { get; } |
| 3317 | public float LearningRateMultiplier { get; } |
| 3318 | protected virtual HyperparametersForSupervised JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3319 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3320 | protected virtual HyperparametersForSupervised PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3321 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3322 | } |
| 3323 | [Experimental("OPENAI001")] |
| 3324 | public class MethodHyperparameters { |
| 3325 | } |
| 3326 | [Experimental("OPENAI001")] |
| 3327 | public class WeightsAndBiasesIntegration : FineTuningIntegration, IJsonModel<WeightsAndBiasesIntegration>, IPersistableModel<WeightsAndBiasesIntegration> { |
| 3328 | public WeightsAndBiasesIntegration(string projectName); |
| 3329 | public string DisplayName { get; set; } |
| 3330 | public string EntityName { get; set; } |
| 3331 | public string ProjectName { get; set; } |
| 3332 | public IList<string> Tags { get; } |
| 3333 | protected override FineTuningIntegration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3334 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3335 | protected override FineTuningIntegration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3336 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3337 | } |
| 3338 | } |
| 3339 | namespace OpenAI.Graders { |
| 3340 | [Experimental("OPENAI001")] |
| 3341 | public class FineTuneReinforcementHyperparameters : IJsonModel<FineTuneReinforcementHyperparameters>, IPersistableModel<FineTuneReinforcementHyperparameters> { |
| 3342 | public BinaryData BatchSize { get; set; } |
| 3343 | public BinaryData ComputeMultiplier { get; set; } |
| 3344 | public BinaryData EvalInterval { get; set; } |
| 3345 | public BinaryData EvalSamples { get; set; } |
| 3346 | public BinaryData LearningRateMultiplier { get; set; } |
| 3347 | public BinaryData NEpochs { get; set; } |
| 3348 | protected virtual FineTuneReinforcementHyperparameters JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3349 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3350 | protected virtual FineTuneReinforcementHyperparameters PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3351 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3352 | } |
| 3353 | [Experimental("OPENAI001")] |
| 3354 | [PersistableModelProxy(typeof(UnknownGrader))] |
| 3355 | public class Grader : IJsonModel<Grader>, IPersistableModel<Grader> { |
| 3356 | protected virtual Grader JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3357 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3358 | protected virtual Grader PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3359 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3360 | } |
| 3361 | [Experimental("OPENAI001")] |
| 3362 | public class GraderClient { |
| 3363 | protected GraderClient(); |
| 3364 | public GraderClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 3365 | public GraderClient(ApiKeyCredential credential); |
| 3366 | public GraderClient(AuthenticationPolicy authenticationPolicy, OpenAIClientOptions options); |
| 3367 | public GraderClient(AuthenticationPolicy authenticationPolicy); |
| 3368 | protected internal GraderClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 3369 | public GraderClient(string apiKey); |
| 3370 | [Experimental("OPENAI001")] |
| 3371 | public Uri Endpoint { get; } |
| 3372 | public ClientPipeline Pipeline { get; } |
| 3373 | public virtual ClientResult RunGrader(BinaryContent content, RequestOptions options = null); |
| 3374 | public virtual Task<ClientResult> RunGraderAsync(BinaryContent content, RequestOptions options = null); |
| 3375 | public virtual ClientResult ValidateGrader(BinaryContent content, RequestOptions options = null); |
| 3376 | public virtual Task<ClientResult> ValidateGraderAsync(BinaryContent content, RequestOptions options = null); |
| 3377 | } |
| 3378 | [Experimental("OPENAI001")] |
| 3379 | public class GraderLabelModel : Grader, IJsonModel<GraderLabelModel>, IPersistableModel<GraderLabelModel> { |
| 3380 | public IList<string> Labels { get; } |
| 3381 | public string Model { get; set; } |
| 3382 | public string Name { get; set; } |
| 3383 | public IList<string> PassingLabels { get; } |
| 3384 | protected override Grader JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3385 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3386 | protected override Grader PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3387 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3388 | } |
| 3389 | [Experimental("OPENAI001")] |
| 3390 | public class GraderMulti : Grader, IJsonModel<GraderMulti>, IPersistableModel<GraderMulti> { |
| 3391 | public GraderMulti(string name, BinaryData graders, string calculateOutput); |
| 3392 | public string CalculateOutput { get; set; } |
| 3393 | public BinaryData Graders { get; set; } |
| 3394 | public string Name { get; set; } |
| 3395 | protected override Grader JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3396 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3397 | protected override Grader PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3398 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3399 | } |
| 3400 | [Experimental("OPENAI001")] |
| 3401 | public class GraderPython : Grader, IJsonModel<GraderPython>, IPersistableModel<GraderPython> { |
| 3402 | public GraderPython(string name, string source); |
| 3403 | public string ImageTag { get; set; } |
| 3404 | public string Name { get; set; } |
| 3405 | public string Source { get; set; } |
| 3406 | protected override Grader JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3407 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3408 | protected override Grader PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3409 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3410 | } |
| 3411 | [Experimental("OPENAI001")] |
| 3412 | public class GraderScoreModel : Grader, IJsonModel<GraderScoreModel>, IPersistableModel<GraderScoreModel> { |
| 3413 | public string Model { get; set; } |
| 3414 | public string Name { get; set; } |
| 3415 | public IList<float> Range { get; } |
| 3416 | public BinaryData SamplingParams { get; set; } |
| 3417 | protected override Grader JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3418 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3419 | protected override Grader PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3420 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3421 | } |
| 3422 | [Experimental("OPENAI001")] |
| 3423 | public class GraderStringCheck : Grader, IJsonModel<GraderStringCheck>, IPersistableModel<GraderStringCheck> { |
| 3424 | public GraderStringCheck(string name, string input, string reference, GraderStringCheckOperation operation); |
| 3425 | public string Input { get; set; } |
| 3426 | public string Name { get; set; } |
| 3427 | public GraderStringCheckOperation Operation { get; set; } |
| 3428 | public string Reference { get; set; } |
| 3429 | protected override Grader JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3430 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3431 | protected override Grader PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3432 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3433 | } |
| 3434 | [Experimental("OPENAI001")] |
| 3435 | public readonly partial struct GraderStringCheckOperation : IEquatable<GraderStringCheckOperation> { |
| 3436 | public GraderStringCheckOperation(string value); |
| 3437 | public static GraderStringCheckOperation Eq { get; } |
| 3438 | public static GraderStringCheckOperation Ilike { get; } |
| 3439 | public static GraderStringCheckOperation Like { get; } |
| 3440 | public static GraderStringCheckOperation Ne { get; } |
| 3441 | public readonly bool Equals(GraderStringCheckOperation other); |
| 3442 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3443 | public override readonly bool Equals(object obj); |
| 3444 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3445 | public override readonly int GetHashCode(); |
| 3446 | public static bool operator ==(GraderStringCheckOperation left, GraderStringCheckOperation right); |
| 3447 | public static implicit operator GraderStringCheckOperation(string value); |
| 3448 | public static implicit operator GraderStringCheckOperation?(string value); |
| 3449 | public static bool operator !=(GraderStringCheckOperation left, GraderStringCheckOperation right); |
| 3450 | public override readonly string ToString(); |
| 3451 | } |
| 3452 | [Experimental("OPENAI001")] |
| 3453 | public class GraderTextSimilarity : Grader, IJsonModel<GraderTextSimilarity>, IPersistableModel<GraderTextSimilarity> { |
| 3454 | public GraderTextSimilarity(string name, string input, string reference, GraderTextSimilarityEvaluationMetric evaluationMetric); |
| 3455 | public GraderTextSimilarityEvaluationMetric EvaluationMetric { get; set; } |
| 3456 | public string Input { get; set; } |
| 3457 | public string Name { get; set; } |
| 3458 | public string Reference { get; set; } |
| 3459 | protected override Grader JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3460 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3461 | protected override Grader PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3462 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3463 | } |
| 3464 | [Experimental("OPENAI001")] |
| 3465 | public readonly partial struct GraderTextSimilarityEvaluationMetric : IEquatable<GraderTextSimilarityEvaluationMetric> { |
| 3466 | public GraderTextSimilarityEvaluationMetric(string value); |
| 3467 | public static GraderTextSimilarityEvaluationMetric Bleu { get; } |
| 3468 | public static GraderTextSimilarityEvaluationMetric FuzzyMatch { get; } |
| 3469 | public static GraderTextSimilarityEvaluationMetric Gleu { get; } |
| 3470 | public static GraderTextSimilarityEvaluationMetric Meteor { get; } |
| 3471 | public static GraderTextSimilarityEvaluationMetric Rouge1 { get; } |
| 3472 | public static GraderTextSimilarityEvaluationMetric Rouge2 { get; } |
| 3473 | public static GraderTextSimilarityEvaluationMetric Rouge3 { get; } |
| 3474 | public static GraderTextSimilarityEvaluationMetric Rouge4 { get; } |
| 3475 | public static GraderTextSimilarityEvaluationMetric Rouge5 { get; } |
| 3476 | public static GraderTextSimilarityEvaluationMetric RougeL { get; } |
| 3477 | public readonly bool Equals(GraderTextSimilarityEvaluationMetric other); |
| 3478 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3479 | public override readonly bool Equals(object obj); |
| 3480 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3481 | public override readonly int GetHashCode(); |
| 3482 | public static bool operator ==(GraderTextSimilarityEvaluationMetric left, GraderTextSimilarityEvaluationMetric right); |
| 3483 | public static implicit operator GraderTextSimilarityEvaluationMetric(string value); |
| 3484 | public static implicit operator GraderTextSimilarityEvaluationMetric?(string value); |
| 3485 | public static bool operator !=(GraderTextSimilarityEvaluationMetric left, GraderTextSimilarityEvaluationMetric right); |
| 3486 | public override readonly string ToString(); |
| 3487 | } |
| 3488 | [Experimental("OPENAI001")] |
| 3489 | public readonly partial struct GraderType : IEquatable<GraderType> { |
| 3490 | public GraderType(string value); |
| 3491 | public static GraderType LabelModel { get; } |
| 3492 | public static GraderType Multi { get; } |
| 3493 | public static GraderType Python { get; } |
| 3494 | public static GraderType ScoreModel { get; } |
| 3495 | public static GraderType StringCheck { get; } |
| 3496 | public static GraderType TextSimilarity { get; } |
| 3497 | public readonly bool Equals(GraderType other); |
| 3498 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3499 | public override readonly bool Equals(object obj); |
| 3500 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3501 | public override readonly int GetHashCode(); |
| 3502 | public static bool operator ==(GraderType left, GraderType right); |
| 3503 | public static implicit operator GraderType(string value); |
| 3504 | public static implicit operator GraderType?(string value); |
| 3505 | public static bool operator !=(GraderType left, GraderType right); |
| 3506 | public override readonly string ToString(); |
| 3507 | } |
| 3508 | [Experimental("OPENAI001")] |
| 3509 | public class RunGraderRequest : IJsonModel<RunGraderRequest>, IPersistableModel<RunGraderRequest> { |
| 3510 | public BinaryData Grader { get; } |
| 3511 | public BinaryData Item { get; } |
| 3512 | public string ModelSample { get; } |
| 3513 | protected virtual RunGraderRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3514 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3515 | protected virtual RunGraderRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3516 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3517 | } |
| 3518 | [Experimental("OPENAI001")] |
| 3519 | public class RunGraderResponse : IJsonModel<RunGraderResponse>, IPersistableModel<RunGraderResponse> { |
| 3520 | public RunGraderResponseMetadata Metadata { get; } |
| 3521 | public BinaryData ModelGraderTokenUsagePerModel { get; } |
| 3522 | public float Reward { get; } |
| 3523 | public BinaryData SubRewards { get; } |
| 3524 | protected virtual RunGraderResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3525 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3526 | public static explicit operator RunGraderResponse(ClientResult result); |
| 3527 | protected virtual RunGraderResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3528 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3529 | } |
| 3530 | [Experimental("OPENAI001")] |
| 3531 | public class RunGraderResponseMetadata : IJsonModel<RunGraderResponseMetadata>, IPersistableModel<RunGraderResponseMetadata> { |
| 3532 | public RunGraderResponseMetadataErrors Errors { get; } |
| 3533 | public float ExecutionTime { get; } |
| 3534 | public string Kind { get; } |
| 3535 | public string Name { get; } |
| 3536 | public string SampledModelName { get; } |
| 3537 | public BinaryData Scores { get; } |
| 3538 | public int? TokenUsage { get; } |
| 3539 | protected virtual RunGraderResponseMetadata JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3540 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3541 | protected virtual RunGraderResponseMetadata PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3542 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3543 | } |
| 3544 | [Experimental("OPENAI001")] |
| 3545 | public class RunGraderResponseMetadataErrors : IJsonModel<RunGraderResponseMetadataErrors>, IPersistableModel<RunGraderResponseMetadataErrors> { |
| 3546 | public bool FormulaParseError { get; } |
| 3547 | public bool InvalidVariableError { get; } |
| 3548 | public bool ModelGraderParseError { get; } |
| 3549 | public bool ModelGraderRefusalError { get; } |
| 3550 | public bool ModelGraderServerError { get; } |
| 3551 | public string ModelGraderServerErrorDetails { get; } |
| 3552 | public bool OtherError { get; } |
| 3553 | public bool PythonGraderRuntimeError { get; } |
| 3554 | public string PythonGraderRuntimeErrorDetails { get; } |
| 3555 | public bool PythonGraderServerError { get; } |
| 3556 | public string PythonGraderServerErrorType { get; } |
| 3557 | public bool SampleParseError { get; } |
| 3558 | public bool TruncatedObservationError { get; } |
| 3559 | public bool UnresponsiveRewardError { get; } |
| 3560 | protected virtual RunGraderResponseMetadataErrors JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3561 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3562 | protected virtual RunGraderResponseMetadataErrors PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3563 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3564 | } |
| 3565 | [Experimental("OPENAI001")] |
| 3566 | public class UnknownGrader : Grader, IJsonModel<Grader>, IPersistableModel<Grader> { |
| 3567 | protected override Grader JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3568 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3569 | protected override Grader PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3570 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3571 | } |
| 3572 | [Experimental("OPENAI001")] |
| 3573 | public class ValidateGraderRequest : IJsonModel<ValidateGraderRequest>, IPersistableModel<ValidateGraderRequest> { |
| 3574 | public BinaryData Grader { get; } |
| 3575 | protected virtual ValidateGraderRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3576 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3577 | protected virtual ValidateGraderRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3578 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3579 | } |
| 3580 | [Experimental("OPENAI001")] |
| 3581 | public class ValidateGraderResponse : IJsonModel<ValidateGraderResponse>, IPersistableModel<ValidateGraderResponse> { |
| 3582 | public BinaryData Grader { get; } |
| 3583 | protected virtual ValidateGraderResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3584 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3585 | public static explicit operator ValidateGraderResponse(ClientResult result); |
| 3586 | protected virtual ValidateGraderResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3587 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3588 | } |
| 3589 | } |
| 3590 | namespace OpenAI.Images { |
| 3591 | public class GeneratedImage : IJsonModel<GeneratedImage>, IPersistableModel<GeneratedImage> { |
| 3592 | public BinaryData ImageBytes { get; } |
| 3593 | public Uri ImageUri { get; } |
| 3594 | public string RevisedPrompt { get; } |
| 3595 | [Experimental("OPENAI001")] |
| 3596 | protected virtual GeneratedImage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3597 | [Experimental("OPENAI001")] |
| 3598 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3599 | [Experimental("OPENAI001")] |
| 3600 | protected virtual GeneratedImage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3601 | [Experimental("OPENAI001")] |
| 3602 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3603 | } |
| 3604 | [Experimental("OPENAI001")] |
| 3605 | public readonly partial struct GeneratedImageBackground : IEquatable<GeneratedImageBackground> { |
| 3606 | public GeneratedImageBackground(string value); |
| 3607 | public static GeneratedImageBackground Auto { get; } |
| 3608 | public static GeneratedImageBackground Opaque { get; } |
| 3609 | public static GeneratedImageBackground Transparent { get; } |
| 3610 | public readonly bool Equals(GeneratedImageBackground other); |
| 3611 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3612 | public override readonly bool Equals(object obj); |
| 3613 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3614 | public override readonly int GetHashCode(); |
| 3615 | public static bool operator ==(GeneratedImageBackground left, GeneratedImageBackground right); |
| 3616 | public static implicit operator GeneratedImageBackground(string value); |
| 3617 | public static implicit operator GeneratedImageBackground?(string value); |
| 3618 | public static bool operator !=(GeneratedImageBackground left, GeneratedImageBackground right); |
| 3619 | public override readonly string ToString(); |
| 3620 | } |
| 3621 | public class GeneratedImageCollection : ObjectModel.ReadOnlyCollection<GeneratedImage>, IJsonModel<GeneratedImageCollection>, IPersistableModel<GeneratedImageCollection> { |
| 3622 | [Experimental("OPENAI001")] |
| 3623 | public GeneratedImageBackground? Background { get; } |
| 3624 | public DateTimeOffset CreatedAt { get; } |
| 3625 | [Experimental("OPENAI001")] |
| 3626 | public GeneratedImageFileFormat? OutputFileFormat { get; } |
| 3627 | [Experimental("OPENAI001")] |
| 3628 | public GeneratedImageQuality? Quality { get; } |
| 3629 | [Experimental("OPENAI001")] |
| 3630 | public GeneratedImageSize? Size { get; } |
| 3631 | [Experimental("OPENAI001")] |
| 3632 | public ImageTokenUsage Usage { get; } |
| 3633 | [Experimental("OPENAI001")] |
| 3634 | protected virtual GeneratedImageCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3635 | [Experimental("OPENAI001")] |
| 3636 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3637 | [Experimental("OPENAI001")] |
| 3638 | public static explicit operator GeneratedImageCollection(ClientResult result); |
| 3639 | [Experimental("OPENAI001")] |
| 3640 | protected virtual GeneratedImageCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3641 | [Experimental("OPENAI001")] |
| 3642 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3643 | } |
| 3644 | [Experimental("OPENAI001")] |
| 3645 | public readonly partial struct GeneratedImageFileFormat : IEquatable<GeneratedImageFileFormat> { |
| 3646 | public GeneratedImageFileFormat(string value); |
| 3647 | public static GeneratedImageFileFormat Jpeg { get; } |
| 3648 | public static GeneratedImageFileFormat Png { get; } |
| 3649 | public static GeneratedImageFileFormat Webp { get; } |
| 3650 | public readonly bool Equals(GeneratedImageFileFormat other); |
| 3651 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3652 | public override readonly bool Equals(object obj); |
| 3653 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3654 | public override readonly int GetHashCode(); |
| 3655 | public static bool operator ==(GeneratedImageFileFormat left, GeneratedImageFileFormat right); |
| 3656 | public static implicit operator GeneratedImageFileFormat(string value); |
| 3657 | public static implicit operator GeneratedImageFileFormat?(string value); |
| 3658 | public static bool operator !=(GeneratedImageFileFormat left, GeneratedImageFileFormat right); |
| 3659 | public override readonly string ToString(); |
| 3660 | } |
| 3661 | public readonly partial struct GeneratedImageFormat : IEquatable<GeneratedImageFormat> { |
| 3662 | public GeneratedImageFormat(string value); |
| 3663 | public static GeneratedImageFormat Bytes { get; } |
| 3664 | public static GeneratedImageFormat Uri { get; } |
| 3665 | public readonly bool Equals(GeneratedImageFormat other); |
| 3666 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3667 | public override readonly bool Equals(object obj); |
| 3668 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3669 | public override readonly int GetHashCode(); |
| 3670 | public static bool operator ==(GeneratedImageFormat left, GeneratedImageFormat right); |
| 3671 | public static implicit operator GeneratedImageFormat(string value); |
| 3672 | public static implicit operator GeneratedImageFormat?(string value); |
| 3673 | public static bool operator !=(GeneratedImageFormat left, GeneratedImageFormat right); |
| 3674 | public override readonly string ToString(); |
| 3675 | } |
| 3676 | [Experimental("OPENAI001")] |
| 3677 | public readonly partial struct GeneratedImageModerationLevel : IEquatable<GeneratedImageModerationLevel> { |
| 3678 | public GeneratedImageModerationLevel(string value); |
| 3679 | public static GeneratedImageModerationLevel Auto { get; } |
| 3680 | public static GeneratedImageModerationLevel Low { get; } |
| 3681 | public readonly bool Equals(GeneratedImageModerationLevel other); |
| 3682 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3683 | public override readonly bool Equals(object obj); |
| 3684 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3685 | public override readonly int GetHashCode(); |
| 3686 | public static bool operator ==(GeneratedImageModerationLevel left, GeneratedImageModerationLevel right); |
| 3687 | public static implicit operator GeneratedImageModerationLevel(string value); |
| 3688 | public static implicit operator GeneratedImageModerationLevel?(string value); |
| 3689 | public static bool operator !=(GeneratedImageModerationLevel left, GeneratedImageModerationLevel right); |
| 3690 | public override readonly string ToString(); |
| 3691 | } |
| 3692 | public readonly partial struct GeneratedImageQuality : IEquatable<GeneratedImageQuality> { |
| 3693 | public GeneratedImageQuality(string value); |
| 3694 | [Experimental("OPENAI001")] |
| 3695 | public static GeneratedImageQuality Auto { get; } |
| 3696 | [Experimental("OPENAI001")] |
| 3697 | public static GeneratedImageQuality HD { get; } |
| 3698 | public static GeneratedImageQuality High { get; } |
| 3699 | [Experimental("OPENAI001")] |
| 3700 | public static GeneratedImageQuality Low { get; } |
| 3701 | [Experimental("OPENAI001")] |
| 3702 | public static GeneratedImageQuality Medium { get; } |
| 3703 | public static GeneratedImageQuality Standard { get; } |
| 3704 | public readonly bool Equals(GeneratedImageQuality other); |
| 3705 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3706 | public override readonly bool Equals(object obj); |
| 3707 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3708 | public override readonly int GetHashCode(); |
| 3709 | public static bool operator ==(GeneratedImageQuality left, GeneratedImageQuality right); |
| 3710 | public static implicit operator GeneratedImageQuality(string value); |
| 3711 | public static implicit operator GeneratedImageQuality?(string value); |
| 3712 | public static bool operator !=(GeneratedImageQuality left, GeneratedImageQuality right); |
| 3713 | public override readonly string ToString(); |
| 3714 | } |
| 3715 | public readonly partial struct GeneratedImageSize : IEquatable<GeneratedImageSize> { |
| 3716 | public static readonly GeneratedImageSize W1024xH1024; |
| 3717 | [Experimental("OPENAI001")] |
| 3718 | public static readonly GeneratedImageSize W1024xH1536; |
| 3719 | public static readonly GeneratedImageSize W1024xH1792; |
| 3720 | [Experimental("OPENAI001")] |
| 3721 | public static readonly GeneratedImageSize W1536xH1024; |
| 3722 | public static readonly GeneratedImageSize W1792xH1024; |
| 3723 | public static readonly GeneratedImageSize W256xH256; |
| 3724 | public static readonly GeneratedImageSize W512xH512; |
| 3725 | public GeneratedImageSize(int width, int height); |
| 3726 | [Experimental("OPENAI001")] |
| 3727 | public static GeneratedImageSize Auto { get; } |
| 3728 | public readonly bool Equals(GeneratedImageSize other); |
| 3729 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3730 | public override readonly bool Equals(object obj); |
| 3731 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3732 | public override readonly int GetHashCode(); |
| 3733 | public static bool operator ==(GeneratedImageSize left, GeneratedImageSize right); |
| 3734 | public static bool operator !=(GeneratedImageSize left, GeneratedImageSize right); |
| 3735 | public override readonly string ToString(); |
| 3736 | } |
| 3737 | public readonly partial struct GeneratedImageStyle : IEquatable<GeneratedImageStyle> { |
| 3738 | public GeneratedImageStyle(string value); |
| 3739 | public static GeneratedImageStyle Natural { get; } |
| 3740 | public static GeneratedImageStyle Vivid { get; } |
| 3741 | public readonly bool Equals(GeneratedImageStyle other); |
| 3742 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3743 | public override readonly bool Equals(object obj); |
| 3744 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3745 | public override readonly int GetHashCode(); |
| 3746 | public static bool operator ==(GeneratedImageStyle left, GeneratedImageStyle right); |
| 3747 | public static implicit operator GeneratedImageStyle(string value); |
| 3748 | public static implicit operator GeneratedImageStyle?(string value); |
| 3749 | public static bool operator !=(GeneratedImageStyle left, GeneratedImageStyle right); |
| 3750 | public override readonly string ToString(); |
| 3751 | } |
| 3752 | public class ImageClient { |
| 3753 | protected ImageClient(); |
| 3754 | protected internal ImageClient(ClientPipeline pipeline, string model, OpenAIClientOptions options); |
| 3755 | public ImageClient(string model, ApiKeyCredential credential, OpenAIClientOptions options); |
| 3756 | public ImageClient(string model, ApiKeyCredential credential); |
| 3757 | [Experimental("OPENAI001")] |
| 3758 | public ImageClient(string model, AuthenticationPolicy authenticationPolicy, OpenAIClientOptions options); |
| 3759 | [Experimental("OPENAI001")] |
| 3760 | public ImageClient(string model, AuthenticationPolicy authenticationPolicy); |
| 3761 | public ImageClient(string model, string apiKey); |
| 3762 | [Experimental("OPENAI001")] |
| 3763 | public Uri Endpoint { get; } |
| 3764 | [Experimental("OPENAI001")] |
| 3765 | public string Model { get; } |
| 3766 | public ClientPipeline Pipeline { get; } |
| 3767 | public virtual ClientResult<GeneratedImage> GenerateImage(string prompt, ImageGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 3768 | public virtual Task<ClientResult<GeneratedImage>> GenerateImageAsync(string prompt, ImageGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 3769 | public virtual ClientResult<GeneratedImage> GenerateImageEdit(Stream image, string imageFilename, string prompt, ImageEditOptions options = null, CancellationToken cancellationToken = default); |
| 3770 | public virtual ClientResult<GeneratedImage> GenerateImageEdit(Stream image, string imageFilename, string prompt, Stream mask, string maskFilename, ImageEditOptions options = null, CancellationToken cancellationToken = default); |
| 3771 | public virtual ClientResult<GeneratedImage> GenerateImageEdit(string imageFilePath, string prompt, ImageEditOptions options = null); |
| 3772 | public virtual ClientResult<GeneratedImage> GenerateImageEdit(string imageFilePath, string prompt, string maskFilePath, ImageEditOptions options = null); |
| 3773 | public virtual Task<ClientResult<GeneratedImage>> GenerateImageEditAsync(Stream image, string imageFilename, string prompt, ImageEditOptions options = null, CancellationToken cancellationToken = default); |
| 3774 | public virtual Task<ClientResult<GeneratedImage>> GenerateImageEditAsync(Stream image, string imageFilename, string prompt, Stream mask, string maskFilename, ImageEditOptions options = null, CancellationToken cancellationToken = default); |
| 3775 | public virtual Task<ClientResult<GeneratedImage>> GenerateImageEditAsync(string imageFilePath, string prompt, ImageEditOptions options = null); |
| 3776 | public virtual Task<ClientResult<GeneratedImage>> GenerateImageEditAsync(string imageFilePath, string prompt, string maskFilePath, ImageEditOptions options = null); |
| 3777 | public virtual ClientResult GenerateImageEdits(BinaryContent content, string contentType, RequestOptions options = null); |
| 3778 | public virtual ClientResult<GeneratedImageCollection> GenerateImageEdits(Stream image, string imageFilename, string prompt, int imageCount, ImageEditOptions options = null, CancellationToken cancellationToken = default); |
| 3779 | public virtual ClientResult<GeneratedImageCollection> GenerateImageEdits(Stream image, string imageFilename, string prompt, Stream mask, string maskFilename, int imageCount, ImageEditOptions options = null, CancellationToken cancellationToken = default); |
| 3780 | public virtual ClientResult<GeneratedImageCollection> GenerateImageEdits(string imageFilePath, string prompt, int imageCount, ImageEditOptions options = null); |
| 3781 | public virtual ClientResult<GeneratedImageCollection> GenerateImageEdits(string imageFilePath, string prompt, string maskFilePath, int imageCount, ImageEditOptions options = null); |
| 3782 | public virtual Task<ClientResult> GenerateImageEditsAsync(BinaryContent content, string contentType, RequestOptions options = null); |
| 3783 | public virtual Task<ClientResult<GeneratedImageCollection>> GenerateImageEditsAsync(Stream image, string imageFilename, string prompt, int imageCount, ImageEditOptions options = null, CancellationToken cancellationToken = default); |
| 3784 | public virtual Task<ClientResult<GeneratedImageCollection>> GenerateImageEditsAsync(Stream image, string imageFilename, string prompt, Stream mask, string maskFilename, int imageCount, ImageEditOptions options = null, CancellationToken cancellationToken = default); |
| 3785 | public virtual Task<ClientResult<GeneratedImageCollection>> GenerateImageEditsAsync(string imageFilePath, string prompt, int imageCount, ImageEditOptions options = null); |
| 3786 | public virtual Task<ClientResult<GeneratedImageCollection>> GenerateImageEditsAsync(string imageFilePath, string prompt, string maskFilePath, int imageCount, ImageEditOptions options = null); |
| 3787 | public virtual ClientResult GenerateImages(BinaryContent content, RequestOptions options = null); |
| 3788 | public virtual ClientResult<GeneratedImageCollection> GenerateImages(string prompt, int imageCount, ImageGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 3789 | public virtual Task<ClientResult> GenerateImagesAsync(BinaryContent content, RequestOptions options = null); |
| 3790 | public virtual Task<ClientResult<GeneratedImageCollection>> GenerateImagesAsync(string prompt, int imageCount, ImageGenerationOptions options = null, CancellationToken cancellationToken = default); |
| 3791 | public virtual ClientResult<GeneratedImage> GenerateImageVariation(Stream image, string imageFilename, ImageVariationOptions options = null, CancellationToken cancellationToken = default); |
| 3792 | public virtual ClientResult<GeneratedImage> GenerateImageVariation(string imageFilePath, ImageVariationOptions options = null); |
| 3793 | public virtual Task<ClientResult<GeneratedImage>> GenerateImageVariationAsync(Stream image, string imageFilename, ImageVariationOptions options = null, CancellationToken cancellationToken = default); |
| 3794 | public virtual Task<ClientResult<GeneratedImage>> GenerateImageVariationAsync(string imageFilePath, ImageVariationOptions options = null); |
| 3795 | public virtual ClientResult GenerateImageVariations(BinaryContent content, string contentType, RequestOptions options = null); |
| 3796 | public virtual ClientResult<GeneratedImageCollection> GenerateImageVariations(Stream image, string imageFilename, int imageCount, ImageVariationOptions options = null, CancellationToken cancellationToken = default); |
| 3797 | public virtual ClientResult<GeneratedImageCollection> GenerateImageVariations(string imageFilePath, int imageCount, ImageVariationOptions options = null); |
| 3798 | public virtual Task<ClientResult> GenerateImageVariationsAsync(BinaryContent content, string contentType, RequestOptions options = null); |
| 3799 | public virtual Task<ClientResult<GeneratedImageCollection>> GenerateImageVariationsAsync(Stream image, string imageFilename, int imageCount, ImageVariationOptions options = null, CancellationToken cancellationToken = default); |
| 3800 | public virtual Task<ClientResult<GeneratedImageCollection>> GenerateImageVariationsAsync(string imageFilePath, int imageCount, ImageVariationOptions options = null); |
| 3801 | } |
| 3802 | public class ImageEditOptions : IJsonModel<ImageEditOptions>, IPersistableModel<ImageEditOptions> { |
| 3803 | [Experimental("OPENAI001")] |
| 3804 | public GeneratedImageBackground? Background { get; set; } |
| 3805 | public string EndUserId { get; set; } |
| 3806 | [Experimental("OPENAI001")] |
| 3807 | public ImageInputFidelity? InputFidelity { get; set; } |
| 3808 | [Experimental("OPENAI001")] |
| 3809 | public int? OutputCompressionFactor { get; set; } |
| 3810 | [Experimental("OPENAI001")] |
| 3811 | public GeneratedImageFileFormat? OutputFileFormat { get; set; } |
| 3812 | [Experimental("OPENAI001")] |
| 3813 | public GeneratedImageQuality? Quality { get; set; } |
| 3814 | public GeneratedImageFormat? ResponseFormat { get; set; } |
| 3815 | public GeneratedImageSize? Size { get; set; } |
| 3816 | [Experimental("OPENAI001")] |
| 3817 | protected virtual ImageEditOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3818 | [Experimental("OPENAI001")] |
| 3819 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3820 | [Experimental("OPENAI001")] |
| 3821 | protected virtual ImageEditOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3822 | [Experimental("OPENAI001")] |
| 3823 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3824 | } |
| 3825 | public class ImageGenerationOptions : IJsonModel<ImageGenerationOptions>, IPersistableModel<ImageGenerationOptions> { |
| 3826 | [Experimental("OPENAI001")] |
| 3827 | public GeneratedImageBackground? Background { get; set; } |
| 3828 | public string EndUserId { get; set; } |
| 3829 | [Experimental("OPENAI001")] |
| 3830 | public GeneratedImageModerationLevel? ModerationLevel { get; set; } |
| 3831 | [Experimental("OPENAI001")] |
| 3832 | public int? OutputCompressionFactor { get; set; } |
| 3833 | [Experimental("OPENAI001")] |
| 3834 | public GeneratedImageFileFormat? OutputFileFormat { get; set; } |
| 3835 | public GeneratedImageQuality? Quality { get; set; } |
| 3836 | public GeneratedImageFormat? ResponseFormat { get; set; } |
| 3837 | public GeneratedImageSize? Size { get; set; } |
| 3838 | public GeneratedImageStyle? Style { get; set; } |
| 3839 | [Experimental("OPENAI001")] |
| 3840 | protected virtual ImageGenerationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3841 | [Experimental("OPENAI001")] |
| 3842 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3843 | [Experimental("OPENAI001")] |
| 3844 | protected virtual ImageGenerationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3845 | [Experimental("OPENAI001")] |
| 3846 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3847 | } |
| 3848 | [Experimental("OPENAI001")] |
| 3849 | public readonly partial struct ImageInputFidelity : IEquatable<ImageInputFidelity> { |
| 3850 | public ImageInputFidelity(string value); |
| 3851 | public static ImageInputFidelity High { get; } |
| 3852 | public static ImageInputFidelity Low { get; } |
| 3853 | public readonly bool Equals(ImageInputFidelity other); |
| 3854 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3855 | public override readonly bool Equals(object obj); |
| 3856 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3857 | public override readonly int GetHashCode(); |
| 3858 | public static bool operator ==(ImageInputFidelity left, ImageInputFidelity right); |
| 3859 | public static implicit operator ImageInputFidelity(string value); |
| 3860 | public static implicit operator ImageInputFidelity?(string value); |
| 3861 | public static bool operator !=(ImageInputFidelity left, ImageInputFidelity right); |
| 3862 | public override readonly string ToString(); |
| 3863 | } |
| 3864 | [Experimental("OPENAI001")] |
| 3865 | public class ImageInputTokenUsageDetails : IJsonModel<ImageInputTokenUsageDetails>, IPersistableModel<ImageInputTokenUsageDetails> { |
| 3866 | public long ImageTokenCount { get; } |
| 3867 | public long TextTokenCount { get; } |
| 3868 | protected virtual ImageInputTokenUsageDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3869 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3870 | protected virtual ImageInputTokenUsageDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3871 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3872 | } |
| 3873 | [Experimental("OPENAI001")] |
| 3874 | public class ImageOutputTokenUsageDetails : IJsonModel<ImageOutputTokenUsageDetails>, IPersistableModel<ImageOutputTokenUsageDetails> { |
| 3875 | public long ImageTokenCount { get; } |
| 3876 | public long TextTokenCount { get; } |
| 3877 | protected virtual ImageOutputTokenUsageDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3878 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3879 | protected virtual ImageOutputTokenUsageDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3880 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3881 | } |
| 3882 | [Experimental("OPENAI001")] |
| 3883 | public class ImageTokenUsage : IJsonModel<ImageTokenUsage>, IPersistableModel<ImageTokenUsage> { |
| 3884 | public long InputTokenCount { get; } |
| 3885 | public ImageInputTokenUsageDetails InputTokenDetails { get; } |
| 3886 | public long OutputTokenCount { get; } |
| 3887 | public ImageOutputTokenUsageDetails OutputTokenDetails { get; } |
| 3888 | public long TotalTokenCount { get; } |
| 3889 | protected virtual ImageTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3890 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3891 | protected virtual ImageTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3892 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3893 | } |
| 3894 | public class ImageVariationOptions : IJsonModel<ImageVariationOptions>, IPersistableModel<ImageVariationOptions> { |
| 3895 | public string EndUserId { get; set; } |
| 3896 | public GeneratedImageFormat? ResponseFormat { get; set; } |
| 3897 | public GeneratedImageSize? Size { get; set; } |
| 3898 | [Experimental("OPENAI001")] |
| 3899 | protected virtual ImageVariationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3900 | [Experimental("OPENAI001")] |
| 3901 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3902 | [Experimental("OPENAI001")] |
| 3903 | protected virtual ImageVariationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3904 | [Experimental("OPENAI001")] |
| 3905 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3906 | } |
| 3907 | public static class OpenAIImagesModelFactory { |
| 3908 | public static GeneratedImage GeneratedImage(BinaryData imageBytes = null, Uri imageUri = null, string revisedPrompt = null); |
| 3909 | [Experimental("OPENAI001")] |
| 3910 | public static GeneratedImageCollection GeneratedImageCollection(DateTimeOffset createdAt = default, IEnumerable<GeneratedImage> items = null, GeneratedImageBackground? background = null, GeneratedImageFileFormat? outputFileFormat = null, GeneratedImageSize? size = null, GeneratedImageQuality? quality = null, ImageTokenUsage usage = null); |
| 3911 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 3912 | public static GeneratedImageCollection GeneratedImageCollection(DateTimeOffset createdAt, IEnumerable<GeneratedImage> items); |
| 3913 | [Experimental("OPENAI001")] |
| 3914 | public static ImageInputTokenUsageDetails ImageInputTokenUsageDetails(long textTokenCount = 0, long imageTokenCount = 0); |
| 3915 | [Experimental("OPENAI001")] |
| 3916 | public static ImageTokenUsage ImageTokenUsage(long inputTokenCount = 0, long outputTokenCount = 0, long totalTokenCount = 0, ImageInputTokenUsageDetails inputTokenDetails = null, ImageOutputTokenUsageDetails outputTokenDetails = null); |
| 3917 | } |
| 3918 | } |
| 3919 | namespace OpenAI.Models { |
| 3920 | public class ModelDeletionResult : IJsonModel<ModelDeletionResult>, IPersistableModel<ModelDeletionResult> { |
| 3921 | public bool Deleted { get; } |
| 3922 | public string ModelId { get; } |
| 3923 | [Experimental("OPENAI001")] |
| 3924 | protected virtual ModelDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3925 | [Experimental("OPENAI001")] |
| 3926 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3927 | [Experimental("OPENAI001")] |
| 3928 | public static explicit operator ModelDeletionResult(ClientResult result); |
| 3929 | [Experimental("OPENAI001")] |
| 3930 | protected virtual ModelDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3931 | [Experimental("OPENAI001")] |
| 3932 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3933 | } |
| 3934 | public class OpenAIModel : IJsonModel<OpenAIModel>, IPersistableModel<OpenAIModel> { |
| 3935 | public DateTimeOffset CreatedAt { get; } |
| 3936 | public string Id { get; } |
| 3937 | public string OwnedBy { get; } |
| 3938 | [Experimental("OPENAI001")] |
| 3939 | protected virtual OpenAIModel JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3940 | [Experimental("OPENAI001")] |
| 3941 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3942 | [Experimental("OPENAI001")] |
| 3943 | public static explicit operator OpenAIModel(ClientResult result); |
| 3944 | [Experimental("OPENAI001")] |
| 3945 | protected virtual OpenAIModel PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3946 | [Experimental("OPENAI001")] |
| 3947 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3948 | } |
| 3949 | public class OpenAIModelClient { |
| 3950 | protected OpenAIModelClient(); |
| 3951 | public OpenAIModelClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 3952 | public OpenAIModelClient(ApiKeyCredential credential); |
| 3953 | [Experimental("OPENAI001")] |
| 3954 | public OpenAIModelClient(AuthenticationPolicy authenticationPolicy, OpenAIClientOptions options); |
| 3955 | [Experimental("OPENAI001")] |
| 3956 | public OpenAIModelClient(AuthenticationPolicy authenticationPolicy); |
| 3957 | protected internal OpenAIModelClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 3958 | public OpenAIModelClient(string apiKey); |
| 3959 | [Experimental("OPENAI001")] |
| 3960 | public Uri Endpoint { get; } |
| 3961 | public ClientPipeline Pipeline { get; } |
| 3962 | public virtual ClientResult DeleteModel(string model, RequestOptions options); |
| 3963 | public virtual ClientResult<ModelDeletionResult> DeleteModel(string model, CancellationToken cancellationToken = default); |
| 3964 | public virtual Task<ClientResult> DeleteModelAsync(string model, RequestOptions options); |
| 3965 | public virtual Task<ClientResult<ModelDeletionResult>> DeleteModelAsync(string model, CancellationToken cancellationToken = default); |
| 3966 | public virtual ClientResult GetModel(string model, RequestOptions options); |
| 3967 | public virtual ClientResult<OpenAIModel> GetModel(string model, CancellationToken cancellationToken = default); |
| 3968 | public virtual Task<ClientResult> GetModelAsync(string model, RequestOptions options); |
| 3969 | public virtual Task<ClientResult<OpenAIModel>> GetModelAsync(string model, CancellationToken cancellationToken = default); |
| 3970 | public virtual ClientResult GetModels(RequestOptions options); |
| 3971 | public virtual ClientResult<OpenAIModelCollection> GetModels(CancellationToken cancellationToken = default); |
| 3972 | public virtual Task<ClientResult> GetModelsAsync(RequestOptions options); |
| 3973 | public virtual Task<ClientResult<OpenAIModelCollection>> GetModelsAsync(CancellationToken cancellationToken = default); |
| 3974 | } |
| 3975 | public class OpenAIModelCollection : ObjectModel.ReadOnlyCollection<OpenAIModel>, IJsonModel<OpenAIModelCollection>, IPersistableModel<OpenAIModelCollection> { |
| 3976 | [Experimental("OPENAI001")] |
| 3977 | protected virtual OpenAIModelCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 3978 | [Experimental("OPENAI001")] |
| 3979 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 3980 | [Experimental("OPENAI001")] |
| 3981 | public static explicit operator OpenAIModelCollection(ClientResult result); |
| 3982 | [Experimental("OPENAI001")] |
| 3983 | protected virtual OpenAIModelCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 3984 | [Experimental("OPENAI001")] |
| 3985 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 3986 | } |
| 3987 | public static class OpenAIModelsModelFactory { |
| 3988 | public static ModelDeletionResult ModelDeletionResult(string modelId = null, bool deleted = false); |
| 3989 | public static OpenAIModel OpenAIModel(string id = null, DateTimeOffset createdAt = default, string ownedBy = null); |
| 3990 | public static OpenAIModelCollection OpenAIModelCollection(IEnumerable<OpenAIModel> items = null); |
| 3991 | } |
| 3992 | } |
| 3993 | namespace OpenAI.Moderations { |
| 3994 | [Experimental("OPENAI001")] |
| 3995 | [Flags] |
| 3996 | public enum ModerationApplicableInputKinds { |
| 3997 | None = 0, |
| 3998 | Other = 1, |
| 3999 | Text = 2, |
| 4000 | Image = 4 |
| 4001 | } |
| 4002 | public class ModerationCategory { |
| 4003 | [Experimental("OPENAI001")] |
| 4004 | public ModerationApplicableInputKinds ApplicableInputKinds { get; } |
| 4005 | public bool Flagged { get; } |
| 4006 | public float Score { get; } |
| 4007 | } |
| 4008 | public class ModerationClient { |
| 4009 | protected ModerationClient(); |
| 4010 | protected internal ModerationClient(ClientPipeline pipeline, string model, OpenAIClientOptions options); |
| 4011 | public ModerationClient(string model, ApiKeyCredential credential, OpenAIClientOptions options); |
| 4012 | public ModerationClient(string model, ApiKeyCredential credential); |
| 4013 | [Experimental("OPENAI001")] |
| 4014 | public ModerationClient(string model, AuthenticationPolicy authenticationPolicy, OpenAIClientOptions options); |
| 4015 | [Experimental("OPENAI001")] |
| 4016 | public ModerationClient(string model, AuthenticationPolicy authenticationPolicy); |
| 4017 | public ModerationClient(string model, string apiKey); |
| 4018 | [Experimental("OPENAI001")] |
| 4019 | public Uri Endpoint { get; } |
| 4020 | [Experimental("OPENAI001")] |
| 4021 | public string Model { get; } |
| 4022 | public ClientPipeline Pipeline { get; } |
| 4023 | [Experimental("OPENAI001")] |
| 4024 | public virtual ClientResult ClassifyInputs(BinaryContent content, RequestOptions options = null); |
| 4025 | [Experimental("OPENAI001")] |
| 4026 | public virtual ClientResult<ModerationResult> ClassifyInputs(IEnumerable<ModerationInputPart> inputParts, CancellationToken cancellationToken = default); |
| 4027 | [Experimental("OPENAI001")] |
| 4028 | public virtual Task<ClientResult> ClassifyInputsAsync(BinaryContent content, RequestOptions options = null); |
| 4029 | [Experimental("OPENAI001")] |
| 4030 | public virtual Task<ClientResult<ModerationResult>> ClassifyInputsAsync(IEnumerable<ModerationInputPart> inputParts, CancellationToken cancellationToken = default); |
| 4031 | public virtual ClientResult ClassifyText(BinaryContent content, RequestOptions options = null); |
| 4032 | public virtual ClientResult<ModerationResultCollection> ClassifyText(IEnumerable<string> inputs, CancellationToken cancellationToken = default); |
| 4033 | public virtual ClientResult<ModerationResult> ClassifyText(string input, CancellationToken cancellationToken = default); |
| 4034 | public virtual Task<ClientResult> ClassifyTextAsync(BinaryContent content, RequestOptions options = null); |
| 4035 | public virtual Task<ClientResult<ModerationResultCollection>> ClassifyTextAsync(IEnumerable<string> inputs, CancellationToken cancellationToken = default); |
| 4036 | public virtual Task<ClientResult<ModerationResult>> ClassifyTextAsync(string input, CancellationToken cancellationToken = default); |
| 4037 | } |
| 4038 | [Experimental("OPENAI001")] |
| 4039 | public class ModerationInputPart : IJsonModel<ModerationInputPart>, IPersistableModel<ModerationInputPart> { |
| 4040 | public Uri ImageUri { get; } |
| 4041 | public ModerationInputPartKind Kind { get; } |
| 4042 | public string Text { get; } |
| 4043 | public static ModerationInputPart CreateImagePart(Uri imageUri); |
| 4044 | public static ModerationInputPart CreateTextPart(string text); |
| 4045 | protected virtual ModerationInputPart JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4046 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4047 | protected virtual ModerationInputPart PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4048 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4049 | } |
| 4050 | [Experimental("OPENAI001")] |
| 4051 | public enum ModerationInputPartKind { |
| 4052 | Text = 0, |
| 4053 | Image = 1 |
| 4054 | } |
| 4055 | public class ModerationResult : IJsonModel<ModerationResult>, IPersistableModel<ModerationResult> { |
| 4056 | public bool Flagged { get; } |
| 4057 | public ModerationCategory Harassment { get; } |
| 4058 | public ModerationCategory HarassmentThreatening { get; } |
| 4059 | public ModerationCategory Hate { get; } |
| 4060 | public ModerationCategory HateThreatening { get; } |
| 4061 | public ModerationCategory Illicit { get; } |
| 4062 | public ModerationCategory IllicitViolent { get; } |
| 4063 | public ModerationCategory SelfHarm { get; } |
| 4064 | public ModerationCategory SelfHarmInstructions { get; } |
| 4065 | public ModerationCategory SelfHarmIntent { get; } |
| 4066 | public ModerationCategory Sexual { get; } |
| 4067 | public ModerationCategory SexualMinors { get; } |
| 4068 | public ModerationCategory Violence { get; } |
| 4069 | public ModerationCategory ViolenceGraphic { get; } |
| 4070 | [Experimental("OPENAI001")] |
| 4071 | protected virtual ModerationResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4072 | [Experimental("OPENAI001")] |
| 4073 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4074 | [Experimental("OPENAI001")] |
| 4075 | protected virtual ModerationResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4076 | [Experimental("OPENAI001")] |
| 4077 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4078 | } |
| 4079 | public class ModerationResultCollection : ObjectModel.ReadOnlyCollection<ModerationResult>, IJsonModel<ModerationResultCollection>, IPersistableModel<ModerationResultCollection> { |
| 4080 | public string Id { get; } |
| 4081 | public string Model { get; } |
| 4082 | [Experimental("OPENAI001")] |
| 4083 | protected virtual ModerationResultCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4084 | [Experimental("OPENAI001")] |
| 4085 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4086 | [Experimental("OPENAI001")] |
| 4087 | public static explicit operator ModerationResultCollection(ClientResult result); |
| 4088 | [Experimental("OPENAI001")] |
| 4089 | protected virtual ModerationResultCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4090 | [Experimental("OPENAI001")] |
| 4091 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4092 | } |
| 4093 | public static class OpenAIModerationsModelFactory { |
| 4094 | public static ModerationCategory ModerationCategory(bool flagged = false, float score = 0); |
| 4095 | [Experimental("OPENAI001")] |
| 4096 | 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); |
| 4097 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4098 | 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); |
| 4099 | public static ModerationResultCollection ModerationResultCollection(string id = null, string model = null, IEnumerable<ModerationResult> items = null); |
| 4100 | } |
| 4101 | } |
| 4102 | namespace OpenAI.Realtime { |
| 4103 | [Experimental("OPENAI002")] |
| 4104 | public class ConversationContentPart : IJsonModel<ConversationContentPart>, IPersistableModel<ConversationContentPart> { |
| 4105 | public string AudioTranscript { get; } |
| 4106 | public string Text { get; } |
| 4107 | public static ConversationContentPart CreateInputAudioTranscriptPart(string transcript = null); |
| 4108 | public static ConversationContentPart CreateInputTextPart(string text); |
| 4109 | public static ConversationContentPart CreateOutputAudioTranscriptPart(string transcript = null); |
| 4110 | public static ConversationContentPart CreateOutputTextPart(string text); |
| 4111 | protected virtual ConversationContentPart JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4112 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4113 | public static implicit operator ConversationContentPart(string text); |
| 4114 | protected virtual ConversationContentPart PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4115 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4116 | } |
| 4117 | [Experimental("OPENAI002")] |
| 4118 | public readonly partial struct ConversationContentPartKind : IEquatable<ConversationContentPartKind> { |
| 4119 | public ConversationContentPartKind(string value); |
| 4120 | public static ConversationContentPartKind InputAudio { get; } |
| 4121 | public static ConversationContentPartKind InputText { get; } |
| 4122 | public static ConversationContentPartKind OutputAudio { get; } |
| 4123 | public static ConversationContentPartKind OutputText { get; } |
| 4124 | public readonly bool Equals(ConversationContentPartKind other); |
| 4125 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4126 | public override readonly bool Equals(object obj); |
| 4127 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4128 | public override readonly int GetHashCode(); |
| 4129 | public static bool operator ==(ConversationContentPartKind left, ConversationContentPartKind right); |
| 4130 | public static implicit operator ConversationContentPartKind(string value); |
| 4131 | public static implicit operator ConversationContentPartKind?(string value); |
| 4132 | public static bool operator !=(ConversationContentPartKind left, ConversationContentPartKind right); |
| 4133 | public override readonly string ToString(); |
| 4134 | } |
| 4135 | [Experimental("OPENAI002")] |
| 4136 | public class ConversationFunctionTool : ConversationTool, IJsonModel<ConversationFunctionTool>, IPersistableModel<ConversationFunctionTool> { |
| 4137 | public ConversationFunctionTool(string name); |
| 4138 | public string Description { get; set; } |
| 4139 | public string Name { get; set; } |
| 4140 | public BinaryData Parameters { get; set; } |
| 4141 | protected override ConversationTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4142 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4143 | protected override ConversationTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4144 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4145 | } |
| 4146 | [Experimental("OPENAI002")] |
| 4147 | public readonly partial struct ConversationIncompleteReason : IEquatable<ConversationIncompleteReason> { |
| 4148 | public ConversationIncompleteReason(string value); |
| 4149 | public static ConversationIncompleteReason ClientCancelled { get; } |
| 4150 | public static ConversationIncompleteReason ContentFilter { get; } |
| 4151 | public static ConversationIncompleteReason MaxOutputTokens { get; } |
| 4152 | public static ConversationIncompleteReason TurnDetected { get; } |
| 4153 | public readonly bool Equals(ConversationIncompleteReason other); |
| 4154 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4155 | public override readonly bool Equals(object obj); |
| 4156 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4157 | public override readonly int GetHashCode(); |
| 4158 | public static bool operator ==(ConversationIncompleteReason left, ConversationIncompleteReason right); |
| 4159 | public static implicit operator ConversationIncompleteReason(string value); |
| 4160 | public static implicit operator ConversationIncompleteReason?(string value); |
| 4161 | public static bool operator !=(ConversationIncompleteReason left, ConversationIncompleteReason right); |
| 4162 | public override readonly string ToString(); |
| 4163 | } |
| 4164 | [Experimental("OPENAI002")] |
| 4165 | public class ConversationInputTokenUsageDetails : IJsonModel<ConversationInputTokenUsageDetails>, IPersistableModel<ConversationInputTokenUsageDetails> { |
| 4166 | public int AudioTokenCount { get; } |
| 4167 | public int CachedTokenCount { get; } |
| 4168 | public int TextTokenCount { get; } |
| 4169 | protected virtual ConversationInputTokenUsageDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4170 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4171 | protected virtual ConversationInputTokenUsageDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4172 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4173 | } |
| 4174 | [Experimental("OPENAI002")] |
| 4175 | public readonly partial struct ConversationItemStatus : IEquatable<ConversationItemStatus> { |
| 4176 | public ConversationItemStatus(string value); |
| 4177 | public static ConversationItemStatus Completed { get; } |
| 4178 | public static ConversationItemStatus Incomplete { get; } |
| 4179 | public static ConversationItemStatus InProgress { get; } |
| 4180 | public readonly bool Equals(ConversationItemStatus other); |
| 4181 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4182 | public override readonly bool Equals(object obj); |
| 4183 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4184 | public override readonly int GetHashCode(); |
| 4185 | public static bool operator ==(ConversationItemStatus left, ConversationItemStatus right); |
| 4186 | public static implicit operator ConversationItemStatus(string value); |
| 4187 | public static implicit operator ConversationItemStatus?(string value); |
| 4188 | public static bool operator !=(ConversationItemStatus left, ConversationItemStatus right); |
| 4189 | public override readonly string ToString(); |
| 4190 | } |
| 4191 | [Experimental("OPENAI002")] |
| 4192 | public class ConversationMaxTokensChoice : IJsonModel<ConversationMaxTokensChoice>, IPersistableModel<ConversationMaxTokensChoice> { |
| 4193 | public ConversationMaxTokensChoice(int numberValue); |
| 4194 | public int? NumericValue { get; } |
| 4195 | public static ConversationMaxTokensChoice CreateDefaultMaxTokensChoice(); |
| 4196 | public static ConversationMaxTokensChoice CreateInfiniteMaxTokensChoice(); |
| 4197 | public static ConversationMaxTokensChoice CreateNumericMaxTokensChoice(int maxTokens); |
| 4198 | public static implicit operator ConversationMaxTokensChoice(int maxTokens); |
| 4199 | } |
| 4200 | [Experimental("OPENAI002")] |
| 4201 | public readonly partial struct ConversationMessageRole : IEquatable<ConversationMessageRole> { |
| 4202 | public ConversationMessageRole(string value); |
| 4203 | public static ConversationMessageRole Assistant { get; } |
| 4204 | public static ConversationMessageRole System { get; } |
| 4205 | public static ConversationMessageRole User { get; } |
| 4206 | public readonly bool Equals(ConversationMessageRole other); |
| 4207 | [EditorBrowsable(global::EditorBrowsableState.Never)] |
| 4208 | public override readonly bool Equals(object obj); |
| 4209 | [EditorBrowsable(global::EditorBrowsableState.Never)] |
| 4210 | public override readonly int GetHashCode(); |
| 4211 | public static bool operator ==(ConversationMessageRole left, ConversationMessageRole right); |
| 4212 | public static implicit operator ConversationMessageRole(string value); |
| 4213 | public static implicit operator ConversationMessageRole?(string value); |
| 4214 | public static bool operator !=(ConversationMessageRole left, ConversationMessageRole right); |
| 4215 | public override readonly string ToString(); |
| 4216 | } |
| 4217 | [Experimental("OPENAI002")] |
| 4218 | public class ConversationOutputTokenUsageDetails : IJsonModel<ConversationOutputTokenUsageDetails>, IPersistableModel<ConversationOutputTokenUsageDetails> { |
| 4219 | public int AudioTokenCount { get; } |
| 4220 | public int TextTokenCount { get; } |
| 4221 | protected virtual ConversationOutputTokenUsageDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4222 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4223 | protected virtual ConversationOutputTokenUsageDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4224 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4225 | } |
| 4226 | [Experimental("OPENAI002")] |
| 4227 | public class ConversationRateLimitDetailsItem : IJsonModel<ConversationRateLimitDetailsItem>, IPersistableModel<ConversationRateLimitDetailsItem> { |
| 4228 | public int MaximumCount { get; } |
| 4229 | public string Name { get; } |
| 4230 | public int RemainingCount { get; } |
| 4231 | public TimeSpan TimeUntilReset { get; } |
| 4232 | protected virtual ConversationRateLimitDetailsItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4233 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4234 | protected virtual ConversationRateLimitDetailsItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4235 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4236 | } |
| 4237 | [Experimental("OPENAI002")] |
| 4238 | public class ConversationResponseOptions : IJsonModel<ConversationResponseOptions>, IPersistableModel<ConversationResponseOptions> { |
| 4239 | public ConversationVoice? Voice; |
| 4240 | public RealtimeContentModalities ContentModalities { get; set; } |
| 4241 | public ResponseConversationSelection? ConversationSelection { get; set; } |
| 4242 | public string Instructions { get; set; } |
| 4243 | public ConversationMaxTokensChoice MaxOutputTokens { get; set; } |
| 4244 | public IDictionary<string, string> Metadata { get; } |
| 4245 | public RealtimeAudioFormat? OutputAudioFormat { get; set; } |
| 4246 | public IList<RealtimeItem> OverrideItems { get; } |
| 4247 | public float? Temperature { get; set; } |
| 4248 | public ConversationToolChoice ToolChoice { get; set; } |
| 4249 | public IList<ConversationTool> Tools { get; } |
| 4250 | protected virtual ConversationResponseOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4251 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4252 | protected virtual ConversationResponseOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4253 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4254 | } |
| 4255 | [Experimental("OPENAI002")] |
| 4256 | public class ConversationSessionConfiguredUpdate : RealtimeUpdate, IJsonModel<ConversationSessionConfiguredUpdate>, IPersistableModel<ConversationSessionConfiguredUpdate> { |
| 4257 | public RealtimeContentModalities ContentModalities { get; } |
| 4258 | public new string EventId { get; } |
| 4259 | public RealtimeAudioFormat InputAudioFormat { get; } |
| 4260 | public InputTranscriptionOptions InputTranscriptionOptions { get; } |
| 4261 | public string Instructions { get; } |
| 4262 | public ConversationMaxTokensChoice MaxOutputTokens { get; } |
| 4263 | public string Model { get; } |
| 4264 | public RealtimeAudioFormat OutputAudioFormat { get; } |
| 4265 | public string SessionId { get; } |
| 4266 | public float Temperature { get; } |
| 4267 | public ConversationToolChoice ToolChoice { get; } |
| 4268 | public IReadOnlyList<ConversationTool> Tools { get; } |
| 4269 | public TurnDetectionOptions TurnDetectionOptions { get; } |
| 4270 | public ConversationVoice Voice { get; } |
| 4271 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4272 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4273 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4274 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4275 | } |
| 4276 | [Experimental("OPENAI002")] |
| 4277 | public class ConversationSessionOptions : RealtimeRequestSessionBase, IJsonModel<ConversationSessionOptions>, IPersistableModel<ConversationSessionOptions> { |
| 4278 | public ConversationSessionOptions(); |
| 4279 | public RealtimeSessionAudioConfiguration Audio { get; set; } |
| 4280 | public RealtimeContentModalities ContentModalities { get; set; } |
| 4281 | public IList<string> Include { get; } |
| 4282 | public InputNoiseReductionOptions InputNoiseReductionOptions { get; set; } |
| 4283 | public InputTranscriptionOptions InputTranscriptionOptions { get; set; } |
| 4284 | public string Instructions { get; set; } |
| 4285 | public ConversationMaxTokensChoice MaxOutputTokens { get; set; } |
| 4286 | public float? Temperature { get; set; } |
| 4287 | public ConversationToolChoice ToolChoice { get; set; } |
| 4288 | public IList<ConversationTool> Tools { get; } |
| 4289 | public BinaryData Tracing { get; set; } |
| 4290 | public TurnDetectionOptions TurnDetectionOptions { get; set; } |
| 4291 | public ConversationVoice? Voice { get; set; } |
| 4292 | protected override RealtimeRequestSessionBase JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4293 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4294 | protected override RealtimeRequestSessionBase PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4295 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4296 | } |
| 4297 | [Experimental("OPENAI002")] |
| 4298 | public class ConversationSessionStartedUpdate : RealtimeUpdate, IJsonModel<ConversationSessionStartedUpdate>, IPersistableModel<ConversationSessionStartedUpdate> { |
| 4299 | public RealtimeContentModalities ContentModalities { get; } |
| 4300 | public RealtimeAudioFormat InputAudioFormat { get; } |
| 4301 | public InputTranscriptionOptions InputTranscriptionOptions { get; } |
| 4302 | public string Instructions { get; } |
| 4303 | public ConversationMaxTokensChoice MaxOutputTokens { get; } |
| 4304 | public string Model { get; } |
| 4305 | public RealtimeAudioFormat OutputAudioFormat { get; } |
| 4306 | public string SessionId { get; } |
| 4307 | public float Temperature { get; } |
| 4308 | public ConversationToolChoice ToolChoice { get; } |
| 4309 | public IReadOnlyList<ConversationTool> Tools { get; } |
| 4310 | public TurnDetectionOptions TurnDetectionOptions { get; } |
| 4311 | public ConversationVoice Voice { get; } |
| 4312 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4313 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4314 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4315 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4316 | } |
| 4317 | [Experimental("OPENAI002")] |
| 4318 | public readonly partial struct ConversationStatus : IEquatable<ConversationStatus> { |
| 4319 | public ConversationStatus(string value); |
| 4320 | public static ConversationStatus Cancelled { get; } |
| 4321 | public static ConversationStatus Completed { get; } |
| 4322 | public static ConversationStatus Failed { get; } |
| 4323 | public static ConversationStatus Incomplete { get; } |
| 4324 | public static ConversationStatus InProgress { get; } |
| 4325 | public readonly bool Equals(ConversationStatus other); |
| 4326 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4327 | public override readonly bool Equals(object obj); |
| 4328 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4329 | public override readonly int GetHashCode(); |
| 4330 | public static bool operator ==(ConversationStatus left, ConversationStatus right); |
| 4331 | public static implicit operator ConversationStatus(string value); |
| 4332 | public static implicit operator ConversationStatus?(string value); |
| 4333 | public static bool operator !=(ConversationStatus left, ConversationStatus right); |
| 4334 | public override readonly string ToString(); |
| 4335 | } |
| 4336 | [Experimental("OPENAI002")] |
| 4337 | public class ConversationStatusDetails : IJsonModel<ConversationStatusDetails>, IPersistableModel<ConversationStatusDetails> { |
| 4338 | public string ErrorCode { get; } |
| 4339 | public string ErrorKind { get; } |
| 4340 | public ConversationIncompleteReason? IncompleteReason { get; } |
| 4341 | public ConversationStatus StatusKind { get; } |
| 4342 | protected virtual ConversationStatusDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4343 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4344 | protected virtual ConversationStatusDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4345 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4346 | } |
| 4347 | [Experimental("OPENAI002")] |
| 4348 | public class ConversationTokenUsage : IJsonModel<ConversationTokenUsage>, IPersistableModel<ConversationTokenUsage> { |
| 4349 | public int InputTokenCount { get; } |
| 4350 | public ConversationInputTokenUsageDetails InputTokenDetails { get; } |
| 4351 | public int OutputTokenCount { get; } |
| 4352 | public ConversationOutputTokenUsageDetails OutputTokenDetails { get; } |
| 4353 | public int TotalTokenCount { get; } |
| 4354 | protected virtual ConversationTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4355 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4356 | protected virtual ConversationTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4357 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4358 | } |
| 4359 | [Experimental("OPENAI002")] |
| 4360 | public class ConversationTool : IJsonModel<ConversationTool>, IPersistableModel<ConversationTool> { |
| 4361 | public ConversationToolKind Kind { get; } |
| 4362 | public static ConversationTool CreateFunctionTool(string name, string description = null, BinaryData parameters = null); |
| 4363 | protected virtual ConversationTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4364 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4365 | protected virtual ConversationTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4366 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4367 | } |
| 4368 | [Experimental("OPENAI002")] |
| 4369 | public class ConversationToolChoice : IJsonModel<ConversationToolChoice>, IPersistableModel<ConversationToolChoice> { |
| 4370 | public string FunctionName { get; } |
| 4371 | public ConversationToolChoiceKind Kind { get; } |
| 4372 | public static ConversationToolChoice CreateAutoToolChoice(); |
| 4373 | public static ConversationToolChoice CreateFunctionToolChoice(string functionName); |
| 4374 | public static ConversationToolChoice CreateNoneToolChoice(); |
| 4375 | public static ConversationToolChoice CreateRequiredToolChoice(); |
| 4376 | } |
| 4377 | [Experimental("OPENAI002")] |
| 4378 | public enum ConversationToolChoiceKind { |
| 4379 | Unknown = 0, |
| 4380 | Auto = 1, |
| 4381 | None = 2, |
| 4382 | Required = 3, |
| 4383 | Function = 4 |
| 4384 | } |
| 4385 | [Experimental("OPENAI002")] |
| 4386 | public readonly partial struct ConversationToolKind : IEquatable<ConversationToolKind> { |
| 4387 | public ConversationToolKind(string value); |
| 4388 | public static ConversationToolKind Function { get; } |
| 4389 | public static ConversationToolKind Mcp { get; } |
| 4390 | public readonly bool Equals(ConversationToolKind other); |
| 4391 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4392 | public override readonly bool Equals(object obj); |
| 4393 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4394 | public override readonly int GetHashCode(); |
| 4395 | public static bool operator ==(ConversationToolKind left, ConversationToolKind right); |
| 4396 | public static implicit operator ConversationToolKind(string value); |
| 4397 | public static implicit operator ConversationToolKind?(string value); |
| 4398 | public static bool operator !=(ConversationToolKind left, ConversationToolKind right); |
| 4399 | public override readonly string ToString(); |
| 4400 | } |
| 4401 | [Experimental("OPENAI002")] |
| 4402 | public readonly partial struct ConversationVoice : IEquatable<ConversationVoice> { |
| 4403 | public ConversationVoice(string value); |
| 4404 | public static ConversationVoice Alloy { get; } |
| 4405 | public static ConversationVoice Ash { get; } |
| 4406 | public static ConversationVoice Ballad { get; } |
| 4407 | public static ConversationVoice Coral { get; } |
| 4408 | public static ConversationVoice Echo { get; } |
| 4409 | public static ConversationVoice Fable { get; } |
| 4410 | public static ConversationVoice Nova { get; } |
| 4411 | public static ConversationVoice Onyx { get; } |
| 4412 | public static ConversationVoice Sage { get; } |
| 4413 | public static ConversationVoice Shimmer { get; } |
| 4414 | public static ConversationVoice Verse { get; } |
| 4415 | public readonly bool Equals(ConversationVoice other); |
| 4416 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4417 | public override readonly bool Equals(object obj); |
| 4418 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4419 | public override readonly int GetHashCode(); |
| 4420 | public static bool operator ==(ConversationVoice left, ConversationVoice right); |
| 4421 | public static implicit operator ConversationVoice(string value); |
| 4422 | public static implicit operator ConversationVoice?(string value); |
| 4423 | public static bool operator !=(ConversationVoice left, ConversationVoice right); |
| 4424 | public override readonly string ToString(); |
| 4425 | } |
| 4426 | [Experimental("OPENAI002")] |
| 4427 | public class InputAudioClearedUpdate : RealtimeUpdate, IJsonModel<InputAudioClearedUpdate>, IPersistableModel<InputAudioClearedUpdate> { |
| 4428 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4429 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4430 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4431 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4432 | } |
| 4433 | [Experimental("OPENAI002")] |
| 4434 | public class InputAudioCommittedUpdate : RealtimeUpdate, IJsonModel<InputAudioCommittedUpdate>, IPersistableModel<InputAudioCommittedUpdate> { |
| 4435 | public string ItemId { get; } |
| 4436 | public string PreviousItemId { get; } |
| 4437 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4438 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4439 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4440 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4441 | } |
| 4442 | [Experimental("OPENAI002")] |
| 4443 | public class InputAudioSpeechFinishedUpdate : RealtimeUpdate, IJsonModel<InputAudioSpeechFinishedUpdate>, IPersistableModel<InputAudioSpeechFinishedUpdate> { |
| 4444 | public TimeSpan AudioEndTime { get; } |
| 4445 | public string ItemId { get; } |
| 4446 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4447 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4448 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4449 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4450 | } |
| 4451 | [Experimental("OPENAI002")] |
| 4452 | public class InputAudioSpeechStartedUpdate : RealtimeUpdate, IJsonModel<InputAudioSpeechStartedUpdate>, IPersistableModel<InputAudioSpeechStartedUpdate> { |
| 4453 | public TimeSpan AudioStartTime { get; } |
| 4454 | public string ItemId { get; } |
| 4455 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4456 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4457 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4458 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4459 | } |
| 4460 | [Experimental("OPENAI002")] |
| 4461 | public class InputAudioTranscriptionDeltaUpdate : RealtimeUpdate, IJsonModel<InputAudioTranscriptionDeltaUpdate>, IPersistableModel<InputAudioTranscriptionDeltaUpdate> { |
| 4462 | public int? ContentIndex { get; } |
| 4463 | public string Delta { get; } |
| 4464 | public string ItemId { get; } |
| 4465 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4466 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4467 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4468 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4469 | } |
| 4470 | [Experimental("OPENAI002")] |
| 4471 | public class InputAudioTranscriptionFailedUpdate : RealtimeUpdate, IJsonModel<InputAudioTranscriptionFailedUpdate>, IPersistableModel<InputAudioTranscriptionFailedUpdate> { |
| 4472 | public int ContentIndex { get; } |
| 4473 | public string ErrorCode { get; } |
| 4474 | public string ErrorMessage { get; } |
| 4475 | public string ErrorParameterName { get; } |
| 4476 | public string ItemId { get; } |
| 4477 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4478 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4479 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4480 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4481 | } |
| 4482 | [Experimental("OPENAI002")] |
| 4483 | public class InputAudioTranscriptionFinishedUpdate : RealtimeUpdate, IJsonModel<InputAudioTranscriptionFinishedUpdate>, IPersistableModel<InputAudioTranscriptionFinishedUpdate> { |
| 4484 | public int ContentIndex { get; } |
| 4485 | public string ItemId { get; } |
| 4486 | public string Transcript { get; } |
| 4487 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4488 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4489 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4490 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4491 | } |
| 4492 | [Experimental("OPENAI002")] |
| 4493 | public enum InputNoiseReductionKind { |
| 4494 | Unknown = 0, |
| 4495 | NearField = 1, |
| 4496 | FarField = 2, |
| 4497 | Disabled = 3 |
| 4498 | } |
| 4499 | [Experimental("OPENAI002")] |
| 4500 | public class InputNoiseReductionOptions : IJsonModel<InputNoiseReductionOptions>, IPersistableModel<InputNoiseReductionOptions> { |
| 4501 | public InputNoiseReductionKind Kind { get; set; } |
| 4502 | public static InputNoiseReductionOptions CreateDisabledOptions(); |
| 4503 | public static InputNoiseReductionOptions CreateFarFieldOptions(); |
| 4504 | public static InputNoiseReductionOptions CreateNearFieldOptions(); |
| 4505 | protected virtual InputNoiseReductionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4506 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4507 | protected virtual InputNoiseReductionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4508 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4509 | } |
| 4510 | [Experimental("OPENAI002")] |
| 4511 | public readonly partial struct InputTranscriptionModel : IEquatable<InputTranscriptionModel> { |
| 4512 | public InputTranscriptionModel(string value); |
| 4513 | public static InputTranscriptionModel Gpt4oMiniTranscribe { get; } |
| 4514 | public static InputTranscriptionModel Gpt4oMiniTranscribe20251215 { get; } |
| 4515 | public static InputTranscriptionModel Gpt4oTranscribe { get; } |
| 4516 | public static InputTranscriptionModel Gpt4oTranscribeDiarize { get; } |
| 4517 | public static InputTranscriptionModel Whisper1 { get; } |
| 4518 | public readonly bool Equals(InputTranscriptionModel other); |
| 4519 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4520 | public override readonly bool Equals(object obj); |
| 4521 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4522 | public override readonly int GetHashCode(); |
| 4523 | public static bool operator ==(InputTranscriptionModel left, InputTranscriptionModel right); |
| 4524 | public static implicit operator InputTranscriptionModel(string value); |
| 4525 | public static implicit operator InputTranscriptionModel?(string value); |
| 4526 | public static bool operator !=(InputTranscriptionModel left, InputTranscriptionModel right); |
| 4527 | public override readonly string ToString(); |
| 4528 | } |
| 4529 | [Experimental("OPENAI002")] |
| 4530 | public class InputTranscriptionOptions : IJsonModel<InputTranscriptionOptions>, IPersistableModel<InputTranscriptionOptions> { |
| 4531 | public string Language { get; set; } |
| 4532 | public InputTranscriptionModel? Model { get; set; } |
| 4533 | public string Prompt { get; set; } |
| 4534 | protected virtual InputTranscriptionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4535 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4536 | protected virtual InputTranscriptionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4537 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4538 | } |
| 4539 | [Experimental("OPENAI002")] |
| 4540 | public class ItemCreatedUpdate : RealtimeUpdate, IJsonModel<ItemCreatedUpdate>, IPersistableModel<ItemCreatedUpdate> { |
| 4541 | public string FunctionCallArguments { get; } |
| 4542 | public string FunctionCallId { get; } |
| 4543 | public string FunctionCallOutput { get; } |
| 4544 | public string FunctionName { get; } |
| 4545 | public string ItemId { get; } |
| 4546 | public IReadOnlyList<ConversationContentPart> MessageContentParts { get; } |
| 4547 | public ConversationMessageRole? MessageRole { get; } |
| 4548 | public string PreviousItemId { get; } |
| 4549 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4550 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4551 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4552 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4553 | } |
| 4554 | [Experimental("OPENAI002")] |
| 4555 | public class ItemDeletedUpdate : RealtimeUpdate, IJsonModel<ItemDeletedUpdate>, IPersistableModel<ItemDeletedUpdate> { |
| 4556 | public string ItemId { get; } |
| 4557 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4558 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4559 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4560 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4561 | } |
| 4562 | [Experimental("OPENAI002")] |
| 4563 | public class ItemRetrievedUpdate : RealtimeUpdate, IJsonModel<ItemRetrievedUpdate>, IPersistableModel<ItemRetrievedUpdate> { |
| 4564 | public RealtimeItem Item { get; } |
| 4565 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4566 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4567 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4568 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4569 | } |
| 4570 | [Experimental("OPENAI002")] |
| 4571 | public class ItemTruncatedUpdate : RealtimeUpdate, IJsonModel<ItemTruncatedUpdate>, IPersistableModel<ItemTruncatedUpdate> { |
| 4572 | public int AudioEndMs { get; } |
| 4573 | public int ContentIndex { get; } |
| 4574 | public string ItemId { get; } |
| 4575 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4576 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4577 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4578 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4579 | } |
| 4580 | [Experimental("OPENAI002")] |
| 4581 | public class OutputAudioFinishedUpdate : RealtimeUpdate, IJsonModel<OutputAudioFinishedUpdate>, IPersistableModel<OutputAudioFinishedUpdate> { |
| 4582 | public int ContentIndex { get; } |
| 4583 | public string ItemId { get; } |
| 4584 | public int OutputIndex { get; } |
| 4585 | public string ResponseId { get; } |
| 4586 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4587 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4588 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4589 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4590 | } |
| 4591 | [Experimental("OPENAI002")] |
| 4592 | public class OutputAudioTranscriptionFinishedUpdate : RealtimeUpdate, IJsonModel<OutputAudioTranscriptionFinishedUpdate>, IPersistableModel<OutputAudioTranscriptionFinishedUpdate> { |
| 4593 | public int ContentIndex { get; } |
| 4594 | public string ItemId { get; } |
| 4595 | public int OutputIndex { get; } |
| 4596 | public string ResponseId { get; } |
| 4597 | public string Transcript { get; } |
| 4598 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4599 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4600 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4601 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4602 | } |
| 4603 | [Experimental("OPENAI002")] |
| 4604 | public class OutputDeltaUpdate : RealtimeUpdate, IJsonModel<OutputDeltaUpdate>, IPersistableModel<OutputDeltaUpdate> { |
| 4605 | public BinaryData AudioBytes { get; } |
| 4606 | public string AudioTranscript { get; } |
| 4607 | public int ContentPartIndex { get; } |
| 4608 | public string FunctionArguments { get; } |
| 4609 | public string FunctionCallId { get; } |
| 4610 | public string ItemId { get; } |
| 4611 | public int ItemIndex { get; } |
| 4612 | public string ResponseId { get; } |
| 4613 | public string Text { get; } |
| 4614 | } |
| 4615 | [Experimental("OPENAI002")] |
| 4616 | public class OutputPartFinishedUpdate : RealtimeUpdate, IJsonModel<OutputPartFinishedUpdate>, IPersistableModel<OutputPartFinishedUpdate> { |
| 4617 | public string AudioTranscript { get; } |
| 4618 | public int ContentPartIndex { get; } |
| 4619 | public string FunctionArguments { get; } |
| 4620 | public string FunctionCallId { get; } |
| 4621 | public string ItemId { get; } |
| 4622 | public int ItemIndex { get; } |
| 4623 | public string ResponseId { get; } |
| 4624 | public string Text { get; } |
| 4625 | } |
| 4626 | [Experimental("OPENAI002")] |
| 4627 | public class OutputStreamingFinishedUpdate : RealtimeUpdate, IJsonModel<OutputStreamingFinishedUpdate>, IPersistableModel<OutputStreamingFinishedUpdate> { |
| 4628 | public string FunctionCallArguments { get; } |
| 4629 | public string FunctionCallId { get; } |
| 4630 | public string FunctionCallOutput { get; } |
| 4631 | public string FunctionName { get; } |
| 4632 | public string ItemId { get; } |
| 4633 | public IReadOnlyList<ConversationContentPart> MessageContentParts { get; } |
| 4634 | public ConversationMessageRole? MessageRole { get; } |
| 4635 | public int OutputIndex { get; } |
| 4636 | public string ResponseId { get; } |
| 4637 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4638 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4639 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4640 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4641 | } |
| 4642 | [Experimental("OPENAI002")] |
| 4643 | public class OutputStreamingStartedUpdate : RealtimeUpdate, IJsonModel<OutputStreamingStartedUpdate>, IPersistableModel<OutputStreamingStartedUpdate> { |
| 4644 | public string FunctionCallArguments { get; } |
| 4645 | public string FunctionCallId { get; } |
| 4646 | public string FunctionCallOutput { get; } |
| 4647 | public string FunctionName { get; } |
| 4648 | public string ItemId { get; } |
| 4649 | public int ItemIndex { get; } |
| 4650 | public IReadOnlyList<ConversationContentPart> MessageContentParts { get; } |
| 4651 | public ConversationMessageRole? MessageRole { get; } |
| 4652 | public string ResponseId { get; } |
| 4653 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4654 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4655 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4656 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4657 | } |
| 4658 | [Experimental("OPENAI002")] |
| 4659 | public class OutputTextFinishedUpdate : RealtimeUpdate, IJsonModel<OutputTextFinishedUpdate>, IPersistableModel<OutputTextFinishedUpdate> { |
| 4660 | public int ContentIndex { get; } |
| 4661 | public string ItemId { get; } |
| 4662 | public int OutputIndex { get; } |
| 4663 | public string ResponseId { get; } |
| 4664 | public string Text { get; } |
| 4665 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4666 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4667 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4668 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4669 | } |
| 4670 | [Experimental("OPENAI002")] |
| 4671 | public class RateLimitsUpdate : RealtimeUpdate, IJsonModel<RateLimitsUpdate>, IPersistableModel<RateLimitsUpdate> { |
| 4672 | public IReadOnlyList<ConversationRateLimitDetailsItem> AllDetails { get; } |
| 4673 | public ConversationRateLimitDetailsItem RequestDetails { get; } |
| 4674 | public ConversationRateLimitDetailsItem TokenDetails { get; } |
| 4675 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4676 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4677 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4678 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4679 | } |
| 4680 | [Experimental("OPENAI002")] |
| 4681 | public readonly partial struct RealtimeAudioFormat : IEquatable<RealtimeAudioFormat> { |
| 4682 | public RealtimeAudioFormat(string value); |
| 4683 | public static RealtimeAudioFormat G711Alaw { get; } |
| 4684 | public static RealtimeAudioFormat G711Ulaw { get; } |
| 4685 | public static RealtimeAudioFormat Pcm16 { get; } |
| 4686 | public readonly bool Equals(RealtimeAudioFormat other); |
| 4687 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4688 | public override readonly bool Equals(object obj); |
| 4689 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4690 | public override readonly int GetHashCode(); |
| 4691 | public static bool operator ==(RealtimeAudioFormat left, RealtimeAudioFormat right); |
| 4692 | public static implicit operator RealtimeAudioFormat(string value); |
| 4693 | public static implicit operator RealtimeAudioFormat?(string value); |
| 4694 | public static bool operator !=(RealtimeAudioFormat left, RealtimeAudioFormat right); |
| 4695 | public override readonly string ToString(); |
| 4696 | } |
| 4697 | [Experimental("OPENAI002")] |
| 4698 | public class RealtimeClient { |
| 4699 | protected RealtimeClient(); |
| 4700 | public RealtimeClient(ApiKeyCredential credential, RealtimeClientOptions options); |
| 4701 | public RealtimeClient(ApiKeyCredential credential); |
| 4702 | [Experimental("OPENAI001")] |
| 4703 | public RealtimeClient(AuthenticationPolicy authenticationPolicy, RealtimeClientOptions options); |
| 4704 | [Experimental("OPENAI001")] |
| 4705 | public RealtimeClient(AuthenticationPolicy authenticationPolicy); |
| 4706 | protected internal RealtimeClient(ClientPipeline pipeline, RealtimeClientOptions options); |
| 4707 | public RealtimeClient(string apiKey); |
| 4708 | [Experimental("OPENAI001")] |
| 4709 | public Uri Endpoint { get; } |
| 4710 | public ClientPipeline Pipeline { get; } |
| 4711 | public event EventHandler<BinaryData> OnReceivingCommand { |
| 4712 | add; |
| 4713 | remove; |
| 4714 | } |
| 4715 | public event EventHandler<BinaryData> OnSendingCommand { |
| 4716 | add; |
| 4717 | remove; |
| 4718 | } |
| 4719 | public virtual ClientResult<RealtimeCreateClientSecretResponse> CreateRealtimeClientSecret(RealtimeCreateClientSecretRequest body, CancellationToken cancellationToken = default); |
| 4720 | public virtual ClientResult CreateRealtimeClientSecret(BinaryContent content, RequestOptions options = null); |
| 4721 | public virtual Task<ClientResult<RealtimeCreateClientSecretResponse>> CreateRealtimeClientSecretAsync(RealtimeCreateClientSecretRequest body, CancellationToken cancellationToken = default); |
| 4722 | public virtual Task<ClientResult> CreateRealtimeClientSecretAsync(BinaryContent content, RequestOptions options = null); |
| 4723 | public RealtimeSession StartConversationSession(string model, RealtimeSessionOptions options = null, CancellationToken cancellationToken = default); |
| 4724 | public virtual Task<RealtimeSession> StartConversationSessionAsync(string model, RealtimeSessionOptions options = null, CancellationToken cancellationToken = default); |
| 4725 | public RealtimeSession StartSession(string model, string intent, RealtimeSessionOptions options = null, CancellationToken cancellationToken = default); |
| 4726 | public virtual Task<RealtimeSession> StartSessionAsync(string model, string intent, RealtimeSessionOptions options = null, CancellationToken cancellationToken = default); |
| 4727 | public RealtimeSession StartTranscriptionSession(RealtimeSessionOptions options = null, CancellationToken cancellationToken = default); |
| 4728 | public virtual Task<RealtimeSession> StartTranscriptionSessionAsync(RealtimeSessionOptions options = null, CancellationToken cancellationToken = default); |
| 4729 | } |
| 4730 | public class RealtimeClientOptions : ClientPipelineOptions { |
| 4731 | public Uri Endpoint { get; set; } |
| 4732 | public string OrganizationId { get; set; } |
| 4733 | public string ProjectId { get; set; } |
| 4734 | public string UserAgentApplicationId { get; set; } |
| 4735 | } |
| 4736 | [Experimental("OPENAI002")] |
| 4737 | [Flags] |
| 4738 | public enum RealtimeContentModalities { |
| 4739 | Default = 0, |
| 4740 | Text = 1, |
| 4741 | Audio = 2 |
| 4742 | } |
| 4743 | [Experimental("OPENAI002")] |
| 4744 | public class RealtimeCreateClientSecretRequest : IJsonModel<RealtimeCreateClientSecretRequest>, IPersistableModel<RealtimeCreateClientSecretRequest> { |
| 4745 | public RealtimeCreateClientSecretRequestExpiresAfter ExpiresAfter { get; set; } |
| 4746 | public RealtimeSessionCreateRequestUnion Session { get; set; } |
| 4747 | protected virtual RealtimeCreateClientSecretRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4748 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4749 | public static implicit operator BinaryContent(RealtimeCreateClientSecretRequest realtimeCreateClientSecretRequest); |
| 4750 | protected virtual RealtimeCreateClientSecretRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4751 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4752 | } |
| 4753 | [Experimental("OPENAI002")] |
| 4754 | public class RealtimeCreateClientSecretRequestExpiresAfter : IJsonModel<RealtimeCreateClientSecretRequestExpiresAfter>, IPersistableModel<RealtimeCreateClientSecretRequestExpiresAfter> { |
| 4755 | public RealtimeCreateClientSecretRequestExpiresAfterAnchor? Anchor { get; set; } |
| 4756 | public int? Seconds { get; set; } |
| 4757 | protected virtual RealtimeCreateClientSecretRequestExpiresAfter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4758 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4759 | protected virtual RealtimeCreateClientSecretRequestExpiresAfter PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4760 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4761 | } |
| 4762 | [Experimental("OPENAI002")] |
| 4763 | public readonly partial struct RealtimeCreateClientSecretRequestExpiresAfterAnchor : IEquatable<RealtimeCreateClientSecretRequestExpiresAfterAnchor> { |
| 4764 | public RealtimeCreateClientSecretRequestExpiresAfterAnchor(string value); |
| 4765 | public static RealtimeCreateClientSecretRequestExpiresAfterAnchor CreatedAt { get; } |
| 4766 | public readonly bool Equals(RealtimeCreateClientSecretRequestExpiresAfterAnchor other); |
| 4767 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4768 | public override readonly bool Equals(object obj); |
| 4769 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4770 | public override readonly int GetHashCode(); |
| 4771 | public static bool operator ==(RealtimeCreateClientSecretRequestExpiresAfterAnchor left, RealtimeCreateClientSecretRequestExpiresAfterAnchor right); |
| 4772 | public static implicit operator RealtimeCreateClientSecretRequestExpiresAfterAnchor(string value); |
| 4773 | public static implicit operator RealtimeCreateClientSecretRequestExpiresAfterAnchor?(string value); |
| 4774 | public static bool operator !=(RealtimeCreateClientSecretRequestExpiresAfterAnchor left, RealtimeCreateClientSecretRequestExpiresAfterAnchor right); |
| 4775 | public override readonly string ToString(); |
| 4776 | } |
| 4777 | [Experimental("OPENAI002")] |
| 4778 | public class RealtimeCreateClientSecretResponse : IJsonModel<RealtimeCreateClientSecretResponse>, IPersistableModel<RealtimeCreateClientSecretResponse> { |
| 4779 | public DateTimeOffset ExpiresAt { get; } |
| 4780 | public RealtimeSessionCreateResponseUnion Session { get; } |
| 4781 | public string Value { get; } |
| 4782 | protected virtual RealtimeCreateClientSecretResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4783 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4784 | public static explicit operator RealtimeCreateClientSecretResponse(ClientResult result); |
| 4785 | protected virtual RealtimeCreateClientSecretResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4786 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4787 | } |
| 4788 | [Experimental("OPENAI002")] |
| 4789 | public class RealtimeErrorUpdate : RealtimeUpdate, IJsonModel<RealtimeErrorUpdate>, IPersistableModel<RealtimeErrorUpdate> { |
| 4790 | public string ErrorCode { get; } |
| 4791 | public string ErrorEventId { get; } |
| 4792 | public string Message { get; } |
| 4793 | public string ParameterName { get; } |
| 4794 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4795 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4796 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4797 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4798 | } |
| 4799 | [Experimental("OPENAI002")] |
| 4800 | public class RealtimeItem : IJsonModel<RealtimeItem>, IPersistableModel<RealtimeItem> { |
| 4801 | public string FunctionArguments { get; } |
| 4802 | public string FunctionCallId { get; } |
| 4803 | public string FunctionName { get; } |
| 4804 | public string Id { get; set; } |
| 4805 | public IReadOnlyList<ConversationContentPart> MessageContentParts { get; } |
| 4806 | public ConversationMessageRole? MessageRole { get; } |
| 4807 | public static RealtimeItem CreateAssistantMessage(IEnumerable<ConversationContentPart> contentItems); |
| 4808 | public static RealtimeItem CreateFunctionCall(string name, string callId, string arguments); |
| 4809 | public static RealtimeItem CreateFunctionCallOutput(string callId, string output); |
| 4810 | public static RealtimeItem CreateSystemMessage(IEnumerable<ConversationContentPart> contentItems); |
| 4811 | public static RealtimeItem CreateUserMessage(IEnumerable<ConversationContentPart> contentItems); |
| 4812 | protected virtual RealtimeItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4813 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4814 | protected virtual RealtimeItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4815 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4816 | } |
| 4817 | [Experimental("OPENAI002")] |
| 4818 | public class RealtimeRequestSessionBase : IJsonModel<RealtimeRequestSessionBase>, IPersistableModel<RealtimeRequestSessionBase> { |
| 4819 | protected virtual RealtimeRequestSessionBase JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4820 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4821 | protected virtual RealtimeRequestSessionBase PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4822 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4823 | } |
| 4824 | [Experimental("OPENAI002")] |
| 4825 | public class RealtimeSession : IDisposable { |
| 4826 | protected internal RealtimeSession(ApiKeyCredential credential, RealtimeClient parentClient, Uri endpoint, string model, string intent); |
| 4827 | public Net.WebSockets.WebSocket WebSocket { get; protected set; } |
| 4828 | public virtual void AddItem(RealtimeItem item, string previousItemId, CancellationToken cancellationToken = default); |
| 4829 | public virtual void AddItem(RealtimeItem item, CancellationToken cancellationToken = default); |
| 4830 | public virtual Task AddItemAsync(RealtimeItem item, string previousItemId, CancellationToken cancellationToken = default); |
| 4831 | public virtual Task AddItemAsync(RealtimeItem item, CancellationToken cancellationToken = default); |
| 4832 | public virtual void CancelResponse(CancellationToken cancellationToken = default); |
| 4833 | public virtual Task CancelResponseAsync(CancellationToken cancellationToken = default); |
| 4834 | public virtual void ClearInputAudio(CancellationToken cancellationToken = default); |
| 4835 | public virtual Task ClearInputAudioAsync(CancellationToken cancellationToken = default); |
| 4836 | public virtual void CommitPendingAudio(CancellationToken cancellationToken = default); |
| 4837 | public virtual Task CommitPendingAudioAsync(CancellationToken cancellationToken = default); |
| 4838 | public virtual Task ConfigureConversationSessionAsync(ConversationSessionOptions sessionOptions, CancellationToken cancellationToken = default); |
| 4839 | public virtual void ConfigureSession(ConversationSessionOptions sessionOptions, CancellationToken cancellationToken = default); |
| 4840 | public virtual void ConfigureTranscriptionSession(TranscriptionSessionOptions sessionOptions, CancellationToken cancellationToken = default); |
| 4841 | public virtual Task ConfigureTranscriptionSessionAsync(TranscriptionSessionOptions sessionOptions, CancellationToken cancellationToken = default); |
| 4842 | protected internal virtual void Connect(string queryString = null, IDictionary<string, string> headers = null, CancellationToken cancellationToken = default); |
| 4843 | protected internal virtual Task ConnectAsync(string queryString = null, IDictionary<string, string> headers = null, CancellationToken cancellationToken = default); |
| 4844 | public virtual void DeleteItem(string itemId, CancellationToken cancellationToken = default); |
| 4845 | public virtual Task DeleteItemAsync(string itemId, CancellationToken cancellationToken = default); |
| 4846 | public void Dispose(); |
| 4847 | public virtual void InterruptResponse(CancellationToken cancellationToken = default); |
| 4848 | public virtual Task InterruptResponseAsync(CancellationToken cancellationToken = default); |
| 4849 | public virtual IEnumerable<ClientResult> ReceiveUpdates(RequestOptions options); |
| 4850 | public virtual IEnumerable<RealtimeUpdate> ReceiveUpdates(CancellationToken cancellationToken = default); |
| 4851 | public virtual IAsyncEnumerable<ClientResult> ReceiveUpdatesAsync(RequestOptions options); |
| 4852 | public virtual IAsyncEnumerable<RealtimeUpdate> ReceiveUpdatesAsync(CancellationToken cancellationToken = default); |
| 4853 | public virtual void RequestItemRetrieval(string itemId, CancellationToken cancellationToken = default); |
| 4854 | public virtual Task RequestItemRetrievalAsync(string itemId, CancellationToken cancellationToken = default); |
| 4855 | public virtual void SendCommand(BinaryData data, RequestOptions options); |
| 4856 | public virtual Task SendCommandAsync(BinaryData data, RequestOptions options); |
| 4857 | public virtual void SendInputAudio(BinaryData audio, CancellationToken cancellationToken = default); |
| 4858 | public virtual void SendInputAudio(Stream audio, CancellationToken cancellationToken = default); |
| 4859 | public virtual Task SendInputAudioAsync(BinaryData audio, CancellationToken cancellationToken = default); |
| 4860 | public virtual Task SendInputAudioAsync(Stream audio, CancellationToken cancellationToken = default); |
| 4861 | public virtual void StartResponse(ConversationResponseOptions options, CancellationToken cancellationToken = default); |
| 4862 | public void StartResponse(CancellationToken cancellationToken = default); |
| 4863 | public virtual Task StartResponseAsync(ConversationResponseOptions options, CancellationToken cancellationToken = default); |
| 4864 | public virtual Task StartResponseAsync(CancellationToken cancellationToken = default); |
| 4865 | public virtual void TruncateItem(string itemId, int contentPartIndex, TimeSpan audioDuration, CancellationToken cancellationToken = default); |
| 4866 | public virtual Task TruncateItemAsync(string itemId, int contentPartIndex, TimeSpan audioDuration, CancellationToken cancellationToken = default); |
| 4867 | } |
| 4868 | [Experimental("OPENAI002")] |
| 4869 | public class RealtimeSessionAudioConfiguration : IJsonModel<RealtimeSessionAudioConfiguration>, IPersistableModel<RealtimeSessionAudioConfiguration> { |
| 4870 | public RealtimeSessionAudioInputConfiguration Input { get; set; } |
| 4871 | public RealtimeSessionAudioOutputConfiguration Output { get; set; } |
| 4872 | protected virtual RealtimeSessionAudioConfiguration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4873 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4874 | protected virtual RealtimeSessionAudioConfiguration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4875 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4876 | } |
| 4877 | [Experimental("OPENAI002")] |
| 4878 | public class RealtimeSessionAudioInputConfiguration : IJsonModel<RealtimeSessionAudioInputConfiguration>, IPersistableModel<RealtimeSessionAudioInputConfiguration> { |
| 4879 | public RealtimeAudioFormat? Format { get; set; } |
| 4880 | public InputNoiseReductionOptions NoiseReduction { get; set; } |
| 4881 | public InputTranscriptionOptions Transcription { get; set; } |
| 4882 | public TurnDetectionOptions TurnDetection { get; set; } |
| 4883 | protected virtual RealtimeSessionAudioInputConfiguration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4884 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4885 | protected virtual RealtimeSessionAudioInputConfiguration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4886 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4887 | } |
| 4888 | [Experimental("OPENAI002")] |
| 4889 | public class RealtimeSessionAudioOutputConfiguration : IJsonModel<RealtimeSessionAudioOutputConfiguration>, IPersistableModel<RealtimeSessionAudioOutputConfiguration> { |
| 4890 | public RealtimeAudioFormat? Format { get; set; } |
| 4891 | public float? Speed { get; set; } |
| 4892 | public ConversationVoice? Voice { get; set; } |
| 4893 | protected virtual RealtimeSessionAudioOutputConfiguration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4894 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4895 | protected virtual RealtimeSessionAudioOutputConfiguration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4896 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4897 | } |
| 4898 | [Experimental("OPENAI002")] |
| 4899 | public class RealtimeSessionCreateRequestUnion : IJsonModel<RealtimeSessionCreateRequestUnion>, IPersistableModel<RealtimeSessionCreateRequestUnion> { |
| 4900 | protected virtual RealtimeSessionCreateRequestUnion JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4901 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4902 | protected virtual RealtimeSessionCreateRequestUnion PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4903 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4904 | } |
| 4905 | [Experimental("OPENAI002")] |
| 4906 | public readonly partial struct RealtimeSessionCreateRequestUnionType : IEquatable<RealtimeSessionCreateRequestUnionType> { |
| 4907 | public RealtimeSessionCreateRequestUnionType(string value); |
| 4908 | public static RealtimeSessionCreateRequestUnionType Realtime { get; } |
| 4909 | public static RealtimeSessionCreateRequestUnionType Transcription { get; } |
| 4910 | public readonly bool Equals(RealtimeSessionCreateRequestUnionType other); |
| 4911 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4912 | public override readonly bool Equals(object obj); |
| 4913 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4914 | public override readonly int GetHashCode(); |
| 4915 | public static bool operator ==(RealtimeSessionCreateRequestUnionType left, RealtimeSessionCreateRequestUnionType right); |
| 4916 | public static implicit operator RealtimeSessionCreateRequestUnionType(string value); |
| 4917 | public static implicit operator RealtimeSessionCreateRequestUnionType?(string value); |
| 4918 | public static bool operator !=(RealtimeSessionCreateRequestUnionType left, RealtimeSessionCreateRequestUnionType right); |
| 4919 | public override readonly string ToString(); |
| 4920 | } |
| 4921 | [Experimental("OPENAI002")] |
| 4922 | public class RealtimeSessionCreateResponseUnion : IJsonModel<RealtimeSessionCreateResponseUnion>, IPersistableModel<RealtimeSessionCreateResponseUnion> { |
| 4923 | protected virtual RealtimeSessionCreateResponseUnion JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4924 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4925 | protected virtual RealtimeSessionCreateResponseUnion PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4926 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4927 | } |
| 4928 | [Experimental("OPENAI002")] |
| 4929 | public readonly partial struct RealtimeSessionCreateResponseUnionType : IEquatable<RealtimeSessionCreateResponseUnionType> { |
| 4930 | public RealtimeSessionCreateResponseUnionType(string value); |
| 4931 | public static RealtimeSessionCreateResponseUnionType Realtime { get; } |
| 4932 | public static RealtimeSessionCreateResponseUnionType Transcription { get; } |
| 4933 | public readonly bool Equals(RealtimeSessionCreateResponseUnionType other); |
| 4934 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4935 | public override readonly bool Equals(object obj); |
| 4936 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4937 | public override readonly int GetHashCode(); |
| 4938 | public static bool operator ==(RealtimeSessionCreateResponseUnionType left, RealtimeSessionCreateResponseUnionType right); |
| 4939 | public static implicit operator RealtimeSessionCreateResponseUnionType(string value); |
| 4940 | public static implicit operator RealtimeSessionCreateResponseUnionType?(string value); |
| 4941 | public static bool operator !=(RealtimeSessionCreateResponseUnionType left, RealtimeSessionCreateResponseUnionType right); |
| 4942 | public override readonly string ToString(); |
| 4943 | } |
| 4944 | [Experimental("OPENAI002")] |
| 4945 | public class RealtimeSessionOptions { |
| 4946 | public IDictionary<string, string> Headers { get; } |
| 4947 | public string QueryString { get; set; } |
| 4948 | } |
| 4949 | [Experimental("OPENAI002")] |
| 4950 | public readonly partial struct RealtimeSessionType : IEquatable<RealtimeSessionType> { |
| 4951 | public RealtimeSessionType(string value); |
| 4952 | public static RealtimeSessionType Realtime { get; } |
| 4953 | public static RealtimeSessionType Transcription { get; } |
| 4954 | public readonly bool Equals(RealtimeSessionType other); |
| 4955 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4956 | public override readonly bool Equals(object obj); |
| 4957 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 4958 | public override readonly int GetHashCode(); |
| 4959 | public static bool operator ==(RealtimeSessionType left, RealtimeSessionType right); |
| 4960 | public static implicit operator RealtimeSessionType(string value); |
| 4961 | public static implicit operator RealtimeSessionType?(string value); |
| 4962 | public static bool operator !=(RealtimeSessionType left, RealtimeSessionType right); |
| 4963 | public override readonly string ToString(); |
| 4964 | } |
| 4965 | [Experimental("OPENAI002")] |
| 4966 | public class RealtimeUpdate : IJsonModel<RealtimeUpdate>, IPersistableModel<RealtimeUpdate> { |
| 4967 | public string EventId { get; } |
| 4968 | public RealtimeUpdateKind Kind { get; } |
| 4969 | public BinaryData GetRawContent(); |
| 4970 | protected virtual RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 4971 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 4972 | public static explicit operator RealtimeUpdate(ClientResult result); |
| 4973 | protected virtual RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 4974 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 4975 | } |
| 4976 | [Experimental("OPENAI002")] |
| 4977 | public enum RealtimeUpdateKind { |
| 4978 | Unknown = 0, |
| 4979 | SessionStarted = 1, |
| 4980 | SessionConfigured = 2, |
| 4981 | ItemCreated = 3, |
| 4982 | ConversationCreated = 4, |
| 4983 | ItemRetrieved = 5, |
| 4984 | ItemDeleted = 6, |
| 4985 | ItemTruncated = 7, |
| 4986 | ResponseStarted = 8, |
| 4987 | ResponseFinished = 9, |
| 4988 | RateLimitsUpdated = 10, |
| 4989 | ItemStreamingStarted = 11, |
| 4990 | ItemStreamingFinished = 12, |
| 4991 | ItemContentPartStarted = 13, |
| 4992 | ItemContentPartFinished = 14, |
| 4993 | ItemStreamingPartAudioDelta = 15, |
| 4994 | ItemStreamingPartAudioFinished = 16, |
| 4995 | ItemStreamingPartAudioTranscriptionDelta = 17, |
| 4996 | ItemStreamingPartAudioTranscriptionFinished = 18, |
| 4997 | ItemStreamingPartTextDelta = 19, |
| 4998 | ItemStreamingPartTextFinished = 20, |
| 4999 | ItemStreamingFunctionCallArgumentsDelta = 21, |
| 5000 | ItemStreamingFunctionCallArgumentsFinished = 22, |
| 5001 | InputSpeechStarted = 23, |
| 5002 | InputSpeechStopped = 24, |
| 5003 | InputTranscriptionFinished = 25, |
| 5004 | InputTranscriptionDelta = 26, |
| 5005 | InputTranscriptionFailed = 27, |
| 5006 | InputAudioCommitted = 28, |
| 5007 | InputAudioCleared = 29, |
| 5008 | OutputAudioBufferCleared = 30, |
| 5009 | OutputAudioBufferStarted = 31, |
| 5010 | OutputAudioBufferStopped = 32, |
| 5011 | TranscriptionSessionStarted = 33, |
| 5012 | TranscriptionSessionConfigured = 34, |
| 5013 | Error = 35, |
| 5014 | InputTranscriptionSegment = 36, |
| 5015 | InputAudioBufferTimeoutTriggered = 37, |
| 5016 | InputAudioBufferDtmfEventReceived = 38, |
| 5017 | McpListToolsInProgress = 39, |
| 5018 | McpListToolsCompleted = 40, |
| 5019 | McpListToolsFailed = 41, |
| 5020 | ResponseMcpCallArgumentsDelta = 42, |
| 5021 | ResponseMcpCallArgumentsDone = 43, |
| 5022 | ResponseMcpCallInProgress = 44, |
| 5023 | ResponseMcpCallCompleted = 45, |
| 5024 | ResponseMcpCallFailed = 46 |
| 5025 | } |
| 5026 | [Experimental("OPENAI002")] |
| 5027 | public readonly partial struct ResponseConversationSelection : IEquatable<ResponseConversationSelection> { |
| 5028 | public ResponseConversationSelection(string value); |
| 5029 | public static ResponseConversationSelection Auto { get; } |
| 5030 | public static ResponseConversationSelection None { get; } |
| 5031 | public readonly bool Equals(ResponseConversationSelection other); |
| 5032 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5033 | public override readonly bool Equals(object obj); |
| 5034 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5035 | public override readonly int GetHashCode(); |
| 5036 | public static bool operator ==(ResponseConversationSelection left, ResponseConversationSelection right); |
| 5037 | public static implicit operator ResponseConversationSelection(string value); |
| 5038 | public static implicit operator ResponseConversationSelection?(string value); |
| 5039 | public static bool operator !=(ResponseConversationSelection left, ResponseConversationSelection right); |
| 5040 | public override readonly string ToString(); |
| 5041 | } |
| 5042 | [Experimental("OPENAI002")] |
| 5043 | public class ResponseFinishedUpdate : RealtimeUpdate, IJsonModel<ResponseFinishedUpdate>, IPersistableModel<ResponseFinishedUpdate> { |
| 5044 | public IReadOnlyList<RealtimeItem> CreatedItems { get; } |
| 5045 | public string ResponseId { get; } |
| 5046 | public ConversationStatus? Status { get; } |
| 5047 | public ConversationStatusDetails StatusDetails { get; } |
| 5048 | public ConversationTokenUsage Usage { get; } |
| 5049 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5050 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5051 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5052 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5053 | } |
| 5054 | [Experimental("OPENAI002")] |
| 5055 | public class ResponseStartedUpdate : RealtimeUpdate, IJsonModel<ResponseStartedUpdate>, IPersistableModel<ResponseStartedUpdate> { |
| 5056 | public IReadOnlyList<RealtimeItem> CreatedItems { get; } |
| 5057 | public string ResponseId { get; } |
| 5058 | public ConversationStatus Status { get; } |
| 5059 | public ConversationStatusDetails StatusDetails { get; } |
| 5060 | public ConversationTokenUsage Usage { get; } |
| 5061 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5062 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5063 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5064 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5065 | } |
| 5066 | [Experimental("OPENAI002")] |
| 5067 | public readonly partial struct SemanticEagernessLevel : IEquatable<SemanticEagernessLevel> { |
| 5068 | public SemanticEagernessLevel(string value); |
| 5069 | public static SemanticEagernessLevel Auto { get; } |
| 5070 | public static SemanticEagernessLevel High { get; } |
| 5071 | public static SemanticEagernessLevel Low { get; } |
| 5072 | public static SemanticEagernessLevel Medium { get; } |
| 5073 | public readonly bool Equals(SemanticEagernessLevel other); |
| 5074 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5075 | public override readonly bool Equals(object obj); |
| 5076 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5077 | public override readonly int GetHashCode(); |
| 5078 | public static bool operator ==(SemanticEagernessLevel left, SemanticEagernessLevel right); |
| 5079 | public static implicit operator SemanticEagernessLevel(string value); |
| 5080 | public static implicit operator SemanticEagernessLevel?(string value); |
| 5081 | public static bool operator !=(SemanticEagernessLevel left, SemanticEagernessLevel right); |
| 5082 | public override readonly string ToString(); |
| 5083 | } |
| 5084 | [Experimental("OPENAI002")] |
| 5085 | public class TranscriptionSessionConfiguredUpdate : RealtimeUpdate, IJsonModel<TranscriptionSessionConfiguredUpdate>, IPersistableModel<TranscriptionSessionConfiguredUpdate> { |
| 5086 | public RealtimeContentModalities ContentModalities { get; } |
| 5087 | public RealtimeAudioFormat InputAudioFormat { get; } |
| 5088 | public InputTranscriptionOptions InputAudioTranscription { get; } |
| 5089 | public TurnDetectionOptions TurnDetection { get; } |
| 5090 | protected override RealtimeUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5091 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5092 | protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5093 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5094 | } |
| 5095 | [Experimental("OPENAI002")] |
| 5096 | public class TranscriptionSessionOptions : IJsonModel<TranscriptionSessionOptions>, IPersistableModel<TranscriptionSessionOptions> { |
| 5097 | public RealtimeContentModalities ContentModalities { get; set; } |
| 5098 | public IList<string> Include { get; } |
| 5099 | public RealtimeAudioFormat? InputAudioFormat { get; set; } |
| 5100 | public InputNoiseReductionOptions InputNoiseReductionOptions { get; set; } |
| 5101 | public InputTranscriptionOptions InputTranscriptionOptions { get; set; } |
| 5102 | public TurnDetectionOptions TurnDetectionOptions { get; set; } |
| 5103 | protected virtual TranscriptionSessionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5104 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5105 | protected virtual TranscriptionSessionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5106 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5107 | } |
| 5108 | [Experimental("OPENAI002")] |
| 5109 | public enum TurnDetectionKind { |
| 5110 | Unknown = 0, |
| 5111 | ServerVoiceActivityDetection = 1, |
| 5112 | SemanticVoiceActivityDetection = 2, |
| 5113 | Disabled = 3 |
| 5114 | } |
| 5115 | [Experimental("OPENAI002")] |
| 5116 | public class TurnDetectionOptions : IJsonModel<TurnDetectionOptions>, IPersistableModel<TurnDetectionOptions> { |
| 5117 | public TurnDetectionKind Kind { get; } |
| 5118 | public static TurnDetectionOptions CreateDisabledTurnDetectionOptions(); |
| 5119 | public static TurnDetectionOptions CreateSemanticVoiceActivityTurnDetectionOptions(SemanticEagernessLevel? eagernessLevel = null, bool? enableAutomaticResponseCreation = null, bool? enableResponseInterruption = null); |
| 5120 | public static TurnDetectionOptions CreateServerVoiceActivityTurnDetectionOptions(float? detectionThreshold = null, TimeSpan? prefixPaddingDuration = null, TimeSpan? silenceDuration = null, bool? enableAutomaticResponseCreation = null, bool? enableResponseInterruption = null); |
| 5121 | protected virtual TurnDetectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5122 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5123 | protected virtual TurnDetectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5124 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5125 | } |
| 5126 | } |
| 5127 | namespace OpenAI.Responses { |
| 5128 | [Experimental("OPENAI001")] |
| 5129 | public class AutomaticCodeInterpreterToolContainerConfiguration : CodeInterpreterToolContainerConfiguration, IJsonModel<AutomaticCodeInterpreterToolContainerConfiguration>, IPersistableModel<AutomaticCodeInterpreterToolContainerConfiguration> { |
| 5130 | public AutomaticCodeInterpreterToolContainerConfiguration(); |
| 5131 | public IList<string> FileIds { get; } |
| 5132 | protected override CodeInterpreterToolContainerConfiguration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5133 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5134 | protected override CodeInterpreterToolContainerConfiguration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5135 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5136 | } |
| 5137 | [Experimental("OPENAI001")] |
| 5138 | public class CodeInterpreterCallImageOutput : CodeInterpreterCallOutput, IJsonModel<CodeInterpreterCallImageOutput>, IPersistableModel<CodeInterpreterCallImageOutput> { |
| 5139 | public CodeInterpreterCallImageOutput(Uri imageUri); |
| 5140 | public Uri ImageUri { get; set; } |
| 5141 | protected override CodeInterpreterCallOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5142 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5143 | protected override CodeInterpreterCallOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5144 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5145 | } |
| 5146 | [Experimental("OPENAI001")] |
| 5147 | public class CodeInterpreterCallLogsOutput : CodeInterpreterCallOutput, IJsonModel<CodeInterpreterCallLogsOutput>, IPersistableModel<CodeInterpreterCallLogsOutput> { |
| 5148 | public CodeInterpreterCallLogsOutput(string logs); |
| 5149 | public string Logs { get; set; } |
| 5150 | protected override CodeInterpreterCallOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5151 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5152 | protected override CodeInterpreterCallOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5153 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5154 | } |
| 5155 | [Experimental("OPENAI001")] |
| 5156 | public class CodeInterpreterCallOutput : IJsonModel<CodeInterpreterCallOutput>, IPersistableModel<CodeInterpreterCallOutput> { |
| 5157 | [Serialization.JsonIgnore] |
| 5158 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5159 | [Experimental("SCME0001")] |
| 5160 | public ref JsonPatch Patch { get; } |
| 5161 | protected virtual CodeInterpreterCallOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5162 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5163 | protected virtual CodeInterpreterCallOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5164 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5165 | } |
| 5166 | [Experimental("OPENAI001")] |
| 5167 | public class CodeInterpreterCallResponseItem : ResponseItem, IJsonModel<CodeInterpreterCallResponseItem>, IPersistableModel<CodeInterpreterCallResponseItem> { |
| 5168 | public CodeInterpreterCallResponseItem(string code); |
| 5169 | public string Code { get; set; } |
| 5170 | public string ContainerId { get; set; } |
| 5171 | public IList<CodeInterpreterCallOutput> Outputs { get; } |
| 5172 | public CodeInterpreterCallStatus? Status { get; set; } |
| 5173 | protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5174 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5175 | protected override ResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5176 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5177 | } |
| 5178 | [Experimental("OPENAI001")] |
| 5179 | public enum CodeInterpreterCallStatus { |
| 5180 | InProgress = 0, |
| 5181 | Interpreting = 1, |
| 5182 | Completed = 2, |
| 5183 | Incomplete = 3, |
| 5184 | Failed = 4 |
| 5185 | } |
| 5186 | [Experimental("OPENAI001")] |
| 5187 | public class CodeInterpreterTool : ResponseTool, IJsonModel<CodeInterpreterTool>, IPersistableModel<CodeInterpreterTool> { |
| 5188 | public CodeInterpreterTool(CodeInterpreterToolContainer container); |
| 5189 | public CodeInterpreterToolContainer Container { get; } |
| 5190 | protected override ResponseTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5191 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5192 | protected override ResponseTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5193 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5194 | } |
| 5195 | [Experimental("OPENAI001")] |
| 5196 | public class CodeInterpreterToolContainer : IJsonModel<CodeInterpreterToolContainer>, IPersistableModel<CodeInterpreterToolContainer> { |
| 5197 | public CodeInterpreterToolContainer(CodeInterpreterToolContainerConfiguration containerConfiguration); |
| 5198 | public CodeInterpreterToolContainer(string containerId); |
| 5199 | public CodeInterpreterToolContainerConfiguration ContainerConfiguration { get; } |
| 5200 | public string ContainerId { get; } |
| 5201 | [Serialization.JsonIgnore] |
| 5202 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5203 | [Experimental("SCME0001")] |
| 5204 | public ref JsonPatch Patch { get; } |
| 5205 | protected virtual CodeInterpreterToolContainer JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5206 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5207 | protected virtual CodeInterpreterToolContainer PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5208 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5209 | } |
| 5210 | [Experimental("OPENAI001")] |
| 5211 | public class CodeInterpreterToolContainerConfiguration : IJsonModel<CodeInterpreterToolContainerConfiguration>, IPersistableModel<CodeInterpreterToolContainerConfiguration> { |
| 5212 | [Serialization.JsonIgnore] |
| 5213 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5214 | [Experimental("SCME0001")] |
| 5215 | public ref JsonPatch Patch { get; } |
| 5216 | public static AutomaticCodeInterpreterToolContainerConfiguration CreateAutomaticContainerConfiguration(IEnumerable<string> fileIds = null); |
| 5217 | protected virtual CodeInterpreterToolContainerConfiguration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5218 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5219 | protected virtual CodeInterpreterToolContainerConfiguration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5220 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5221 | } |
| 5222 | [Experimental("OPENAICUA001")] |
| 5223 | public class ComputerCallAction : IJsonModel<ComputerCallAction>, IPersistableModel<ComputerCallAction> { |
| 5224 | public Drawing.Point? ClickCoordinates { get; } |
| 5225 | public ComputerCallActionMouseButton? ClickMouseButton { get; } |
| 5226 | public Drawing.Point? DoubleClickCoordinates { get; } |
| 5227 | public IList<Drawing.Point> DragPath { get; } |
| 5228 | public IList<string> KeyPressKeyCodes { get; } |
| 5229 | public ComputerCallActionKind Kind { get; } |
| 5230 | public Drawing.Point? MoveCoordinates { get; } |
| 5231 | [Serialization.JsonIgnore] |
| 5232 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5233 | [Experimental("SCME0001")] |
| 5234 | public ref JsonPatch Patch { get; } |
| 5235 | public Drawing.Point? ScrollCoordinates { get; } |
| 5236 | public int? ScrollHorizontalOffset { get; } |
| 5237 | public int? ScrollVerticalOffset { get; } |
| 5238 | public string TypeText { get; } |
| 5239 | public static ComputerCallAction CreateClickAction(Drawing.Point clickCoordinates, ComputerCallActionMouseButton clickMouseButton); |
| 5240 | public static ComputerCallAction CreateDoubleClickAction(Drawing.Point doubleClickCoordinates, ComputerCallActionMouseButton doubleClickMouseButton); |
| 5241 | public static ComputerCallAction CreateDragAction(IList<Drawing.Point> dragPath); |
| 5242 | public static ComputerCallAction CreateKeyPressAction(IList<string> keyCodes); |
| 5243 | public static ComputerCallAction CreateMoveAction(Drawing.Point moveCoordinates); |
| 5244 | public static ComputerCallAction CreateScreenshotAction(); |
| 5245 | public static ComputerCallAction CreateScrollAction(Drawing.Point scrollCoordinates, int horizontalOffset, int verticalOffset); |
| 5246 | public static ComputerCallAction CreateTypeAction(string typeText); |
| 5247 | public static ComputerCallAction CreateWaitAction(); |
| 5248 | protected virtual ComputerCallAction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5249 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5250 | protected virtual ComputerCallAction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5251 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5252 | } |
| 5253 | [Experimental("OPENAICUA001")] |
| 5254 | public enum ComputerCallActionKind { |
| 5255 | Click = 0, |
| 5256 | DoubleClick = 1, |
| 5257 | Drag = 2, |
| 5258 | KeyPress = 3, |
| 5259 | Move = 4, |
| 5260 | Screenshot = 5, |
| 5261 | Scroll = 6, |
| 5262 | Type = 7, |
| 5263 | Wait = 8 |
| 5264 | } |
| 5265 | [Experimental("OPENAICUA001")] |
| 5266 | public enum ComputerCallActionMouseButton { |
| 5267 | Left = 0, |
| 5268 | Right = 1, |
| 5269 | Wheel = 2, |
| 5270 | Back = 3, |
| 5271 | Forward = 4 |
| 5272 | } |
| 5273 | [Experimental("OPENAICUA001")] |
| 5274 | public class ComputerCallOutput : IJsonModel<ComputerCallOutput>, IPersistableModel<ComputerCallOutput> { |
| 5275 | [Serialization.JsonIgnore] |
| 5276 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5277 | [Experimental("SCME0001")] |
| 5278 | public ref JsonPatch Patch { get; } |
| 5279 | public static ComputerCallOutput CreateScreenshotOutput(BinaryData screenshotImageBytes, string screenshotImageBytesMediaType); |
| 5280 | public static ComputerCallOutput CreateScreenshotOutput(string screenshotImageFileId); |
| 5281 | public static ComputerCallOutput CreateScreenshotOutput(Uri screenshotImageUri); |
| 5282 | protected virtual ComputerCallOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5283 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5284 | protected virtual ComputerCallOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5285 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5286 | } |
| 5287 | [Experimental("OPENAICUA001")] |
| 5288 | public class ComputerCallOutputResponseItem : ResponseItem, IJsonModel<ComputerCallOutputResponseItem>, IPersistableModel<ComputerCallOutputResponseItem> { |
| 5289 | public ComputerCallOutputResponseItem(string callId, ComputerCallOutput output); |
| 5290 | public IList<ComputerCallSafetyCheck> AcknowledgedSafetyChecks { get; } |
| 5291 | public string CallId { get; set; } |
| 5292 | public ComputerCallOutput Output { get; set; } |
| 5293 | public ComputerCallOutputStatus? Status { get; set; } |
| 5294 | protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5295 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5296 | protected override ResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5297 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5298 | } |
| 5299 | [Experimental("OPENAICUA001")] |
| 5300 | public enum ComputerCallOutputStatus { |
| 5301 | InProgress = 0, |
| 5302 | Completed = 1, |
| 5303 | Incomplete = 2 |
| 5304 | } |
| 5305 | [Experimental("OPENAICUA001")] |
| 5306 | public class ComputerCallResponseItem : ResponseItem, IJsonModel<ComputerCallResponseItem>, IPersistableModel<ComputerCallResponseItem> { |
| 5307 | public ComputerCallResponseItem(string callId, ComputerCallAction action, IEnumerable<ComputerCallSafetyCheck> pendingSafetyChecks); |
| 5308 | public ComputerCallAction Action { get; set; } |
| 5309 | public string CallId { get; set; } |
| 5310 | public IList<ComputerCallSafetyCheck> PendingSafetyChecks { get; } |
| 5311 | public ComputerCallStatus? Status { get; set; } |
| 5312 | protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5313 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5314 | protected override ResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5315 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5316 | } |
| 5317 | [Experimental("OPENAICUA001")] |
| 5318 | public class ComputerCallSafetyCheck : IJsonModel<ComputerCallSafetyCheck>, IPersistableModel<ComputerCallSafetyCheck> { |
| 5319 | public ComputerCallSafetyCheck(string id, string code, string message); |
| 5320 | public string Code { get; set; } |
| 5321 | public string Id { get; set; } |
| 5322 | public string Message { get; set; } |
| 5323 | [Serialization.JsonIgnore] |
| 5324 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5325 | [Experimental("SCME0001")] |
| 5326 | public ref JsonPatch Patch { get; } |
| 5327 | protected virtual ComputerCallSafetyCheck JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5328 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5329 | protected virtual ComputerCallSafetyCheck PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5330 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5331 | } |
| 5332 | [Experimental("OPENAICUA001")] |
| 5333 | public enum ComputerCallStatus { |
| 5334 | InProgress = 0, |
| 5335 | Completed = 1, |
| 5336 | Incomplete = 2 |
| 5337 | } |
| 5338 | [Experimental("OPENAI001")] |
| 5339 | public class ComputerTool : ResponseTool, IJsonModel<ComputerTool>, IPersistableModel<ComputerTool> { |
| 5340 | public ComputerTool(ComputerToolEnvironment environment, int displayWidth, int displayHeight); |
| 5341 | public int DisplayHeight { get; set; } |
| 5342 | public int DisplayWidth { get; set; } |
| 5343 | public ComputerToolEnvironment Environment { get; set; } |
| 5344 | protected override ResponseTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5345 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5346 | protected override ResponseTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5347 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5348 | } |
| 5349 | [Experimental("OPENAICUA001")] |
| 5350 | public readonly partial struct ComputerToolEnvironment : IEquatable<ComputerToolEnvironment> { |
| 5351 | public ComputerToolEnvironment(string value); |
| 5352 | public static ComputerToolEnvironment Browser { get; } |
| 5353 | public static ComputerToolEnvironment Linux { get; } |
| 5354 | public static ComputerToolEnvironment Mac { get; } |
| 5355 | public static ComputerToolEnvironment Ubuntu { get; } |
| 5356 | public static ComputerToolEnvironment Windows { get; } |
| 5357 | public readonly bool Equals(ComputerToolEnvironment other); |
| 5358 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5359 | public override readonly bool Equals(object obj); |
| 5360 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5361 | public override readonly int GetHashCode(); |
| 5362 | public static bool operator ==(ComputerToolEnvironment left, ComputerToolEnvironment right); |
| 5363 | public static implicit operator ComputerToolEnvironment(string value); |
| 5364 | public static implicit operator ComputerToolEnvironment?(string value); |
| 5365 | public static bool operator !=(ComputerToolEnvironment left, ComputerToolEnvironment right); |
| 5366 | public override readonly string ToString(); |
| 5367 | } |
| 5368 | [Experimental("OPENAI001")] |
| 5369 | public class ContainerFileCitationMessageAnnotation : ResponseMessageAnnotation, IJsonModel<ContainerFileCitationMessageAnnotation>, IPersistableModel<ContainerFileCitationMessageAnnotation> { |
| 5370 | public ContainerFileCitationMessageAnnotation(string containerId, string fileId, int startIndex, int endIndex, string filename); |
| 5371 | public string ContainerId { get; set; } |
| 5372 | public int EndIndex { get; set; } |
| 5373 | public string FileId { get; set; } |
| 5374 | public string Filename { get; set; } |
| 5375 | public int StartIndex { get; set; } |
| 5376 | protected override ResponseMessageAnnotation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5377 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5378 | protected override ResponseMessageAnnotation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5379 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5380 | } |
| 5381 | [Experimental("OPENAI001")] |
| 5382 | public class CreateResponseOptions : IJsonModel<CreateResponseOptions>, IPersistableModel<CreateResponseOptions> { |
| 5383 | public CreateResponseOptions(); |
| 5384 | public CreateResponseOptions(IEnumerable<ResponseItem> inputItems, string model = null); |
| 5385 | public bool? BackgroundModeEnabled { get; set; } |
| 5386 | public ResponseConversationOptions ConversationOptions { get; set; } |
| 5387 | public string EndUserId { get; set; } |
| 5388 | public IList<IncludedResponseProperty> IncludedProperties { get; } |
| 5389 | public IList<ResponseItem> InputItems { get; } |
| 5390 | public string Instructions { get; set; } |
| 5391 | public int? MaxOutputTokenCount { get; set; } |
| 5392 | public int? MaxToolCallCount { get; set; } |
| 5393 | public IDictionary<string, string> Metadata { get; } |
| 5394 | public string Model { get; set; } |
| 5395 | public bool? ParallelToolCallsEnabled { get; set; } |
| 5396 | [Serialization.JsonIgnore] |
| 5397 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5398 | [Experimental("SCME0001")] |
| 5399 | public ref JsonPatch Patch { get; } |
| 5400 | public string PreviousResponseId { get; set; } |
| 5401 | public ResponseReasoningOptions ReasoningOptions { get; set; } |
| 5402 | public string SafetyIdentifier { get; set; } |
| 5403 | public ResponseServiceTier? ServiceTier { get; set; } |
| 5404 | public bool? StoredOutputEnabled { get; set; } |
| 5405 | public bool? StreamingEnabled { get; set; } |
| 5406 | public float? Temperature { get; set; } |
| 5407 | public ResponseTextOptions TextOptions { get; set; } |
| 5408 | public ResponseToolChoice ToolChoice { get; set; } |
| 5409 | public IList<ResponseTool> Tools { get; } |
| 5410 | public int? TopLogProbabilityCount { get; set; } |
| 5411 | public float? TopP { get; set; } |
| 5412 | public ResponseTruncationMode? TruncationMode { get; set; } |
| 5413 | protected virtual CreateResponseOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5414 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5415 | public static implicit operator BinaryContent(CreateResponseOptions createResponseOptions); |
| 5416 | protected virtual CreateResponseOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5417 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5418 | } |
| 5419 | [Experimental("OPENAI001")] |
| 5420 | public class CustomMcpToolCallApprovalPolicy : IJsonModel<CustomMcpToolCallApprovalPolicy>, IPersistableModel<CustomMcpToolCallApprovalPolicy> { |
| 5421 | [Serialization.JsonIgnore] |
| 5422 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5423 | [Experimental("SCME0001")] |
| 5424 | public ref JsonPatch Patch { get; } |
| 5425 | public McpToolFilter ToolsAlwaysRequiringApproval { get; set; } |
| 5426 | public McpToolFilter ToolsNeverRequiringApproval { get; set; } |
| 5427 | protected virtual CustomMcpToolCallApprovalPolicy JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5428 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5429 | protected virtual CustomMcpToolCallApprovalPolicy PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5430 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5431 | } |
| 5432 | [Experimental("OPENAI001")] |
| 5433 | public class FileCitationMessageAnnotation : ResponseMessageAnnotation, IJsonModel<FileCitationMessageAnnotation>, IPersistableModel<FileCitationMessageAnnotation> { |
| 5434 | public FileCitationMessageAnnotation(string fileId, int index, string filename); |
| 5435 | public string FileId { get; set; } |
| 5436 | public string Filename { get; set; } |
| 5437 | public int Index { get; set; } |
| 5438 | protected override ResponseMessageAnnotation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5439 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5440 | protected override ResponseMessageAnnotation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5441 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5442 | } |
| 5443 | [Experimental("OPENAI001")] |
| 5444 | public class FilePathMessageAnnotation : ResponseMessageAnnotation, IJsonModel<FilePathMessageAnnotation>, IPersistableModel<FilePathMessageAnnotation> { |
| 5445 | public FilePathMessageAnnotation(string fileId, int index); |
| 5446 | public string FileId { get; set; } |
| 5447 | public int Index { get; set; } |
| 5448 | protected override ResponseMessageAnnotation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5449 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5450 | protected override ResponseMessageAnnotation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5451 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5452 | } |
| 5453 | [Experimental("OPENAI001")] |
| 5454 | public class FileSearchCallResponseItem : ResponseItem, IJsonModel<FileSearchCallResponseItem>, IPersistableModel<FileSearchCallResponseItem> { |
| 5455 | public FileSearchCallResponseItem(IEnumerable<string> queries); |
| 5456 | public IList<string> Queries { get; } |
| 5457 | public IList<FileSearchCallResult> Results { get; set; } |
| 5458 | public FileSearchCallStatus? Status { get; set; } |
| 5459 | protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5460 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5461 | protected override ResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5462 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5463 | } |
| 5464 | [Experimental("OPENAI001")] |
| 5465 | public class FileSearchCallResult : IJsonModel<FileSearchCallResult>, IPersistableModel<FileSearchCallResult> { |
| 5466 | public IDictionary<string, BinaryData> Attributes { get; } |
| 5467 | public string FileId { get; set; } |
| 5468 | public string Filename { get; set; } |
| 5469 | [Serialization.JsonIgnore] |
| 5470 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5471 | [Experimental("SCME0001")] |
| 5472 | public ref JsonPatch Patch { get; } |
| 5473 | public float? Score { get; set; } |
| 5474 | public string Text { get; set; } |
| 5475 | protected virtual FileSearchCallResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5476 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5477 | protected virtual FileSearchCallResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5478 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5479 | } |
| 5480 | [Experimental("OPENAI001")] |
| 5481 | public enum FileSearchCallStatus { |
| 5482 | InProgress = 0, |
| 5483 | Searching = 1, |
| 5484 | Completed = 2, |
| 5485 | Incomplete = 3, |
| 5486 | Failed = 4 |
| 5487 | } |
| 5488 | [Experimental("OPENAI001")] |
| 5489 | public class FileSearchTool : ResponseTool, IJsonModel<FileSearchTool>, IPersistableModel<FileSearchTool> { |
| 5490 | public FileSearchTool(IEnumerable<string> vectorStoreIds); |
| 5491 | public BinaryData Filters { get; set; } |
| 5492 | public int? MaxResultCount { get; set; } |
| 5493 | public FileSearchToolRankingOptions RankingOptions { get; set; } |
| 5494 | public IList<string> VectorStoreIds { get; } |
| 5495 | protected override ResponseTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5496 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5497 | protected override ResponseTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5498 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5499 | } |
| 5500 | [Experimental("OPENAI001")] |
| 5501 | public readonly partial struct FileSearchToolRanker : IEquatable<FileSearchToolRanker> { |
| 5502 | public FileSearchToolRanker(string value); |
| 5503 | public static FileSearchToolRanker Auto { get; } |
| 5504 | public static FileSearchToolRanker Default20241115 { get; } |
| 5505 | public readonly bool Equals(FileSearchToolRanker other); |
| 5506 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5507 | public override readonly bool Equals(object obj); |
| 5508 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5509 | public override readonly int GetHashCode(); |
| 5510 | public static bool operator ==(FileSearchToolRanker left, FileSearchToolRanker right); |
| 5511 | public static implicit operator FileSearchToolRanker(string value); |
| 5512 | public static implicit operator FileSearchToolRanker?(string value); |
| 5513 | public static bool operator !=(FileSearchToolRanker left, FileSearchToolRanker right); |
| 5514 | public override readonly string ToString(); |
| 5515 | } |
| 5516 | [Experimental("OPENAI001")] |
| 5517 | public class FileSearchToolRankingOptions : IJsonModel<FileSearchToolRankingOptions>, IPersistableModel<FileSearchToolRankingOptions> { |
| 5518 | [Serialization.JsonIgnore] |
| 5519 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5520 | [Experimental("SCME0001")] |
| 5521 | public ref JsonPatch Patch { get; } |
| 5522 | public FileSearchToolRanker? Ranker { get; set; } |
| 5523 | public float? ScoreThreshold { get; set; } |
| 5524 | protected virtual FileSearchToolRankingOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5525 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5526 | protected virtual FileSearchToolRankingOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5527 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5528 | } |
| 5529 | [Experimental("OPENAI001")] |
| 5530 | public class FunctionCallOutputResponseItem : ResponseItem, IJsonModel<FunctionCallOutputResponseItem>, IPersistableModel<FunctionCallOutputResponseItem> { |
| 5531 | public FunctionCallOutputResponseItem(string callId, string functionOutput); |
| 5532 | public string CallId { get; set; } |
| 5533 | public string FunctionOutput { get; set; } |
| 5534 | public FunctionCallOutputStatus? Status { get; set; } |
| 5535 | protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5536 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5537 | protected override ResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5538 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5539 | } |
| 5540 | [Experimental("OPENAI001")] |
| 5541 | public enum FunctionCallOutputStatus { |
| 5542 | InProgress = 0, |
| 5543 | Completed = 1, |
| 5544 | Incomplete = 2 |
| 5545 | } |
| 5546 | [Experimental("OPENAI001")] |
| 5547 | public class FunctionCallResponseItem : ResponseItem, IJsonModel<FunctionCallResponseItem>, IPersistableModel<FunctionCallResponseItem> { |
| 5548 | public FunctionCallResponseItem(string callId, string functionName, BinaryData functionArguments); |
| 5549 | public string CallId { get; set; } |
| 5550 | public BinaryData FunctionArguments { get; set; } |
| 5551 | public string FunctionName { get; set; } |
| 5552 | public FunctionCallStatus? Status { get; set; } |
| 5553 | protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5554 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5555 | protected override ResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5556 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5557 | } |
| 5558 | [Experimental("OPENAI001")] |
| 5559 | public enum FunctionCallStatus { |
| 5560 | InProgress = 0, |
| 5561 | Completed = 1, |
| 5562 | Incomplete = 2 |
| 5563 | } |
| 5564 | [Experimental("OPENAI001")] |
| 5565 | public class FunctionTool : ResponseTool, IJsonModel<FunctionTool>, IPersistableModel<FunctionTool> { |
| 5566 | public FunctionTool(string functionName, BinaryData functionParameters, bool? strictModeEnabled); |
| 5567 | public string FunctionDescription { get; set; } |
| 5568 | public string FunctionName { get; set; } |
| 5569 | public BinaryData FunctionParameters { get; set; } |
| 5570 | public bool? StrictModeEnabled { get; set; } |
| 5571 | protected override ResponseTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5572 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5573 | protected override ResponseTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5574 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5575 | } |
| 5576 | [Experimental("OPENAI001")] |
| 5577 | public class GetResponseOptions : IJsonModel<GetResponseOptions>, IPersistableModel<GetResponseOptions> { |
| 5578 | public GetResponseOptions(string responseId); |
| 5579 | public IList<IncludedResponseProperty> IncludedProperties { get; set; } |
| 5580 | public bool? IncludeObfuscation { get; set; } |
| 5581 | [Serialization.JsonIgnore] |
| 5582 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5583 | [Experimental("SCME0001")] |
| 5584 | public ref JsonPatch Patch { get; } |
| 5585 | public string ResponseId { get; } |
| 5586 | public int? StartingAfter { get; set; } |
| 5587 | public bool? StreamingEnabled { get; set; } |
| 5588 | protected virtual GetResponseOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5589 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5590 | protected virtual GetResponseOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5591 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5592 | } |
| 5593 | [Experimental("OPENAI001")] |
| 5594 | public readonly partial struct GlobalMcpToolCallApprovalPolicy : IEquatable<GlobalMcpToolCallApprovalPolicy> { |
| 5595 | public GlobalMcpToolCallApprovalPolicy(string value); |
| 5596 | public static GlobalMcpToolCallApprovalPolicy AlwaysRequireApproval { get; } |
| 5597 | public static GlobalMcpToolCallApprovalPolicy NeverRequireApproval { get; } |
| 5598 | public readonly bool Equals(GlobalMcpToolCallApprovalPolicy other); |
| 5599 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5600 | public override readonly bool Equals(object obj); |
| 5601 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5602 | public override readonly int GetHashCode(); |
| 5603 | public static bool operator ==(GlobalMcpToolCallApprovalPolicy left, GlobalMcpToolCallApprovalPolicy right); |
| 5604 | public static implicit operator GlobalMcpToolCallApprovalPolicy(string value); |
| 5605 | public static implicit operator GlobalMcpToolCallApprovalPolicy?(string value); |
| 5606 | public static bool operator !=(GlobalMcpToolCallApprovalPolicy left, GlobalMcpToolCallApprovalPolicy right); |
| 5607 | public override readonly string ToString(); |
| 5608 | } |
| 5609 | [Experimental("OPENAI001")] |
| 5610 | public class ImageGenerationCallResponseItem : ResponseItem, IJsonModel<ImageGenerationCallResponseItem>, IPersistableModel<ImageGenerationCallResponseItem> { |
| 5611 | public ImageGenerationCallResponseItem(BinaryData imageResultBytes); |
| 5612 | public BinaryData ImageResultBytes { get; set; } |
| 5613 | public ImageGenerationCallStatus? Status { get; set; } |
| 5614 | protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5615 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5616 | protected override ResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5617 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5618 | } |
| 5619 | [Experimental("OPENAI001")] |
| 5620 | public enum ImageGenerationCallStatus { |
| 5621 | InProgress = 0, |
| 5622 | Completed = 1, |
| 5623 | Generating = 2, |
| 5624 | Failed = 3 |
| 5625 | } |
| 5626 | [Experimental("OPENAI001")] |
| 5627 | public class ImageGenerationTool : ResponseTool, IJsonModel<ImageGenerationTool>, IPersistableModel<ImageGenerationTool> { |
| 5628 | public ImageGenerationTool(); |
| 5629 | public ImageGenerationToolBackground? Background { get; set; } |
| 5630 | public ImageGenerationToolInputFidelity? InputFidelity { get; set; } |
| 5631 | public ImageGenerationToolInputImageMask InputImageMask { get; set; } |
| 5632 | public string Model { get; set; } |
| 5633 | public ImageGenerationToolModerationLevel? ModerationLevel { get; set; } |
| 5634 | public int? OutputCompressionFactor { get; set; } |
| 5635 | public ImageGenerationToolOutputFileFormat? OutputFileFormat { get; set; } |
| 5636 | public int? PartialImageCount { get; set; } |
| 5637 | public ImageGenerationToolQuality? Quality { get; set; } |
| 5638 | public ImageGenerationToolSize? Size { get; set; } |
| 5639 | protected override ResponseTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5640 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5641 | protected override ResponseTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5642 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5643 | } |
| 5644 | [Experimental("OPENAI001")] |
| 5645 | public readonly partial struct ImageGenerationToolBackground : IEquatable<ImageGenerationToolBackground> { |
| 5646 | public ImageGenerationToolBackground(string value); |
| 5647 | public static ImageGenerationToolBackground Auto { get; } |
| 5648 | public static ImageGenerationToolBackground Opaque { get; } |
| 5649 | public static ImageGenerationToolBackground Transparent { get; } |
| 5650 | public readonly bool Equals(ImageGenerationToolBackground other); |
| 5651 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5652 | public override readonly bool Equals(object obj); |
| 5653 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5654 | public override readonly int GetHashCode(); |
| 5655 | public static bool operator ==(ImageGenerationToolBackground left, ImageGenerationToolBackground right); |
| 5656 | public static implicit operator ImageGenerationToolBackground(string value); |
| 5657 | public static implicit operator ImageGenerationToolBackground?(string value); |
| 5658 | public static bool operator !=(ImageGenerationToolBackground left, ImageGenerationToolBackground right); |
| 5659 | public override readonly string ToString(); |
| 5660 | } |
| 5661 | [Experimental("OPENAI001")] |
| 5662 | public readonly partial struct ImageGenerationToolInputFidelity : IEquatable<ImageGenerationToolInputFidelity> { |
| 5663 | public ImageGenerationToolInputFidelity(string value); |
| 5664 | public static ImageGenerationToolInputFidelity High { get; } |
| 5665 | public static ImageGenerationToolInputFidelity Low { get; } |
| 5666 | public readonly bool Equals(ImageGenerationToolInputFidelity other); |
| 5667 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5668 | public override readonly bool Equals(object obj); |
| 5669 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5670 | public override readonly int GetHashCode(); |
| 5671 | public static bool operator ==(ImageGenerationToolInputFidelity left, ImageGenerationToolInputFidelity right); |
| 5672 | public static implicit operator ImageGenerationToolInputFidelity(string value); |
| 5673 | public static implicit operator ImageGenerationToolInputFidelity?(string value); |
| 5674 | public static bool operator !=(ImageGenerationToolInputFidelity left, ImageGenerationToolInputFidelity right); |
| 5675 | public override readonly string ToString(); |
| 5676 | } |
| 5677 | [Experimental("OPENAI001")] |
| 5678 | public class ImageGenerationToolInputImageMask : IJsonModel<ImageGenerationToolInputImageMask>, IPersistableModel<ImageGenerationToolInputImageMask> { |
| 5679 | public ImageGenerationToolInputImageMask(string fileId); |
| 5680 | public ImageGenerationToolInputImageMask(Uri imageUri); |
| 5681 | public string FileId { get; } |
| 5682 | public Uri ImageUri { get; } |
| 5683 | [Serialization.JsonIgnore] |
| 5684 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5685 | [Experimental("SCME0001")] |
| 5686 | public ref JsonPatch Patch { get; } |
| 5687 | protected virtual ImageGenerationToolInputImageMask JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5688 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5689 | protected virtual ImageGenerationToolInputImageMask PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5690 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5691 | } |
| 5692 | [Experimental("OPENAI001")] |
| 5693 | public readonly partial struct ImageGenerationToolModerationLevel : IEquatable<ImageGenerationToolModerationLevel> { |
| 5694 | public ImageGenerationToolModerationLevel(string value); |
| 5695 | public static ImageGenerationToolModerationLevel Auto { get; } |
| 5696 | public static ImageGenerationToolModerationLevel Low { get; } |
| 5697 | public readonly bool Equals(ImageGenerationToolModerationLevel other); |
| 5698 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5699 | public override readonly bool Equals(object obj); |
| 5700 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5701 | public override readonly int GetHashCode(); |
| 5702 | public static bool operator ==(ImageGenerationToolModerationLevel left, ImageGenerationToolModerationLevel right); |
| 5703 | public static implicit operator ImageGenerationToolModerationLevel(string value); |
| 5704 | public static implicit operator ImageGenerationToolModerationLevel?(string value); |
| 5705 | public static bool operator !=(ImageGenerationToolModerationLevel left, ImageGenerationToolModerationLevel right); |
| 5706 | public override readonly string ToString(); |
| 5707 | } |
| 5708 | [Experimental("OPENAI001")] |
| 5709 | public readonly partial struct ImageGenerationToolOutputFileFormat : IEquatable<ImageGenerationToolOutputFileFormat> { |
| 5710 | public ImageGenerationToolOutputFileFormat(string value); |
| 5711 | public static ImageGenerationToolOutputFileFormat Jpeg { get; } |
| 5712 | public static ImageGenerationToolOutputFileFormat Png { get; } |
| 5713 | public static ImageGenerationToolOutputFileFormat Webp { get; } |
| 5714 | public readonly bool Equals(ImageGenerationToolOutputFileFormat other); |
| 5715 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5716 | public override readonly bool Equals(object obj); |
| 5717 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5718 | public override readonly int GetHashCode(); |
| 5719 | public static bool operator ==(ImageGenerationToolOutputFileFormat left, ImageGenerationToolOutputFileFormat right); |
| 5720 | public static implicit operator ImageGenerationToolOutputFileFormat(string value); |
| 5721 | public static implicit operator ImageGenerationToolOutputFileFormat?(string value); |
| 5722 | public static bool operator !=(ImageGenerationToolOutputFileFormat left, ImageGenerationToolOutputFileFormat right); |
| 5723 | public override readonly string ToString(); |
| 5724 | } |
| 5725 | [Experimental("OPENAI001")] |
| 5726 | public readonly partial struct ImageGenerationToolQuality : IEquatable<ImageGenerationToolQuality> { |
| 5727 | public ImageGenerationToolQuality(string value); |
| 5728 | public static ImageGenerationToolQuality Auto { get; } |
| 5729 | public static ImageGenerationToolQuality High { get; } |
| 5730 | public static ImageGenerationToolQuality Low { get; } |
| 5731 | public static ImageGenerationToolQuality Medium { get; } |
| 5732 | public readonly bool Equals(ImageGenerationToolQuality other); |
| 5733 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5734 | public override readonly bool Equals(object obj); |
| 5735 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5736 | public override readonly int GetHashCode(); |
| 5737 | public static bool operator ==(ImageGenerationToolQuality left, ImageGenerationToolQuality right); |
| 5738 | public static implicit operator ImageGenerationToolQuality(string value); |
| 5739 | public static implicit operator ImageGenerationToolQuality?(string value); |
| 5740 | public static bool operator !=(ImageGenerationToolQuality left, ImageGenerationToolQuality right); |
| 5741 | public override readonly string ToString(); |
| 5742 | } |
| 5743 | [Experimental("OPENAI001")] |
| 5744 | public readonly partial struct ImageGenerationToolSize : IEquatable<ImageGenerationToolSize> { |
| 5745 | public static readonly ImageGenerationToolSize W1024xH1024; |
| 5746 | public static readonly ImageGenerationToolSize W1024xH1536; |
| 5747 | public static readonly ImageGenerationToolSize W1536xH1024; |
| 5748 | public ImageGenerationToolSize(int width, int height); |
| 5749 | public static ImageGenerationToolSize Auto { get; } |
| 5750 | public readonly bool Equals(ImageGenerationToolSize other); |
| 5751 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5752 | public override readonly bool Equals(object obj); |
| 5753 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5754 | public override readonly int GetHashCode(); |
| 5755 | public static bool operator ==(ImageGenerationToolSize left, ImageGenerationToolSize right); |
| 5756 | public static bool operator !=(ImageGenerationToolSize left, ImageGenerationToolSize right); |
| 5757 | public override readonly string ToString(); |
| 5758 | } |
| 5759 | [Experimental("OPENAI001")] |
| 5760 | public readonly partial struct IncludedResponseProperty : IEquatable<IncludedResponseProperty> { |
| 5761 | public IncludedResponseProperty(string value); |
| 5762 | public static IncludedResponseProperty CodeInterpreterCallOutputs { get; } |
| 5763 | public static IncludedResponseProperty ComputerCallOutputImageUri { get; } |
| 5764 | public static IncludedResponseProperty FileSearchCallResults { get; } |
| 5765 | public static IncludedResponseProperty MessageInputImageUri { get; } |
| 5766 | public static IncludedResponseProperty ReasoningEncryptedContent { get; } |
| 5767 | public readonly bool Equals(IncludedResponseProperty other); |
| 5768 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5769 | public override readonly bool Equals(object obj); |
| 5770 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5771 | public override readonly int GetHashCode(); |
| 5772 | public static bool operator ==(IncludedResponseProperty left, IncludedResponseProperty right); |
| 5773 | public static implicit operator IncludedResponseProperty(string value); |
| 5774 | public static implicit operator IncludedResponseProperty?(string value); |
| 5775 | public static bool operator !=(IncludedResponseProperty left, IncludedResponseProperty right); |
| 5776 | public override readonly string ToString(); |
| 5777 | } |
| 5778 | [Experimental("OPENAI001")] |
| 5779 | public class McpTool : ResponseTool, IJsonModel<McpTool>, IPersistableModel<McpTool> { |
| 5780 | public McpTool(string serverLabel, McpToolConnectorId connectorId); |
| 5781 | public McpTool(string serverLabel, Uri serverUri); |
| 5782 | public McpToolFilter AllowedTools { get; set; } |
| 5783 | public string AuthorizationToken { get; set; } |
| 5784 | public McpToolConnectorId? ConnectorId { get; set; } |
| 5785 | public IDictionary<string, string> Headers { get; set; } |
| 5786 | public string ServerDescription { get; set; } |
| 5787 | public string ServerLabel { get; set; } |
| 5788 | public Uri ServerUri { get; set; } |
| 5789 | public McpToolCallApprovalPolicy ToolCallApprovalPolicy { get; set; } |
| 5790 | protected override ResponseTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5791 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5792 | protected override ResponseTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5793 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5794 | } |
| 5795 | [Experimental("OPENAI001")] |
| 5796 | public class McpToolCallApprovalPolicy : IJsonModel<McpToolCallApprovalPolicy>, IPersistableModel<McpToolCallApprovalPolicy> { |
| 5797 | public McpToolCallApprovalPolicy(CustomMcpToolCallApprovalPolicy customPolicy); |
| 5798 | public McpToolCallApprovalPolicy(GlobalMcpToolCallApprovalPolicy globalPolicy); |
| 5799 | public CustomMcpToolCallApprovalPolicy CustomPolicy { get; } |
| 5800 | public GlobalMcpToolCallApprovalPolicy? GlobalPolicy { get; } |
| 5801 | [Serialization.JsonIgnore] |
| 5802 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5803 | [Experimental("SCME0001")] |
| 5804 | public ref JsonPatch Patch { get; } |
| 5805 | protected virtual McpToolCallApprovalPolicy JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5806 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5807 | public static implicit operator McpToolCallApprovalPolicy(CustomMcpToolCallApprovalPolicy customPolicy); |
| 5808 | public static implicit operator McpToolCallApprovalPolicy(GlobalMcpToolCallApprovalPolicy globalPolicy); |
| 5809 | protected virtual McpToolCallApprovalPolicy PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5810 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5811 | } |
| 5812 | [Experimental("OPENAI001")] |
| 5813 | public class McpToolCallApprovalRequestItem : ResponseItem, IJsonModel<McpToolCallApprovalRequestItem>, IPersistableModel<McpToolCallApprovalRequestItem> { |
| 5814 | public McpToolCallApprovalRequestItem(string id, string serverLabel, string toolName, BinaryData toolArguments); |
| 5815 | public string ServerLabel { get; set; } |
| 5816 | public BinaryData ToolArguments { get; set; } |
| 5817 | public string ToolName { get; set; } |
| 5818 | protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5819 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5820 | protected override ResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5821 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5822 | } |
| 5823 | [Experimental("OPENAI001")] |
| 5824 | public class McpToolCallApprovalResponseItem : ResponseItem, IJsonModel<McpToolCallApprovalResponseItem>, IPersistableModel<McpToolCallApprovalResponseItem> { |
| 5825 | public McpToolCallApprovalResponseItem(string approvalRequestId, bool approved); |
| 5826 | public string ApprovalRequestId { get; set; } |
| 5827 | public bool Approved { get; set; } |
| 5828 | public string Reason { get; set; } |
| 5829 | protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5830 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5831 | protected override ResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5832 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5833 | } |
| 5834 | [Experimental("OPENAI001")] |
| 5835 | public class McpToolCallItem : ResponseItem, IJsonModel<McpToolCallItem>, IPersistableModel<McpToolCallItem> { |
| 5836 | public McpToolCallItem(string serverLabel, string toolName, BinaryData toolArguments); |
| 5837 | public BinaryData Error { get; set; } |
| 5838 | public string ServerLabel { get; set; } |
| 5839 | public BinaryData ToolArguments { get; set; } |
| 5840 | public string ToolName { get; set; } |
| 5841 | public string ToolOutput { get; set; } |
| 5842 | protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5843 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5844 | protected override ResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5845 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5846 | } |
| 5847 | [Experimental("OPENAI001")] |
| 5848 | public readonly partial struct McpToolConnectorId : IEquatable<McpToolConnectorId> { |
| 5849 | public McpToolConnectorId(string value); |
| 5850 | public static McpToolConnectorId Dropbox { get; } |
| 5851 | public static McpToolConnectorId Gmail { get; } |
| 5852 | public static McpToolConnectorId GoogleCalendar { get; } |
| 5853 | public static McpToolConnectorId GoogleDrive { get; } |
| 5854 | public static McpToolConnectorId MicrosoftTeams { get; } |
| 5855 | public static McpToolConnectorId OutlookCalendar { get; } |
| 5856 | public static McpToolConnectorId OutlookEmail { get; } |
| 5857 | public static McpToolConnectorId SharePoint { get; } |
| 5858 | public readonly bool Equals(McpToolConnectorId other); |
| 5859 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5860 | public override readonly bool Equals(object obj); |
| 5861 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5862 | public override readonly int GetHashCode(); |
| 5863 | public static bool operator ==(McpToolConnectorId left, McpToolConnectorId right); |
| 5864 | public static implicit operator McpToolConnectorId(string value); |
| 5865 | public static implicit operator McpToolConnectorId?(string value); |
| 5866 | public static bool operator !=(McpToolConnectorId left, McpToolConnectorId right); |
| 5867 | public override readonly string ToString(); |
| 5868 | } |
| 5869 | [Experimental("OPENAI001")] |
| 5870 | public class McpToolDefinition : IJsonModel<McpToolDefinition>, IPersistableModel<McpToolDefinition> { |
| 5871 | public McpToolDefinition(string name, BinaryData inputSchema); |
| 5872 | public BinaryData Annotations { get; set; } |
| 5873 | public string Description { get; set; } |
| 5874 | public BinaryData InputSchema { get; set; } |
| 5875 | public string Name { get; set; } |
| 5876 | [Serialization.JsonIgnore] |
| 5877 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5878 | [Experimental("SCME0001")] |
| 5879 | public ref JsonPatch Patch { get; } |
| 5880 | protected virtual McpToolDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5881 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5882 | protected virtual McpToolDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5883 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5884 | } |
| 5885 | [Experimental("OPENAI001")] |
| 5886 | public class McpToolDefinitionListItem : ResponseItem, IJsonModel<McpToolDefinitionListItem>, IPersistableModel<McpToolDefinitionListItem> { |
| 5887 | public McpToolDefinitionListItem(string serverLabel, IEnumerable<McpToolDefinition> toolDefinitions); |
| 5888 | public BinaryData Error { get; set; } |
| 5889 | public string ServerLabel { get; set; } |
| 5890 | public IList<McpToolDefinition> ToolDefinitions { get; } |
| 5891 | protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5892 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5893 | protected override ResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5894 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5895 | } |
| 5896 | [Experimental("OPENAI001")] |
| 5897 | public class McpToolFilter : IJsonModel<McpToolFilter>, IPersistableModel<McpToolFilter> { |
| 5898 | public bool? IsReadOnly { get; set; } |
| 5899 | [Serialization.JsonIgnore] |
| 5900 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5901 | [Experimental("SCME0001")] |
| 5902 | public ref JsonPatch Patch { get; } |
| 5903 | public IList<string> ToolNames { get; } |
| 5904 | protected virtual McpToolFilter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5905 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5906 | protected virtual McpToolFilter PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5907 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5908 | } |
| 5909 | [Experimental("OPENAI001")] |
| 5910 | public class MessageResponseItem : ResponseItem, IJsonModel<MessageResponseItem>, IPersistableModel<MessageResponseItem> { |
| 5911 | public IList<ResponseContentPart> Content { get; } |
| 5912 | public MessageRole Role { get; } |
| 5913 | public MessageStatus? Status { get; set; } |
| 5914 | protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5915 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5916 | protected override ResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5917 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5918 | } |
| 5919 | [Experimental("OPENAI001")] |
| 5920 | public enum MessageRole { |
| 5921 | Unknown = 0, |
| 5922 | Assistant = 1, |
| 5923 | Developer = 2, |
| 5924 | System = 3, |
| 5925 | User = 4 |
| 5926 | } |
| 5927 | [Experimental("OPENAI001")] |
| 5928 | public enum MessageStatus { |
| 5929 | InProgress = 0, |
| 5930 | Completed = 1, |
| 5931 | Incomplete = 2 |
| 5932 | } |
| 5933 | [Experimental("OPENAI001")] |
| 5934 | public class ReasoningResponseItem : ResponseItem, IJsonModel<ReasoningResponseItem>, IPersistableModel<ReasoningResponseItem> { |
| 5935 | public ReasoningResponseItem(IEnumerable<ReasoningSummaryPart> summaryParts); |
| 5936 | public ReasoningResponseItem(string summaryText); |
| 5937 | public string EncryptedContent { get; set; } |
| 5938 | public ReasoningStatus? Status { get; set; } |
| 5939 | public IList<ReasoningSummaryPart> SummaryParts { get; } |
| 5940 | public string GetSummaryText(); |
| 5941 | protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5942 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5943 | protected override ResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5944 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5945 | } |
| 5946 | [Experimental("OPENAI001")] |
| 5947 | public enum ReasoningStatus { |
| 5948 | InProgress = 0, |
| 5949 | Completed = 1, |
| 5950 | Incomplete = 2 |
| 5951 | } |
| 5952 | [Experimental("OPENAI001")] |
| 5953 | public class ReasoningSummaryPart : IJsonModel<ReasoningSummaryPart>, IPersistableModel<ReasoningSummaryPart> { |
| 5954 | [Serialization.JsonIgnore] |
| 5955 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5956 | [Experimental("SCME0001")] |
| 5957 | public ref JsonPatch Patch { get; } |
| 5958 | public static ReasoningSummaryTextPart CreateTextPart(string text); |
| 5959 | protected virtual ReasoningSummaryPart JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5960 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5961 | protected virtual ReasoningSummaryPart PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5962 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5963 | } |
| 5964 | [Experimental("OPENAI001")] |
| 5965 | public class ReasoningSummaryTextPart : ReasoningSummaryPart, IJsonModel<ReasoningSummaryTextPart>, IPersistableModel<ReasoningSummaryTextPart> { |
| 5966 | public ReasoningSummaryTextPart(string text); |
| 5967 | public string Text { get; set; } |
| 5968 | protected override ReasoningSummaryPart JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5969 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5970 | protected override ReasoningSummaryPart PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5971 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5972 | } |
| 5973 | [Experimental("OPENAI001")] |
| 5974 | public class ReferenceResponseItem : ResponseItem, IJsonModel<ReferenceResponseItem>, IPersistableModel<ReferenceResponseItem> { |
| 5975 | public ReferenceResponseItem(string id); |
| 5976 | protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 5977 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 5978 | protected override ResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 5979 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 5980 | } |
| 5981 | [Experimental("OPENAI001")] |
| 5982 | public class ResponseContentPart : IJsonModel<ResponseContentPart>, IPersistableModel<ResponseContentPart> { |
| 5983 | public BinaryData InputFileBytes { get; } |
| 5984 | public string InputFileBytesMediaType { get; } |
| 5985 | public string InputFileId { get; } |
| 5986 | public string InputFilename { get; } |
| 5987 | public ResponseImageDetailLevel? InputImageDetailLevel { get; } |
| 5988 | public string InputImageFileId { get; } |
| 5989 | public Uri InputImageUri { get; } |
| 5990 | public ResponseContentPartKind Kind { get; } |
| 5991 | public IReadOnlyList<ResponseMessageAnnotation> OutputTextAnnotations { get; } |
| 5992 | [Serialization.JsonIgnore] |
| 5993 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 5994 | [Experimental("SCME0001")] |
| 5995 | public ref JsonPatch Patch { get; } |
| 5996 | public string Refusal { get; } |
| 5997 | public string Text { get; } |
| 5998 | public static ResponseContentPart CreateInputFilePart(BinaryData fileBytes, string fileBytesMediaType, string filename); |
| 5999 | public static ResponseContentPart CreateInputFilePart(string fileId); |
| 6000 | public static ResponseContentPart CreateInputImagePart(string imageFileId, ResponseImageDetailLevel? imageDetailLevel = null); |
| 6001 | public static ResponseContentPart CreateInputImagePart(Uri imageUri, ResponseImageDetailLevel? imageDetailLevel = null); |
| 6002 | public static ResponseContentPart CreateInputTextPart(string text); |
| 6003 | public static ResponseContentPart CreateOutputTextPart(string text, IEnumerable<ResponseMessageAnnotation> annotations); |
| 6004 | public static ResponseContentPart CreateRefusalPart(string refusal); |
| 6005 | protected virtual ResponseContentPart JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6006 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6007 | protected virtual ResponseContentPart PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6008 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6009 | } |
| 6010 | [Experimental("OPENAI001")] |
| 6011 | public enum ResponseContentPartKind { |
| 6012 | Unknown = 0, |
| 6013 | InputText = 1, |
| 6014 | InputImage = 2, |
| 6015 | InputFile = 3, |
| 6016 | OutputText = 4, |
| 6017 | Refusal = 5 |
| 6018 | } |
| 6019 | [Experimental("OPENAI001")] |
| 6020 | public class ResponseConversationOptions : IJsonModel<ResponseConversationOptions>, IPersistableModel<ResponseConversationOptions> { |
| 6021 | public ResponseConversationOptions(string conversationId); |
| 6022 | public string ConversationId { get; set; } |
| 6023 | [Serialization.JsonIgnore] |
| 6024 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6025 | [Experimental("SCME0001")] |
| 6026 | public ref JsonPatch Patch { get; } |
| 6027 | protected virtual ResponseConversationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6028 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6029 | protected virtual ResponseConversationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6030 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6031 | } |
| 6032 | [Experimental("OPENAI001")] |
| 6033 | public class ResponseDeletionResult : IJsonModel<ResponseDeletionResult>, IPersistableModel<ResponseDeletionResult> { |
| 6034 | public bool Deleted { get; set; } |
| 6035 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6036 | public string Object { get; set; } |
| 6037 | [Serialization.JsonIgnore] |
| 6038 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6039 | [Experimental("SCME0001")] |
| 6040 | public ref JsonPatch Patch { get; } |
| 6041 | public string ResponseId { get; set; } |
| 6042 | protected virtual ResponseDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6043 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6044 | public static explicit operator ResponseDeletionResult(ClientResult result); |
| 6045 | protected virtual ResponseDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6046 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6047 | } |
| 6048 | [Experimental("OPENAI001")] |
| 6049 | public class ResponseError : IJsonModel<ResponseError>, IPersistableModel<ResponseError> { |
| 6050 | public ResponseErrorCode Code { get; } |
| 6051 | public string Message { get; } |
| 6052 | [Serialization.JsonIgnore] |
| 6053 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6054 | [Experimental("SCME0001")] |
| 6055 | public ref JsonPatch Patch { get; } |
| 6056 | protected virtual ResponseError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6057 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6058 | protected virtual ResponseError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6059 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6060 | } |
| 6061 | [Experimental("OPENAI001")] |
| 6062 | public readonly partial struct ResponseErrorCode : IEquatable<ResponseErrorCode> { |
| 6063 | public ResponseErrorCode(string value); |
| 6064 | public static ResponseErrorCode EmptyImageFile { get; } |
| 6065 | public static ResponseErrorCode FailedToDownloadImage { get; } |
| 6066 | public static ResponseErrorCode ImageContentPolicyViolation { get; } |
| 6067 | public static ResponseErrorCode ImageFileNotFound { get; } |
| 6068 | public static ResponseErrorCode ImageFileTooLarge { get; } |
| 6069 | public static ResponseErrorCode ImageParseError { get; } |
| 6070 | public static ResponseErrorCode ImageTooLarge { get; } |
| 6071 | public static ResponseErrorCode ImageTooSmall { get; } |
| 6072 | public static ResponseErrorCode InvalidBase64Image { get; } |
| 6073 | public static ResponseErrorCode InvalidImage { get; } |
| 6074 | public static ResponseErrorCode InvalidImageFormat { get; } |
| 6075 | public static ResponseErrorCode InvalidImageMode { get; } |
| 6076 | public static ResponseErrorCode InvalidImageUrl { get; } |
| 6077 | public static ResponseErrorCode InvalidPrompt { get; } |
| 6078 | public static ResponseErrorCode RateLimitExceeded { get; } |
| 6079 | public static ResponseErrorCode ServerError { get; } |
| 6080 | public static ResponseErrorCode UnsupportedImageMediaType { get; } |
| 6081 | public static ResponseErrorCode VectorStoreTimeout { get; } |
| 6082 | public readonly bool Equals(ResponseErrorCode other); |
| 6083 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6084 | public override readonly bool Equals(object obj); |
| 6085 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6086 | public override readonly int GetHashCode(); |
| 6087 | public static bool operator ==(ResponseErrorCode left, ResponseErrorCode right); |
| 6088 | public static implicit operator ResponseErrorCode(string value); |
| 6089 | public static implicit operator ResponseErrorCode?(string value); |
| 6090 | public static bool operator !=(ResponseErrorCode left, ResponseErrorCode right); |
| 6091 | public override readonly string ToString(); |
| 6092 | } |
| 6093 | [Experimental("OPENAI001")] |
| 6094 | public readonly partial struct ResponseImageDetailLevel : IEquatable<ResponseImageDetailLevel> { |
| 6095 | public ResponseImageDetailLevel(string value); |
| 6096 | public static ResponseImageDetailLevel Auto { get; } |
| 6097 | public static ResponseImageDetailLevel High { get; } |
| 6098 | public static ResponseImageDetailLevel Low { get; } |
| 6099 | public readonly bool Equals(ResponseImageDetailLevel other); |
| 6100 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6101 | public override readonly bool Equals(object obj); |
| 6102 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6103 | public override readonly int GetHashCode(); |
| 6104 | public static bool operator ==(ResponseImageDetailLevel left, ResponseImageDetailLevel right); |
| 6105 | public static implicit operator ResponseImageDetailLevel(string value); |
| 6106 | public static implicit operator ResponseImageDetailLevel?(string value); |
| 6107 | public static bool operator !=(ResponseImageDetailLevel left, ResponseImageDetailLevel right); |
| 6108 | public override readonly string ToString(); |
| 6109 | } |
| 6110 | [Experimental("OPENAI001")] |
| 6111 | public class ResponseIncompleteStatusDetails : IJsonModel<ResponseIncompleteStatusDetails>, IPersistableModel<ResponseIncompleteStatusDetails> { |
| 6112 | [Serialization.JsonIgnore] |
| 6113 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6114 | [Experimental("SCME0001")] |
| 6115 | public ref JsonPatch Patch { get; } |
| 6116 | public ResponseIncompleteStatusReason? Reason { get; } |
| 6117 | protected virtual ResponseIncompleteStatusDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6118 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6119 | protected virtual ResponseIncompleteStatusDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6120 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6121 | } |
| 6122 | [Experimental("OPENAI001")] |
| 6123 | public readonly partial struct ResponseIncompleteStatusReason : IEquatable<ResponseIncompleteStatusReason> { |
| 6124 | public ResponseIncompleteStatusReason(string value); |
| 6125 | public static ResponseIncompleteStatusReason ContentFilter { get; } |
| 6126 | public static ResponseIncompleteStatusReason MaxOutputTokens { get; } |
| 6127 | public readonly bool Equals(ResponseIncompleteStatusReason other); |
| 6128 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6129 | public override readonly bool Equals(object obj); |
| 6130 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6131 | public override readonly int GetHashCode(); |
| 6132 | public static bool operator ==(ResponseIncompleteStatusReason left, ResponseIncompleteStatusReason right); |
| 6133 | public static implicit operator ResponseIncompleteStatusReason(string value); |
| 6134 | public static implicit operator ResponseIncompleteStatusReason?(string value); |
| 6135 | public static bool operator !=(ResponseIncompleteStatusReason left, ResponseIncompleteStatusReason right); |
| 6136 | public override readonly string ToString(); |
| 6137 | } |
| 6138 | [Experimental("OPENAI001")] |
| 6139 | public class ResponseInputTokenUsageDetails : IJsonModel<ResponseInputTokenUsageDetails>, IPersistableModel<ResponseInputTokenUsageDetails> { |
| 6140 | public int CachedTokenCount { get; set; } |
| 6141 | [Serialization.JsonIgnore] |
| 6142 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6143 | [Experimental("SCME0001")] |
| 6144 | public ref JsonPatch Patch { get; } |
| 6145 | protected virtual ResponseInputTokenUsageDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6146 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6147 | protected virtual ResponseInputTokenUsageDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6148 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6149 | } |
| 6150 | [Experimental("OPENAI001")] |
| 6151 | public class ResponseItem : IJsonModel<ResponseItem>, IPersistableModel<ResponseItem> { |
| 6152 | public string Id { get; set; } |
| 6153 | [Serialization.JsonIgnore] |
| 6154 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6155 | [Experimental("SCME0001")] |
| 6156 | public ref JsonPatch Patch { get; } |
| 6157 | public static MessageResponseItem CreateAssistantMessageItem(IEnumerable<ResponseContentPart> contentParts); |
| 6158 | public static MessageResponseItem CreateAssistantMessageItem(string outputTextContent, IEnumerable<ResponseMessageAnnotation> annotations = null); |
| 6159 | [Experimental("OPENAICUA001")] |
| 6160 | public static ComputerCallResponseItem CreateComputerCallItem(string callId, ComputerCallAction action, IEnumerable<ComputerCallSafetyCheck> pendingSafetyChecks); |
| 6161 | [Experimental("OPENAICUA001")] |
| 6162 | public static ComputerCallOutputResponseItem CreateComputerCallOutputItem(string callId, ComputerCallOutput output); |
| 6163 | public static MessageResponseItem CreateDeveloperMessageItem(IEnumerable<ResponseContentPart> contentParts); |
| 6164 | public static MessageResponseItem CreateDeveloperMessageItem(string inputTextContent); |
| 6165 | public static FileSearchCallResponseItem CreateFileSearchCallItem(IEnumerable<string> queries); |
| 6166 | public static FunctionCallResponseItem CreateFunctionCallItem(string callId, string functionName, BinaryData functionArguments); |
| 6167 | public static FunctionCallOutputResponseItem CreateFunctionCallOutputItem(string callId, string functionOutput); |
| 6168 | public static McpToolCallApprovalRequestItem CreateMcpApprovalRequestItem(string id, string serverLabel, string name, BinaryData arguments); |
| 6169 | public static McpToolCallApprovalResponseItem CreateMcpApprovalResponseItem(string approvalRequestId, bool approved); |
| 6170 | public static McpToolCallItem CreateMcpToolCallItem(string serverLabel, string name, BinaryData arguments); |
| 6171 | public static McpToolDefinitionListItem CreateMcpToolDefinitionListItem(string serverLabel, IEnumerable<McpToolDefinition> toolDefinitions); |
| 6172 | public static ReasoningResponseItem CreateReasoningItem(IEnumerable<ReasoningSummaryPart> summaryParts); |
| 6173 | public static ReasoningResponseItem CreateReasoningItem(string summaryText); |
| 6174 | public static ReferenceResponseItem CreateReferenceItem(string id); |
| 6175 | public static MessageResponseItem CreateSystemMessageItem(IEnumerable<ResponseContentPart> contentParts); |
| 6176 | public static MessageResponseItem CreateSystemMessageItem(string inputTextContent); |
| 6177 | public static MessageResponseItem CreateUserMessageItem(IEnumerable<ResponseContentPart> contentParts); |
| 6178 | public static MessageResponseItem CreateUserMessageItem(string inputTextContent); |
| 6179 | public static WebSearchCallResponseItem CreateWebSearchCallItem(); |
| 6180 | protected virtual ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6181 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6182 | public static explicit operator ResponseItem(ClientResult result); |
| 6183 | protected virtual ResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6184 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6185 | } |
| 6186 | [Experimental("OPENAI001")] |
| 6187 | public class ResponseItemCollectionOptions : IJsonModel<ResponseItemCollectionOptions>, IPersistableModel<ResponseItemCollectionOptions> { |
| 6188 | public ResponseItemCollectionOptions(string responseId); |
| 6189 | public string AfterId { get; set; } |
| 6190 | public string BeforeId { get; set; } |
| 6191 | public ResponseItemCollectionOrder? Order { get; set; } |
| 6192 | public int? PageSizeLimit { get; set; } |
| 6193 | public string ResponseId { get; } |
| 6194 | protected virtual ResponseItemCollectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6195 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6196 | protected virtual ResponseItemCollectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6197 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6198 | } |
| 6199 | [Experimental("OPENAI001")] |
| 6200 | public readonly partial struct ResponseItemCollectionOrder : IEquatable<ResponseItemCollectionOrder> { |
| 6201 | public ResponseItemCollectionOrder(string value); |
| 6202 | public static ResponseItemCollectionOrder Ascending { get; } |
| 6203 | public static ResponseItemCollectionOrder Descending { get; } |
| 6204 | public readonly bool Equals(ResponseItemCollectionOrder other); |
| 6205 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6206 | public override readonly bool Equals(object obj); |
| 6207 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6208 | public override readonly int GetHashCode(); |
| 6209 | public static bool operator ==(ResponseItemCollectionOrder left, ResponseItemCollectionOrder right); |
| 6210 | public static implicit operator ResponseItemCollectionOrder(string value); |
| 6211 | public static implicit operator ResponseItemCollectionOrder?(string value); |
| 6212 | public static bool operator !=(ResponseItemCollectionOrder left, ResponseItemCollectionOrder right); |
| 6213 | public override readonly string ToString(); |
| 6214 | } |
| 6215 | [Experimental("OPENAI001")] |
| 6216 | public class ResponseItemCollectionPage : IJsonModel<ResponseItemCollectionPage>, IPersistableModel<ResponseItemCollectionPage> { |
| 6217 | public IList<ResponseItem> Data { get; } |
| 6218 | public string FirstId { get; set; } |
| 6219 | public bool HasMore { get; set; } |
| 6220 | public string LastId { get; set; } |
| 6221 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6222 | public string Object { get; set; } |
| 6223 | [Serialization.JsonIgnore] |
| 6224 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6225 | [Experimental("SCME0001")] |
| 6226 | public ref JsonPatch Patch { get; } |
| 6227 | protected virtual ResponseItemCollectionPage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6228 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6229 | public static explicit operator ResponseItemCollectionPage(ClientResult result); |
| 6230 | protected virtual ResponseItemCollectionPage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6231 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6232 | } |
| 6233 | [Experimental("OPENAI001")] |
| 6234 | public class ResponseMessageAnnotation : IJsonModel<ResponseMessageAnnotation>, IPersistableModel<ResponseMessageAnnotation> { |
| 6235 | public ResponseMessageAnnotationKind Kind { get; } |
| 6236 | [Serialization.JsonIgnore] |
| 6237 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6238 | [Experimental("SCME0001")] |
| 6239 | public ref JsonPatch Patch { get; } |
| 6240 | protected virtual ResponseMessageAnnotation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6241 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6242 | protected virtual ResponseMessageAnnotation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6243 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6244 | } |
| 6245 | [Experimental("OPENAI001")] |
| 6246 | public enum ResponseMessageAnnotationKind { |
| 6247 | FileCitation = 0, |
| 6248 | UriCitation = 1, |
| 6249 | FilePath = 2, |
| 6250 | ContainerFileCitation = 3 |
| 6251 | } |
| 6252 | [Experimental("OPENAI001")] |
| 6253 | public class ResponseOutputTokenUsageDetails : IJsonModel<ResponseOutputTokenUsageDetails>, IPersistableModel<ResponseOutputTokenUsageDetails> { |
| 6254 | [Serialization.JsonIgnore] |
| 6255 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6256 | [Experimental("SCME0001")] |
| 6257 | public ref JsonPatch Patch { get; } |
| 6258 | public int ReasoningTokenCount { get; set; } |
| 6259 | protected virtual ResponseOutputTokenUsageDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6260 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6261 | protected virtual ResponseOutputTokenUsageDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6262 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6263 | } |
| 6264 | [Experimental("OPENAI001")] |
| 6265 | public readonly partial struct ResponseReasoningEffortLevel : IEquatable<ResponseReasoningEffortLevel> { |
| 6266 | public ResponseReasoningEffortLevel(string value); |
| 6267 | public static ResponseReasoningEffortLevel High { get; } |
| 6268 | public static ResponseReasoningEffortLevel Low { get; } |
| 6269 | public static ResponseReasoningEffortLevel Medium { get; } |
| 6270 | public static ResponseReasoningEffortLevel Minimal { get; } |
| 6271 | public static ResponseReasoningEffortLevel None { get; } |
| 6272 | public readonly bool Equals(ResponseReasoningEffortLevel other); |
| 6273 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6274 | public override readonly bool Equals(object obj); |
| 6275 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6276 | public override readonly int GetHashCode(); |
| 6277 | public static bool operator ==(ResponseReasoningEffortLevel left, ResponseReasoningEffortLevel right); |
| 6278 | public static implicit operator ResponseReasoningEffortLevel(string value); |
| 6279 | public static implicit operator ResponseReasoningEffortLevel?(string value); |
| 6280 | public static bool operator !=(ResponseReasoningEffortLevel left, ResponseReasoningEffortLevel right); |
| 6281 | public override readonly string ToString(); |
| 6282 | } |
| 6283 | [Experimental("OPENAI001")] |
| 6284 | public class ResponseReasoningOptions : IJsonModel<ResponseReasoningOptions>, IPersistableModel<ResponseReasoningOptions> { |
| 6285 | [Serialization.JsonIgnore] |
| 6286 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6287 | [Experimental("SCME0001")] |
| 6288 | public ref JsonPatch Patch { get; } |
| 6289 | public ResponseReasoningEffortLevel? ReasoningEffortLevel { get; set; } |
| 6290 | public ResponseReasoningSummaryVerbosity? ReasoningSummaryVerbosity { get; set; } |
| 6291 | protected virtual ResponseReasoningOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6292 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6293 | protected virtual ResponseReasoningOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6294 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6295 | } |
| 6296 | [Experimental("OPENAI001")] |
| 6297 | public readonly partial struct ResponseReasoningSummaryVerbosity : IEquatable<ResponseReasoningSummaryVerbosity> { |
| 6298 | public ResponseReasoningSummaryVerbosity(string value); |
| 6299 | public static ResponseReasoningSummaryVerbosity Auto { get; } |
| 6300 | public static ResponseReasoningSummaryVerbosity Concise { get; } |
| 6301 | public static ResponseReasoningSummaryVerbosity Detailed { get; } |
| 6302 | public readonly bool Equals(ResponseReasoningSummaryVerbosity other); |
| 6303 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6304 | public override readonly bool Equals(object obj); |
| 6305 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6306 | public override readonly int GetHashCode(); |
| 6307 | public static bool operator ==(ResponseReasoningSummaryVerbosity left, ResponseReasoningSummaryVerbosity right); |
| 6308 | public static implicit operator ResponseReasoningSummaryVerbosity(string value); |
| 6309 | public static implicit operator ResponseReasoningSummaryVerbosity?(string value); |
| 6310 | public static bool operator !=(ResponseReasoningSummaryVerbosity left, ResponseReasoningSummaryVerbosity right); |
| 6311 | public override readonly string ToString(); |
| 6312 | } |
| 6313 | [Experimental("OPENAI001")] |
| 6314 | public class ResponseResult : IJsonModel<ResponseResult>, IPersistableModel<ResponseResult> { |
| 6315 | public bool? BackgroundModeEnabled { get; set; } |
| 6316 | public ResponseConversationOptions ConversationOptions { get; set; } |
| 6317 | public DateTimeOffset CreatedAt { get; set; } |
| 6318 | public string EndUserId { get; set; } |
| 6319 | public ResponseError Error { get; set; } |
| 6320 | public string Id { get; set; } |
| 6321 | public ResponseIncompleteStatusDetails IncompleteStatusDetails { get; set; } |
| 6322 | public string Instructions { get; set; } |
| 6323 | public int? MaxOutputTokenCount { get; set; } |
| 6324 | public int? MaxToolCallCount { get; set; } |
| 6325 | public IDictionary<string, string> Metadata { get; } |
| 6326 | public string Model { get; set; } |
| 6327 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6328 | public string Object { get; set; } |
| 6329 | public IList<ResponseItem> OutputItems { get; } |
| 6330 | public bool ParallelToolCallsEnabled { get; set; } |
| 6331 | [Serialization.JsonIgnore] |
| 6332 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6333 | [Experimental("SCME0001")] |
| 6334 | public ref JsonPatch Patch { get; } |
| 6335 | public string PreviousResponseId { get; set; } |
| 6336 | public ResponseReasoningOptions ReasoningOptions { get; set; } |
| 6337 | public string SafetyIdentifier { get; set; } |
| 6338 | public ResponseServiceTier? ServiceTier { get; set; } |
| 6339 | public ResponseStatus? Status { get; set; } |
| 6340 | public float? Temperature { get; set; } |
| 6341 | public ResponseTextOptions TextOptions { get; set; } |
| 6342 | public ResponseToolChoice ToolChoice { get; set; } |
| 6343 | public IList<ResponseTool> Tools { get; } |
| 6344 | public int? TopLogProbabilityCount { get; set; } |
| 6345 | public float? TopP { get; set; } |
| 6346 | public ResponseTruncationMode? TruncationMode { get; set; } |
| 6347 | public ResponseTokenUsage Usage { get; set; } |
| 6348 | public string GetOutputText(); |
| 6349 | protected virtual ResponseResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6350 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6351 | public static explicit operator ResponseResult(ClientResult result); |
| 6352 | protected virtual ResponseResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6353 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6354 | } |
| 6355 | [Experimental("OPENAI001")] |
| 6356 | public class ResponsesClient { |
| 6357 | protected ResponsesClient(); |
| 6358 | public ResponsesClient(ApiKeyCredential credential, OpenAIClientOptions options); |
| 6359 | public ResponsesClient(ApiKeyCredential credential); |
| 6360 | public ResponsesClient(AuthenticationPolicy authenticationPolicy, OpenAIClientOptions options); |
| 6361 | public ResponsesClient(AuthenticationPolicy authenticationPolicy); |
| 6362 | protected internal ResponsesClient(ClientPipeline pipeline, OpenAIClientOptions options); |
| 6363 | public ResponsesClient(string apiKey); |
| 6364 | [Experimental("OPENAI001")] |
| 6365 | public virtual Uri Endpoint { get; } |
| 6366 | public ClientPipeline Pipeline { get; } |
| 6367 | public virtual ClientResult CancelResponse(string responseId, RequestOptions options); |
| 6368 | public virtual ClientResult<ResponseResult> CancelResponse(string responseId, CancellationToken cancellationToken = default); |
| 6369 | public virtual Task<ClientResult> CancelResponseAsync(string responseId, RequestOptions options); |
| 6370 | public virtual Task<ClientResult<ResponseResult>> CancelResponseAsync(string responseId, CancellationToken cancellationToken = default); |
| 6371 | public virtual ClientResult CompactResponse(string contentType, BinaryContent content, RequestOptions options = null); |
| 6372 | public virtual Task<ClientResult> CompactResponseAsync(string contentType, BinaryContent content, RequestOptions options = null); |
| 6373 | public virtual ClientResult<ResponseResult> CreateResponse(CreateResponseOptions options, CancellationToken cancellationToken = default); |
| 6374 | public virtual ClientResult CreateResponse(BinaryContent content, RequestOptions options = null); |
| 6375 | public virtual ClientResult<ResponseResult> CreateResponse(string model, IEnumerable<ResponseItem> inputItems, string previousResponseId = null, CancellationToken cancellationToken = default); |
| 6376 | public virtual ClientResult<ResponseResult> CreateResponse(string model, string userInputText, string previousResponseId = null, CancellationToken cancellationToken = default); |
| 6377 | public virtual Task<ClientResult<ResponseResult>> CreateResponseAsync(CreateResponseOptions options, CancellationToken cancellationToken = default); |
| 6378 | public virtual Task<ClientResult> CreateResponseAsync(BinaryContent content, RequestOptions options = null); |
| 6379 | public virtual Task<ClientResult<ResponseResult>> CreateResponseAsync(string model, IEnumerable<ResponseItem> inputItems, string previousResponseId = null, CancellationToken cancellationToken = default); |
| 6380 | public virtual Task<ClientResult<ResponseResult>> CreateResponseAsync(string model, string userInputText, string previousResponseId = null, CancellationToken cancellationToken = default); |
| 6381 | public virtual CollectionResult<StreamingResponseUpdate> CreateResponseStreaming(CreateResponseOptions options, CancellationToken cancellationToken = default); |
| 6382 | public virtual CollectionResult<StreamingResponseUpdate> CreateResponseStreaming(string model, IEnumerable<ResponseItem> inputItems, string previousResponseId = null, CancellationToken cancellationToken = default); |
| 6383 | public virtual CollectionResult<StreamingResponseUpdate> CreateResponseStreaming(string model, string userInputText, string previousResponseId = null, CancellationToken cancellationToken = default); |
| 6384 | public virtual AsyncCollectionResult<StreamingResponseUpdate> CreateResponseStreamingAsync(CreateResponseOptions options, CancellationToken cancellationToken = default); |
| 6385 | public virtual AsyncCollectionResult<StreamingResponseUpdate> CreateResponseStreamingAsync(string model, IEnumerable<ResponseItem> inputItems, string previousResponseId = null, CancellationToken cancellationToken = default); |
| 6386 | public virtual AsyncCollectionResult<StreamingResponseUpdate> CreateResponseStreamingAsync(string model, string userInputText, string previousResponseId = null, CancellationToken cancellationToken = default); |
| 6387 | public virtual ClientResult DeleteResponse(string responseId, RequestOptions options); |
| 6388 | public virtual ClientResult<ResponseDeletionResult> DeleteResponse(string responseId, CancellationToken cancellationToken = default); |
| 6389 | public virtual Task<ClientResult> DeleteResponseAsync(string responseId, RequestOptions options); |
| 6390 | public virtual Task<ClientResult<ResponseDeletionResult>> DeleteResponseAsync(string responseId, CancellationToken cancellationToken = default); |
| 6391 | public virtual ClientResult GetInputTokenCount(string contentType, BinaryContent content, RequestOptions options = null); |
| 6392 | public virtual Task<ClientResult> GetInputTokenCountAsync(string contentType, BinaryContent content, RequestOptions options = null); |
| 6393 | public virtual ClientResult<ResponseResult> GetResponse(GetResponseOptions options, CancellationToken cancellationToken = default); |
| 6394 | public virtual ClientResult GetResponse(string responseId, IEnumerable<IncludedResponseProperty> include, bool? stream, int? startingAfter, bool? includeObfuscation, RequestOptions options); |
| 6395 | public virtual ClientResult<ResponseResult> GetResponse(string responseId, CancellationToken cancellationToken = default); |
| 6396 | public virtual Task<ClientResult<ResponseResult>> GetResponseAsync(GetResponseOptions options, CancellationToken cancellationToken = default); |
| 6397 | public virtual Task<ClientResult> GetResponseAsync(string responseId, IEnumerable<IncludedResponseProperty> include, bool? stream, int? startingAfter, bool? includeObfuscation, RequestOptions options); |
| 6398 | public virtual Task<ClientResult<ResponseResult>> GetResponseAsync(string responseId, CancellationToken cancellationToken = default); |
| 6399 | public virtual ClientResult<ResponseItemCollectionPage> GetResponseInputItemCollectionPage(ResponseItemCollectionOptions options, CancellationToken cancellationToken = default); |
| 6400 | public virtual ClientResult GetResponseInputItemCollectionPage(string responseId, int? limit, string order, string after, string before, RequestOptions options); |
| 6401 | public virtual Task<ClientResult<ResponseItemCollectionPage>> GetResponseInputItemCollectionPageAsync(ResponseItemCollectionOptions options, CancellationToken cancellationToken = default); |
| 6402 | public virtual Task<ClientResult> GetResponseInputItemCollectionPageAsync(string responseId, int? limit, string order, string after, string before, RequestOptions options); |
| 6403 | public virtual CollectionResult<ResponseItem> GetResponseInputItems(ResponseItemCollectionOptions options, CancellationToken cancellationToken = default); |
| 6404 | public virtual CollectionResult<ResponseItem> GetResponseInputItems(string responseId, CancellationToken cancellationToken = default); |
| 6405 | public virtual AsyncCollectionResult<ResponseItem> GetResponseInputItemsAsync(ResponseItemCollectionOptions options, CancellationToken cancellationToken = default); |
| 6406 | public virtual AsyncCollectionResult<ResponseItem> GetResponseInputItemsAsync(string responseId, CancellationToken cancellationToken = default); |
| 6407 | public virtual CollectionResult<StreamingResponseUpdate> GetResponseStreaming(GetResponseOptions options, CancellationToken cancellationToken = default); |
| 6408 | public virtual CollectionResult<StreamingResponseUpdate> GetResponseStreaming(string responseId, CancellationToken cancellationToken = default); |
| 6409 | public virtual AsyncCollectionResult<StreamingResponseUpdate> GetResponseStreamingAsync(GetResponseOptions options, CancellationToken cancellationToken = default); |
| 6410 | public virtual AsyncCollectionResult<StreamingResponseUpdate> GetResponseStreamingAsync(string responseId, CancellationToken cancellationToken = default); |
| 6411 | } |
| 6412 | [Experimental("OPENAI001")] |
| 6413 | public readonly partial struct ResponseServiceTier : IEquatable<ResponseServiceTier> { |
| 6414 | public ResponseServiceTier(string value); |
| 6415 | public static ResponseServiceTier Auto { get; } |
| 6416 | public static ResponseServiceTier Default { get; } |
| 6417 | public static ResponseServiceTier Flex { get; } |
| 6418 | public static ResponseServiceTier Scale { get; } |
| 6419 | public readonly bool Equals(ResponseServiceTier other); |
| 6420 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6421 | public override readonly bool Equals(object obj); |
| 6422 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6423 | public override readonly int GetHashCode(); |
| 6424 | public static bool operator ==(ResponseServiceTier left, ResponseServiceTier right); |
| 6425 | public static implicit operator ResponseServiceTier(string value); |
| 6426 | public static implicit operator ResponseServiceTier?(string value); |
| 6427 | public static bool operator !=(ResponseServiceTier left, ResponseServiceTier right); |
| 6428 | public override readonly string ToString(); |
| 6429 | } |
| 6430 | [Experimental("OPENAI001")] |
| 6431 | public enum ResponseStatus { |
| 6432 | InProgress = 0, |
| 6433 | Completed = 1, |
| 6434 | Cancelled = 2, |
| 6435 | Queued = 3, |
| 6436 | Incomplete = 4, |
| 6437 | Failed = 5 |
| 6438 | } |
| 6439 | [Experimental("OPENAI001")] |
| 6440 | public class ResponseTextFormat : IJsonModel<ResponseTextFormat>, IPersistableModel<ResponseTextFormat> { |
| 6441 | public ResponseTextFormatKind Kind { get; set; } |
| 6442 | [Serialization.JsonIgnore] |
| 6443 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6444 | [Experimental("SCME0001")] |
| 6445 | public ref JsonPatch Patch { get; } |
| 6446 | public static ResponseTextFormat CreateJsonObjectFormat(); |
| 6447 | public static ResponseTextFormat CreateJsonSchemaFormat(string jsonSchemaFormatName, BinaryData jsonSchema, string jsonSchemaFormatDescription = null, bool? jsonSchemaIsStrict = null); |
| 6448 | public static ResponseTextFormat CreateTextFormat(); |
| 6449 | protected virtual ResponseTextFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6450 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6451 | protected virtual ResponseTextFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6452 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6453 | } |
| 6454 | [Experimental("OPENAI001")] |
| 6455 | public enum ResponseTextFormatKind { |
| 6456 | Unknown = 0, |
| 6457 | Text = 1, |
| 6458 | JsonObject = 2, |
| 6459 | JsonSchema = 3 |
| 6460 | } |
| 6461 | [Experimental("OPENAI001")] |
| 6462 | public class ResponseTextOptions : IJsonModel<ResponseTextOptions>, IPersistableModel<ResponseTextOptions> { |
| 6463 | [Serialization.JsonIgnore] |
| 6464 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6465 | [Experimental("SCME0001")] |
| 6466 | public ref JsonPatch Patch { get; } |
| 6467 | public ResponseTextFormat TextFormat { get; set; } |
| 6468 | protected virtual ResponseTextOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6469 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6470 | protected virtual ResponseTextOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6471 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6472 | } |
| 6473 | [Experimental("OPENAI001")] |
| 6474 | public class ResponseTokenUsage : IJsonModel<ResponseTokenUsage>, IPersistableModel<ResponseTokenUsage> { |
| 6475 | public int InputTokenCount { get; set; } |
| 6476 | public ResponseInputTokenUsageDetails InputTokenDetails { get; set; } |
| 6477 | public int OutputTokenCount { get; set; } |
| 6478 | public ResponseOutputTokenUsageDetails OutputTokenDetails { get; set; } |
| 6479 | [Serialization.JsonIgnore] |
| 6480 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6481 | [Experimental("SCME0001")] |
| 6482 | public ref JsonPatch Patch { get; } |
| 6483 | public int TotalTokenCount { get; set; } |
| 6484 | protected virtual ResponseTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6485 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6486 | protected virtual ResponseTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6487 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6488 | } |
| 6489 | [Experimental("OPENAI001")] |
| 6490 | public class ResponseTool : IJsonModel<ResponseTool>, IPersistableModel<ResponseTool> { |
| 6491 | [Serialization.JsonIgnore] |
| 6492 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6493 | [Experimental("SCME0001")] |
| 6494 | public ref JsonPatch Patch { get; } |
| 6495 | public static CodeInterpreterTool CreateCodeInterpreterTool(CodeInterpreterToolContainer container); |
| 6496 | [Experimental("OPENAICUA001")] |
| 6497 | public static ComputerTool CreateComputerTool(ComputerToolEnvironment environment, int displayWidth, int displayHeight); |
| 6498 | public static FileSearchTool CreateFileSearchTool(IEnumerable<string> vectorStoreIds, int? maxResultCount = null, FileSearchToolRankingOptions rankingOptions = null, BinaryData filters = null); |
| 6499 | public static FunctionTool CreateFunctionTool(string functionName, BinaryData functionParameters, bool? strictModeEnabled, string functionDescription = null); |
| 6500 | public static ImageGenerationTool CreateImageGenerationTool(string model, ImageGenerationToolQuality? quality = null, ImageGenerationToolSize? size = null, ImageGenerationToolOutputFileFormat? outputFileFormat = null, int? outputCompressionFactor = null, ImageGenerationToolModerationLevel? moderationLevel = null, ImageGenerationToolBackground? background = null, ImageGenerationToolInputFidelity? inputFidelity = null, ImageGenerationToolInputImageMask inputImageMask = null, int? partialImageCount = null); |
| 6501 | public static McpTool CreateMcpTool(string serverLabel, McpToolConnectorId connectorId, string authorizationToken = null, string serverDescription = null, IDictionary<string, string> headers = null, McpToolFilter allowedTools = null, McpToolCallApprovalPolicy toolCallApprovalPolicy = null); |
| 6502 | public static McpTool CreateMcpTool(string serverLabel, Uri serverUri, string authorizationToken = null, string serverDescription = null, IDictionary<string, string> headers = null, McpToolFilter allowedTools = null, McpToolCallApprovalPolicy toolCallApprovalPolicy = null); |
| 6503 | public static WebSearchPreviewTool CreateWebSearchPreviewTool(WebSearchToolLocation userLocation = null, WebSearchToolContextSize? searchContextSize = null); |
| 6504 | public static WebSearchTool CreateWebSearchTool(WebSearchToolLocation userLocation = null, WebSearchToolContextSize? searchContextSize = null, WebSearchToolFilters filters = null); |
| 6505 | protected virtual ResponseTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6506 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6507 | protected virtual ResponseTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6508 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6509 | } |
| 6510 | [Experimental("OPENAI001")] |
| 6511 | public class ResponseToolChoice : IJsonModel<ResponseToolChoice>, IPersistableModel<ResponseToolChoice> { |
| 6512 | public string FunctionName { get; } |
| 6513 | public ResponseToolChoiceKind Kind { get; } |
| 6514 | public static ResponseToolChoice CreateAutoChoice(); |
| 6515 | [Experimental("OPENAICUA001")] |
| 6516 | public static ResponseToolChoice CreateComputerChoice(); |
| 6517 | public static ResponseToolChoice CreateFileSearchChoice(); |
| 6518 | public static ResponseToolChoice CreateFunctionChoice(string functionName); |
| 6519 | public static ResponseToolChoice CreateNoneChoice(); |
| 6520 | public static ResponseToolChoice CreateRequiredChoice(); |
| 6521 | public static ResponseToolChoice CreateWebSearchChoice(); |
| 6522 | } |
| 6523 | [Experimental("OPENAI001")] |
| 6524 | public enum ResponseToolChoiceKind { |
| 6525 | Unknown = 0, |
| 6526 | Auto = 1, |
| 6527 | None = 2, |
| 6528 | Required = 3, |
| 6529 | Function = 4, |
| 6530 | FileSearch = 5, |
| 6531 | WebSearch = 6, |
| 6532 | Computer = 7 |
| 6533 | } |
| 6534 | [Experimental("OPENAI001")] |
| 6535 | public readonly partial struct ResponseTruncationMode : IEquatable<ResponseTruncationMode> { |
| 6536 | public ResponseTruncationMode(string value); |
| 6537 | public static ResponseTruncationMode Auto { get; } |
| 6538 | public static ResponseTruncationMode Disabled { get; } |
| 6539 | public readonly bool Equals(ResponseTruncationMode other); |
| 6540 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6541 | public override readonly bool Equals(object obj); |
| 6542 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 6543 | public override readonly int GetHashCode(); |
| 6544 | public static bool operator ==(ResponseTruncationMode left, ResponseTruncationMode right); |
| 6545 | public static implicit operator ResponseTruncationMode(string value); |
| 6546 | public static implicit operator ResponseTruncationMode?(string value); |
| 6547 | public static bool operator !=(ResponseTruncationMode left, ResponseTruncationMode right); |
| 6548 | public override readonly string ToString(); |
| 6549 | } |
| 6550 | [Experimental("OPENAI001")] |
| 6551 | public class StreamingResponseCodeInterpreterCallCodeDeltaUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseCodeInterpreterCallCodeDeltaUpdate>, IPersistableModel<StreamingResponseCodeInterpreterCallCodeDeltaUpdate> { |
| 6552 | public StreamingResponseCodeInterpreterCallCodeDeltaUpdate(); |
| 6553 | public string Delta { get; set; } |
| 6554 | public string ItemId { get; set; } |
| 6555 | public int OutputIndex { get; set; } |
| 6556 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6557 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6558 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6559 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6560 | } |
| 6561 | [Experimental("OPENAI001")] |
| 6562 | public class StreamingResponseCodeInterpreterCallCodeDoneUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseCodeInterpreterCallCodeDoneUpdate>, IPersistableModel<StreamingResponseCodeInterpreterCallCodeDoneUpdate> { |
| 6563 | public StreamingResponseCodeInterpreterCallCodeDoneUpdate(); |
| 6564 | public string Code { get; set; } |
| 6565 | public string ItemId { get; set; } |
| 6566 | public int OutputIndex { get; set; } |
| 6567 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6568 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6569 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6570 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6571 | } |
| 6572 | [Experimental("OPENAI001")] |
| 6573 | public class StreamingResponseCodeInterpreterCallCompletedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseCodeInterpreterCallCompletedUpdate>, IPersistableModel<StreamingResponseCodeInterpreterCallCompletedUpdate> { |
| 6574 | public StreamingResponseCodeInterpreterCallCompletedUpdate(); |
| 6575 | public string ItemId { get; set; } |
| 6576 | public int OutputIndex { get; set; } |
| 6577 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6578 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6579 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6580 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6581 | } |
| 6582 | [Experimental("OPENAI001")] |
| 6583 | public class StreamingResponseCodeInterpreterCallInProgressUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseCodeInterpreterCallInProgressUpdate>, IPersistableModel<StreamingResponseCodeInterpreterCallInProgressUpdate> { |
| 6584 | public StreamingResponseCodeInterpreterCallInProgressUpdate(); |
| 6585 | public string ItemId { get; set; } |
| 6586 | public int OutputIndex { get; set; } |
| 6587 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6588 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6589 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6590 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6591 | } |
| 6592 | [Experimental("OPENAI001")] |
| 6593 | public class StreamingResponseCodeInterpreterCallInterpretingUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseCodeInterpreterCallInterpretingUpdate>, IPersistableModel<StreamingResponseCodeInterpreterCallInterpretingUpdate> { |
| 6594 | public StreamingResponseCodeInterpreterCallInterpretingUpdate(); |
| 6595 | public string ItemId { get; set; } |
| 6596 | public int OutputIndex { get; set; } |
| 6597 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6598 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6599 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6600 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6601 | } |
| 6602 | [Experimental("OPENAI001")] |
| 6603 | public class StreamingResponseCompletedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseCompletedUpdate>, IPersistableModel<StreamingResponseCompletedUpdate> { |
| 6604 | public StreamingResponseCompletedUpdate(); |
| 6605 | public ResponseResult Response { get; set; } |
| 6606 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6607 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6608 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6609 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6610 | } |
| 6611 | [Experimental("OPENAI001")] |
| 6612 | public class StreamingResponseContentPartAddedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseContentPartAddedUpdate>, IPersistableModel<StreamingResponseContentPartAddedUpdate> { |
| 6613 | public StreamingResponseContentPartAddedUpdate(); |
| 6614 | public int ContentIndex { get; set; } |
| 6615 | public string ItemId { get; set; } |
| 6616 | public int OutputIndex { get; set; } |
| 6617 | public ResponseContentPart Part { get; set; } |
| 6618 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6619 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6620 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6621 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6622 | } |
| 6623 | [Experimental("OPENAI001")] |
| 6624 | public class StreamingResponseContentPartDoneUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseContentPartDoneUpdate>, IPersistableModel<StreamingResponseContentPartDoneUpdate> { |
| 6625 | public StreamingResponseContentPartDoneUpdate(); |
| 6626 | public int ContentIndex { get; set; } |
| 6627 | public string ItemId { get; set; } |
| 6628 | public int OutputIndex { get; set; } |
| 6629 | public ResponseContentPart Part { get; set; } |
| 6630 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6631 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6632 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6633 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6634 | } |
| 6635 | [Experimental("OPENAI001")] |
| 6636 | public class StreamingResponseCreatedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseCreatedUpdate>, IPersistableModel<StreamingResponseCreatedUpdate> { |
| 6637 | public StreamingResponseCreatedUpdate(); |
| 6638 | public ResponseResult Response { get; set; } |
| 6639 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6640 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6641 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6642 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6643 | } |
| 6644 | [Experimental("OPENAI001")] |
| 6645 | public class StreamingResponseErrorUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseErrorUpdate>, IPersistableModel<StreamingResponseErrorUpdate> { |
| 6646 | public StreamingResponseErrorUpdate(); |
| 6647 | public string Code { get; set; } |
| 6648 | public string Message { get; set; } |
| 6649 | public string Param { get; set; } |
| 6650 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6651 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6652 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6653 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6654 | } |
| 6655 | [Experimental("OPENAI001")] |
| 6656 | public class StreamingResponseFailedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseFailedUpdate>, IPersistableModel<StreamingResponseFailedUpdate> { |
| 6657 | public StreamingResponseFailedUpdate(); |
| 6658 | public ResponseResult Response { get; set; } |
| 6659 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6660 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6661 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6662 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6663 | } |
| 6664 | [Experimental("OPENAI001")] |
| 6665 | public class StreamingResponseFileSearchCallCompletedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseFileSearchCallCompletedUpdate>, IPersistableModel<StreamingResponseFileSearchCallCompletedUpdate> { |
| 6666 | public StreamingResponseFileSearchCallCompletedUpdate(); |
| 6667 | public string ItemId { get; set; } |
| 6668 | public int OutputIndex { get; set; } |
| 6669 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6670 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6671 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6672 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6673 | } |
| 6674 | [Experimental("OPENAI001")] |
| 6675 | public class StreamingResponseFileSearchCallInProgressUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseFileSearchCallInProgressUpdate>, IPersistableModel<StreamingResponseFileSearchCallInProgressUpdate> { |
| 6676 | public StreamingResponseFileSearchCallInProgressUpdate(); |
| 6677 | public string ItemId { get; set; } |
| 6678 | public int OutputIndex { get; set; } |
| 6679 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6680 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6681 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6682 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6683 | } |
| 6684 | [Experimental("OPENAI001")] |
| 6685 | public class StreamingResponseFileSearchCallSearchingUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseFileSearchCallSearchingUpdate>, IPersistableModel<StreamingResponseFileSearchCallSearchingUpdate> { |
| 6686 | public StreamingResponseFileSearchCallSearchingUpdate(); |
| 6687 | public string ItemId { get; set; } |
| 6688 | public int OutputIndex { get; set; } |
| 6689 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6690 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6691 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6692 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6693 | } |
| 6694 | [Experimental("OPENAI001")] |
| 6695 | public class StreamingResponseFunctionCallArgumentsDeltaUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseFunctionCallArgumentsDeltaUpdate>, IPersistableModel<StreamingResponseFunctionCallArgumentsDeltaUpdate> { |
| 6696 | public StreamingResponseFunctionCallArgumentsDeltaUpdate(); |
| 6697 | public BinaryData Delta { get; set; } |
| 6698 | public string ItemId { get; set; } |
| 6699 | public int OutputIndex { get; set; } |
| 6700 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6701 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6702 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6703 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6704 | } |
| 6705 | [Experimental("OPENAI001")] |
| 6706 | public class StreamingResponseFunctionCallArgumentsDoneUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseFunctionCallArgumentsDoneUpdate>, IPersistableModel<StreamingResponseFunctionCallArgumentsDoneUpdate> { |
| 6707 | public StreamingResponseFunctionCallArgumentsDoneUpdate(); |
| 6708 | public BinaryData FunctionArguments { get; set; } |
| 6709 | public string ItemId { get; set; } |
| 6710 | public int OutputIndex { get; set; } |
| 6711 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6712 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6713 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6714 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6715 | } |
| 6716 | [Experimental("OPENAI001")] |
| 6717 | public class StreamingResponseImageGenerationCallCompletedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseImageGenerationCallCompletedUpdate>, IPersistableModel<StreamingResponseImageGenerationCallCompletedUpdate> { |
| 6718 | public StreamingResponseImageGenerationCallCompletedUpdate(); |
| 6719 | public string ItemId { get; set; } |
| 6720 | public int OutputIndex { get; set; } |
| 6721 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6722 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6723 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6724 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6725 | } |
| 6726 | [Experimental("OPENAI001")] |
| 6727 | public class StreamingResponseImageGenerationCallGeneratingUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseImageGenerationCallGeneratingUpdate>, IPersistableModel<StreamingResponseImageGenerationCallGeneratingUpdate> { |
| 6728 | public StreamingResponseImageGenerationCallGeneratingUpdate(); |
| 6729 | public string ItemId { get; set; } |
| 6730 | public int OutputIndex { get; set; } |
| 6731 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6732 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6733 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6734 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6735 | } |
| 6736 | [Experimental("OPENAI001")] |
| 6737 | public class StreamingResponseImageGenerationCallInProgressUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseImageGenerationCallInProgressUpdate>, IPersistableModel<StreamingResponseImageGenerationCallInProgressUpdate> { |
| 6738 | public StreamingResponseImageGenerationCallInProgressUpdate(); |
| 6739 | public string ItemId { get; set; } |
| 6740 | public int OutputIndex { get; set; } |
| 6741 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6742 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6743 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6744 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6745 | } |
| 6746 | [Experimental("OPENAI001")] |
| 6747 | public class StreamingResponseImageGenerationCallPartialImageUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseImageGenerationCallPartialImageUpdate>, IPersistableModel<StreamingResponseImageGenerationCallPartialImageUpdate> { |
| 6748 | public StreamingResponseImageGenerationCallPartialImageUpdate(); |
| 6749 | public string ItemId { get; set; } |
| 6750 | public int OutputIndex { get; set; } |
| 6751 | public BinaryData PartialImageBytes { get; set; } |
| 6752 | public int PartialImageIndex { get; set; } |
| 6753 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6754 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6755 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6756 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6757 | } |
| 6758 | [Experimental("OPENAI001")] |
| 6759 | public class StreamingResponseIncompleteUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseIncompleteUpdate>, IPersistableModel<StreamingResponseIncompleteUpdate> { |
| 6760 | public StreamingResponseIncompleteUpdate(); |
| 6761 | public ResponseResult Response { get; set; } |
| 6762 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6763 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6764 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6765 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6766 | } |
| 6767 | [Experimental("OPENAI001")] |
| 6768 | public class StreamingResponseInProgressUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseInProgressUpdate>, IPersistableModel<StreamingResponseInProgressUpdate> { |
| 6769 | public StreamingResponseInProgressUpdate(); |
| 6770 | public ResponseResult Response { get; set; } |
| 6771 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6772 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6773 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6774 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6775 | } |
| 6776 | [Experimental("OPENAI001")] |
| 6777 | public class StreamingResponseMcpCallArgumentsDeltaUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseMcpCallArgumentsDeltaUpdate>, IPersistableModel<StreamingResponseMcpCallArgumentsDeltaUpdate> { |
| 6778 | public StreamingResponseMcpCallArgumentsDeltaUpdate(); |
| 6779 | public BinaryData Delta { get; set; } |
| 6780 | public string ItemId { get; set; } |
| 6781 | public int OutputIndex { get; set; } |
| 6782 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6783 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6784 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6785 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6786 | } |
| 6787 | [Experimental("OPENAI001")] |
| 6788 | public class StreamingResponseMcpCallArgumentsDoneUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseMcpCallArgumentsDoneUpdate>, IPersistableModel<StreamingResponseMcpCallArgumentsDoneUpdate> { |
| 6789 | public StreamingResponseMcpCallArgumentsDoneUpdate(); |
| 6790 | public string ItemId { get; set; } |
| 6791 | public int OutputIndex { get; set; } |
| 6792 | public BinaryData ToolArguments { get; set; } |
| 6793 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6794 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6795 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6796 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6797 | } |
| 6798 | [Experimental("OPENAI001")] |
| 6799 | public class StreamingResponseMcpCallCompletedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseMcpCallCompletedUpdate>, IPersistableModel<StreamingResponseMcpCallCompletedUpdate> { |
| 6800 | public StreamingResponseMcpCallCompletedUpdate(); |
| 6801 | public string ItemId { get; set; } |
| 6802 | public int OutputIndex { get; set; } |
| 6803 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6804 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6805 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6806 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6807 | } |
| 6808 | [Experimental("OPENAI001")] |
| 6809 | public class StreamingResponseMcpCallFailedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseMcpCallFailedUpdate>, IPersistableModel<StreamingResponseMcpCallFailedUpdate> { |
| 6810 | public StreamingResponseMcpCallFailedUpdate(); |
| 6811 | public string ItemId { get; set; } |
| 6812 | public int OutputIndex { get; set; } |
| 6813 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6814 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6815 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6816 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6817 | } |
| 6818 | [Experimental("OPENAI001")] |
| 6819 | public class StreamingResponseMcpCallInProgressUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseMcpCallInProgressUpdate>, IPersistableModel<StreamingResponseMcpCallInProgressUpdate> { |
| 6820 | public StreamingResponseMcpCallInProgressUpdate(); |
| 6821 | public string ItemId { get; set; } |
| 6822 | public int OutputIndex { get; set; } |
| 6823 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6824 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6825 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6826 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6827 | } |
| 6828 | [Experimental("OPENAI001")] |
| 6829 | public class StreamingResponseMcpListToolsCompletedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseMcpListToolsCompletedUpdate>, IPersistableModel<StreamingResponseMcpListToolsCompletedUpdate> { |
| 6830 | public StreamingResponseMcpListToolsCompletedUpdate(); |
| 6831 | public string ItemId { get; set; } |
| 6832 | public int OutputIndex { get; set; } |
| 6833 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6834 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6835 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6836 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6837 | } |
| 6838 | [Experimental("OPENAI001")] |
| 6839 | public class StreamingResponseMcpListToolsFailedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseMcpListToolsFailedUpdate>, IPersistableModel<StreamingResponseMcpListToolsFailedUpdate> { |
| 6840 | public StreamingResponseMcpListToolsFailedUpdate(); |
| 6841 | public string ItemId { get; set; } |
| 6842 | public int OutputIndex { get; set; } |
| 6843 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6844 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6845 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6846 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6847 | } |
| 6848 | [Experimental("OPENAI001")] |
| 6849 | public class StreamingResponseMcpListToolsInProgressUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseMcpListToolsInProgressUpdate>, IPersistableModel<StreamingResponseMcpListToolsInProgressUpdate> { |
| 6850 | public StreamingResponseMcpListToolsInProgressUpdate(); |
| 6851 | public string ItemId { get; set; } |
| 6852 | public int OutputIndex { get; set; } |
| 6853 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6854 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6855 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6856 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6857 | } |
| 6858 | [Experimental("OPENAI001")] |
| 6859 | public class StreamingResponseOutputItemAddedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseOutputItemAddedUpdate>, IPersistableModel<StreamingResponseOutputItemAddedUpdate> { |
| 6860 | public StreamingResponseOutputItemAddedUpdate(); |
| 6861 | public ResponseItem Item { get; set; } |
| 6862 | public int OutputIndex { get; set; } |
| 6863 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6864 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6865 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6866 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6867 | } |
| 6868 | [Experimental("OPENAI001")] |
| 6869 | public class StreamingResponseOutputItemDoneUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseOutputItemDoneUpdate>, IPersistableModel<StreamingResponseOutputItemDoneUpdate> { |
| 6870 | public StreamingResponseOutputItemDoneUpdate(); |
| 6871 | public ResponseItem Item { get; set; } |
| 6872 | public int OutputIndex { get; set; } |
| 6873 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6874 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6875 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6876 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6877 | } |
| 6878 | [Experimental("OPENAI001")] |
| 6879 | public class StreamingResponseOutputTextDeltaUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseOutputTextDeltaUpdate>, IPersistableModel<StreamingResponseOutputTextDeltaUpdate> { |
| 6880 | public StreamingResponseOutputTextDeltaUpdate(); |
| 6881 | public int ContentIndex { get; set; } |
| 6882 | public string Delta { get; set; } |
| 6883 | public string ItemId { get; set; } |
| 6884 | public int OutputIndex { get; set; } |
| 6885 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6886 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6887 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6888 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6889 | } |
| 6890 | [Experimental("OPENAI001")] |
| 6891 | public class StreamingResponseOutputTextDoneUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseOutputTextDoneUpdate>, IPersistableModel<StreamingResponseOutputTextDoneUpdate> { |
| 6892 | public StreamingResponseOutputTextDoneUpdate(); |
| 6893 | public int ContentIndex { get; set; } |
| 6894 | public string ItemId { get; set; } |
| 6895 | public int OutputIndex { get; set; } |
| 6896 | public string Text { get; set; } |
| 6897 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6898 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6899 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6900 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6901 | } |
| 6902 | [Experimental("OPENAI001")] |
| 6903 | public class StreamingResponseQueuedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseQueuedUpdate>, IPersistableModel<StreamingResponseQueuedUpdate> { |
| 6904 | public StreamingResponseQueuedUpdate(); |
| 6905 | public ResponseResult Response { get; set; } |
| 6906 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6907 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6908 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6909 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6910 | } |
| 6911 | [Experimental("OPENAI001")] |
| 6912 | public class StreamingResponseReasoningSummaryPartAddedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseReasoningSummaryPartAddedUpdate>, IPersistableModel<StreamingResponseReasoningSummaryPartAddedUpdate> { |
| 6913 | public StreamingResponseReasoningSummaryPartAddedUpdate(); |
| 6914 | public string ItemId { get; set; } |
| 6915 | public int OutputIndex { get; set; } |
| 6916 | public ReasoningSummaryPart Part { get; set; } |
| 6917 | public int SummaryIndex { get; set; } |
| 6918 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6919 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6920 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6921 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6922 | } |
| 6923 | [Experimental("OPENAI001")] |
| 6924 | public class StreamingResponseReasoningSummaryPartDoneUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseReasoningSummaryPartDoneUpdate>, IPersistableModel<StreamingResponseReasoningSummaryPartDoneUpdate> { |
| 6925 | public StreamingResponseReasoningSummaryPartDoneUpdate(); |
| 6926 | public string ItemId { get; set; } |
| 6927 | public int OutputIndex { get; set; } |
| 6928 | public ReasoningSummaryPart Part { get; set; } |
| 6929 | public int SummaryIndex { get; set; } |
| 6930 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6931 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6932 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6933 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6934 | } |
| 6935 | [Experimental("OPENAI001")] |
| 6936 | public class StreamingResponseReasoningSummaryTextDeltaUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseReasoningSummaryTextDeltaUpdate>, IPersistableModel<StreamingResponseReasoningSummaryTextDeltaUpdate> { |
| 6937 | public StreamingResponseReasoningSummaryTextDeltaUpdate(); |
| 6938 | public string Delta { get; set; } |
| 6939 | public string ItemId { get; set; } |
| 6940 | public int OutputIndex { get; set; } |
| 6941 | public int SummaryIndex { get; set; } |
| 6942 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6943 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6944 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6945 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6946 | } |
| 6947 | [Experimental("OPENAI001")] |
| 6948 | public class StreamingResponseReasoningSummaryTextDoneUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseReasoningSummaryTextDoneUpdate>, IPersistableModel<StreamingResponseReasoningSummaryTextDoneUpdate> { |
| 6949 | public StreamingResponseReasoningSummaryTextDoneUpdate(); |
| 6950 | public string ItemId { get; set; } |
| 6951 | public int OutputIndex { get; set; } |
| 6952 | public int SummaryIndex { get; set; } |
| 6953 | public string Text { get; set; } |
| 6954 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6955 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6956 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6957 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6958 | } |
| 6959 | [Experimental("OPENAI001")] |
| 6960 | public class StreamingResponseReasoningTextDeltaUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseReasoningTextDeltaUpdate>, IPersistableModel<StreamingResponseReasoningTextDeltaUpdate> { |
| 6961 | public StreamingResponseReasoningTextDeltaUpdate(); |
| 6962 | public int ContentIndex { get; set; } |
| 6963 | public string Delta { get; set; } |
| 6964 | public string ItemId { get; set; } |
| 6965 | public int OutputIndex { get; set; } |
| 6966 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6967 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6968 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6969 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6970 | } |
| 6971 | [Experimental("OPENAI001")] |
| 6972 | public class StreamingResponseReasoningTextDoneUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseReasoningTextDoneUpdate>, IPersistableModel<StreamingResponseReasoningTextDoneUpdate> { |
| 6973 | public StreamingResponseReasoningTextDoneUpdate(); |
| 6974 | public int ContentIndex { get; set; } |
| 6975 | public string ItemId { get; set; } |
| 6976 | public int OutputIndex { get; set; } |
| 6977 | public string Text { get; set; } |
| 6978 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6979 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6980 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6981 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6982 | } |
| 6983 | [Experimental("OPENAI001")] |
| 6984 | public class StreamingResponseRefusalDeltaUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseRefusalDeltaUpdate>, IPersistableModel<StreamingResponseRefusalDeltaUpdate> { |
| 6985 | public StreamingResponseRefusalDeltaUpdate(); |
| 6986 | public int ContentIndex { get; set; } |
| 6987 | public string Delta { get; set; } |
| 6988 | public string ItemId { get; set; } |
| 6989 | public int OutputIndex { get; set; } |
| 6990 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 6991 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 6992 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 6993 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 6994 | } |
| 6995 | [Experimental("OPENAI001")] |
| 6996 | public class StreamingResponseRefusalDoneUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseRefusalDoneUpdate>, IPersistableModel<StreamingResponseRefusalDoneUpdate> { |
| 6997 | public StreamingResponseRefusalDoneUpdate(); |
| 6998 | public int ContentIndex { get; set; } |
| 6999 | public string ItemId { get; set; } |
| 7000 | public int OutputIndex { get; set; } |
| 7001 | public string Refusal { get; set; } |
| 7002 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 7003 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 7004 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 7005 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 7006 | } |
| 7007 | [Experimental("OPENAI001")] |
| 7008 | public class StreamingResponseTextAnnotationAddedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseTextAnnotationAddedUpdate>, IPersistableModel<StreamingResponseTextAnnotationAddedUpdate> { |
| 7009 | public StreamingResponseTextAnnotationAddedUpdate(); |
| 7010 | public BinaryData Annotation { get; set; } |
| 7011 | public int AnnotationIndex { get; set; } |
| 7012 | public int ContentIndex { get; set; } |
| 7013 | public string ItemId { get; set; } |
| 7014 | public int OutputIndex { get; set; } |
| 7015 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 7016 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 7017 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 7018 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 7019 | } |
| 7020 | [Experimental("OPENAI001")] |
| 7021 | public class StreamingResponseUpdate : IJsonModel<StreamingResponseUpdate>, IPersistableModel<StreamingResponseUpdate> { |
| 7022 | [Serialization.JsonIgnore] |
| 7023 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 7024 | [Experimental("SCME0001")] |
| 7025 | public ref JsonPatch Patch { get; } |
| 7026 | public int SequenceNumber { get; set; } |
| 7027 | protected virtual StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 7028 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 7029 | protected virtual StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 7030 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 7031 | } |
| 7032 | [Experimental("OPENAI001")] |
| 7033 | public class StreamingResponseWebSearchCallCompletedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseWebSearchCallCompletedUpdate>, IPersistableModel<StreamingResponseWebSearchCallCompletedUpdate> { |
| 7034 | public StreamingResponseWebSearchCallCompletedUpdate(); |
| 7035 | public string ItemId { get; set; } |
| 7036 | public int OutputIndex { get; set; } |
| 7037 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 7038 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 7039 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 7040 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 7041 | } |
| 7042 | [Experimental("OPENAI001")] |
| 7043 | public class StreamingResponseWebSearchCallInProgressUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseWebSearchCallInProgressUpdate>, IPersistableModel<StreamingResponseWebSearchCallInProgressUpdate> { |
| 7044 | public StreamingResponseWebSearchCallInProgressUpdate(); |
| 7045 | public string ItemId { get; set; } |
| 7046 | public int OutputIndex { get; set; } |
| 7047 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 7048 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 7049 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 7050 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 7051 | } |
| 7052 | [Experimental("OPENAI001")] |
| 7053 | public class StreamingResponseWebSearchCallSearchingUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseWebSearchCallSearchingUpdate>, IPersistableModel<StreamingResponseWebSearchCallSearchingUpdate> { |
| 7054 | public StreamingResponseWebSearchCallSearchingUpdate(); |
| 7055 | public string ItemId { get; set; } |
| 7056 | public int OutputIndex { get; set; } |
| 7057 | protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 7058 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 7059 | protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 7060 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 7061 | } |
| 7062 | [Experimental("OPENAI001")] |
| 7063 | public class UriCitationMessageAnnotation : ResponseMessageAnnotation, IJsonModel<UriCitationMessageAnnotation>, IPersistableModel<UriCitationMessageAnnotation> { |
| 7064 | public UriCitationMessageAnnotation(Uri uri, int startIndex, int endIndex, string title); |
| 7065 | public int EndIndex { get; set; } |
| 7066 | public int StartIndex { get; set; } |
| 7067 | public string Title { get; set; } |
| 7068 | public Uri Uri { get; set; } |
| 7069 | protected override ResponseMessageAnnotation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 7070 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 7071 | protected override ResponseMessageAnnotation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 7072 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 7073 | } |
| 7074 | [Experimental("OPENAI001")] |
| 7075 | public class WebSearchCallResponseItem : ResponseItem, IJsonModel<WebSearchCallResponseItem>, IPersistableModel<WebSearchCallResponseItem> { |
| 7076 | public WebSearchCallResponseItem(); |
| 7077 | public WebSearchCallStatus? Status { get; set; } |
| 7078 | protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 7079 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 7080 | protected override ResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 7081 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 7082 | } |
| 7083 | [Experimental("OPENAI001")] |
| 7084 | public enum WebSearchCallStatus { |
| 7085 | InProgress = 0, |
| 7086 | Searching = 1, |
| 7087 | Completed = 2, |
| 7088 | Failed = 3 |
| 7089 | } |
| 7090 | [Experimental("OPENAI001")] |
| 7091 | public class WebSearchPreviewTool : ResponseTool, IJsonModel<WebSearchPreviewTool>, IPersistableModel<WebSearchPreviewTool> { |
| 7092 | public WebSearchPreviewTool(); |
| 7093 | public WebSearchToolContextSize? SearchContextSize { get; set; } |
| 7094 | public WebSearchToolLocation UserLocation { get; set; } |
| 7095 | protected override ResponseTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 7096 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 7097 | protected override ResponseTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 7098 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 7099 | } |
| 7100 | [Experimental("OPENAI001")] |
| 7101 | public class WebSearchTool : ResponseTool, IJsonModel<WebSearchTool>, IPersistableModel<WebSearchTool> { |
| 7102 | public WebSearchTool(); |
| 7103 | public WebSearchToolFilters Filters { get; set; } |
| 7104 | public WebSearchToolContextSize? SearchContextSize { get; set; } |
| 7105 | public WebSearchToolLocation UserLocation { get; set; } |
| 7106 | protected override ResponseTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 7107 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 7108 | protected override ResponseTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 7109 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 7110 | } |
| 7111 | [Experimental("OPENAI001")] |
| 7112 | public class WebSearchToolApproximateLocation : WebSearchToolLocation, IJsonModel<WebSearchToolApproximateLocation>, IPersistableModel<WebSearchToolApproximateLocation> { |
| 7113 | public WebSearchToolApproximateLocation(); |
| 7114 | public string City { get; set; } |
| 7115 | public string Country { get; set; } |
| 7116 | public string Region { get; set; } |
| 7117 | public string Timezone { get; set; } |
| 7118 | protected override WebSearchToolLocation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 7119 | protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 7120 | protected override WebSearchToolLocation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 7121 | protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 7122 | } |
| 7123 | [Experimental("OPENAI001")] |
| 7124 | public readonly partial struct WebSearchToolContextSize : IEquatable<WebSearchToolContextSize> { |
| 7125 | public WebSearchToolContextSize(string value); |
| 7126 | public static WebSearchToolContextSize High { get; } |
| 7127 | public static WebSearchToolContextSize Low { get; } |
| 7128 | public static WebSearchToolContextSize Medium { get; } |
| 7129 | public readonly bool Equals(WebSearchToolContextSize other); |
| 7130 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 7131 | public override readonly bool Equals(object obj); |
| 7132 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 7133 | public override readonly int GetHashCode(); |
| 7134 | public static bool operator ==(WebSearchToolContextSize left, WebSearchToolContextSize right); |
| 7135 | public static implicit operator WebSearchToolContextSize(string value); |
| 7136 | public static implicit operator WebSearchToolContextSize?(string value); |
| 7137 | public static bool operator !=(WebSearchToolContextSize left, WebSearchToolContextSize right); |
| 7138 | public override readonly string ToString(); |
| 7139 | } |
| 7140 | [Experimental("OPENAI001")] |
| 7141 | public class WebSearchToolFilters : IJsonModel<WebSearchToolFilters>, IPersistableModel<WebSearchToolFilters> { |
| 7142 | public IList<string> AllowedDomains { get; set; } |
| 7143 | [Serialization.JsonIgnore] |
| 7144 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 7145 | [Experimental("SCME0001")] |
| 7146 | public ref JsonPatch Patch { get; } |
| 7147 | protected virtual WebSearchToolFilters JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 7148 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 7149 | protected virtual WebSearchToolFilters PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 7150 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 7151 | } |
| 7152 | [Experimental("OPENAI001")] |
| 7153 | public class WebSearchToolLocation : IJsonModel<WebSearchToolLocation>, IPersistableModel<WebSearchToolLocation> { |
| 7154 | [Serialization.JsonIgnore] |
| 7155 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 7156 | [Experimental("SCME0001")] |
| 7157 | public ref JsonPatch Patch { get; } |
| 7158 | public static WebSearchToolApproximateLocation CreateApproximateLocation(string country = null, string region = null, string city = null, string timezone = null); |
| 7159 | protected virtual WebSearchToolLocation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 7160 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 7161 | protected virtual WebSearchToolLocation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 7162 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 7163 | } |
| 7164 | } |
| 7165 | namespace OpenAI.VectorStores { |
| 7166 | [Experimental("OPENAI001")] |
| 7167 | public abstract class FileChunkingStrategy : IJsonModel<FileChunkingStrategy>, IPersistableModel<FileChunkingStrategy> { |
| 7168 | public static FileChunkingStrategy Auto { get; } |
| 7169 | public static FileChunkingStrategy Unknown { get; } |
| 7170 | public static FileChunkingStrategy CreateStaticStrategy(int maxTokensPerChunk, int overlappingTokenCount); |
| 7171 | protected virtual FileChunkingStrategy JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); |
| 7172 | protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); |
| 7173 | protected virtual FileChunkingStrategy PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); |
| 7174 | protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); |
| 7175 | } |
| 7176 | [Experimental("OPENAI001")] |
| 7177 | public class F |