Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions api/OpenAI.net8.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5373,6 +5373,25 @@ public class ImageGenerationToolInputImageMask : IJsonModel<ImageGenerationToolI
public override readonly string ToString();
}
[Experimental("OPENAI001")]
public readonly partial struct IncludedResponseProperty : IEquatable<IncludedResponseProperty> {
public IncludedResponseProperty(string value);
public static IncludedResponseProperty CodeInterpreterCallOutputs { get; }
public static IncludedResponseProperty ComputerCallOutputImageUri { get; }
public static IncludedResponseProperty FileSearchCallResults { get; }
public static IncludedResponseProperty MessageInputImageUri { get; }
public static IncludedResponseProperty ReasoningEncryptedContent { get; }
public readonly bool Equals(IncludedResponseProperty other);
[EditorBrowsable(EditorBrowsableState.Never)]
public override readonly bool Equals(object obj);
[EditorBrowsable(EditorBrowsableState.Never)]
public override readonly int GetHashCode();
public static bool operator ==(IncludedResponseProperty left, IncludedResponseProperty right);
public static implicit operator IncludedResponseProperty(string value);
public static implicit operator IncludedResponseProperty?(string value);
public static bool operator !=(IncludedResponseProperty left, IncludedResponseProperty right);
public override readonly string ToString();
}
[Experimental("OPENAI001")]
public class McpTool : ResponseTool, IJsonModel<McpTool>, IPersistableModel<McpTool> {
public McpTool(string serverLabel, McpToolConnectorId connectorId);
public McpTool(string serverLabel, Uri serverUri);
Expand Down Expand Up @@ -5589,16 +5608,16 @@ public class OpenAIResponseClient {
public virtual ClientResult<ResponseDeletionResult> DeleteResponse(string responseId, CancellationToken cancellationToken = default);
public virtual Task<ClientResult> DeleteResponseAsync(string responseId, RequestOptions options);
public virtual Task<ClientResult<ResponseDeletionResult>> DeleteResponseAsync(string responseId, CancellationToken cancellationToken = default);
public virtual ClientResult GetResponse(string responseId, bool? stream, int? startingAfter, RequestOptions options);
public virtual ClientResult<OpenAIResponse> GetResponse(string responseId, CancellationToken cancellationToken = default);
public virtual Task<ClientResult> GetResponseAsync(string responseId, bool? stream, int? startingAfter, RequestOptions options);
public virtual Task<ClientResult<OpenAIResponse>> GetResponseAsync(string responseId, CancellationToken cancellationToken = default);
public virtual ClientResult GetResponse(string responseId, IEnumerable<IncludedResponseProperty> include, bool? stream, int? startingAfter, bool? includeObfuscation, RequestOptions options);
public virtual ClientResult<OpenAIResponse> GetResponse(string responseId, IEnumerable<IncludedResponseProperty> include = null, int? startingAfter = null, bool? includeObfuscation = null, CancellationToken cancellationToken = default);
public virtual Task<ClientResult> GetResponseAsync(string responseId, IEnumerable<IncludedResponseProperty> include, bool? stream, int? startingAfter, bool? includeObfuscation, RequestOptions options);
public virtual Task<ClientResult<OpenAIResponse>> GetResponseAsync(string responseId, IEnumerable<IncludedResponseProperty> include = null, int? startingAfter = null, bool? includeObfuscation = null, CancellationToken cancellationToken = default);
public virtual CollectionResult<ResponseItem> GetResponseInputItems(string responseId, ResponseItemCollectionOptions options = null, CancellationToken cancellationToken = default);
public virtual CollectionResult GetResponseInputItems(string responseId, int? limit, string order, string after, string before, RequestOptions options);
public virtual AsyncCollectionResult<ResponseItem> GetResponseInputItemsAsync(string responseId, ResponseItemCollectionOptions options = null, CancellationToken cancellationToken = default);
public virtual AsyncCollectionResult GetResponseInputItemsAsync(string responseId, int? limit, string order, string after, string before, RequestOptions options);
public virtual CollectionResult<StreamingResponseUpdate> GetResponseStreaming(string responseId, int? startingAfter = null, CancellationToken cancellationToken = default);
public virtual AsyncCollectionResult<StreamingResponseUpdate> GetResponseStreamingAsync(string responseId, int? startingAfter = null, CancellationToken cancellationToken = default);
public virtual CollectionResult<StreamingResponseUpdate> GetResponseStreaming(string responseId, IEnumerable<IncludedResponseProperty> include = null, int? startingAfter = null, bool? includeObfuscation = null, CancellationToken cancellationToken = default);
public virtual AsyncCollectionResult<StreamingResponseUpdate> GetResponseStreamingAsync(string responseId, IEnumerable<IncludedResponseProperty> include = null, int? startingAfter = null, bool? includeObfuscation = null, CancellationToken cancellationToken = default);
}
[Experimental("OPENAI001")]
public static class OpenAIResponsesModelFactory {
Expand Down Expand Up @@ -5696,6 +5715,7 @@ public enum ResponseContentPartKind {
public class ResponseCreationOptions : IJsonModel<ResponseCreationOptions>, IPersistableModel<ResponseCreationOptions> {
public bool? BackgroundModeEnabled { get; set; }
public string EndUserId { get; set; }
public IList<IncludedResponseProperty> IncludedProperties { get; }
public string Instructions { get; set; }
public int? MaxOutputTokenCount { get; set; }
public IDictionary<string, string> Metadata { get; }
Expand Down
31 changes: 25 additions & 6 deletions api/OpenAI.netstandard2.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4705,6 +4705,24 @@ public class ImageGenerationToolInputImageMask : IJsonModel<ImageGenerationToolI
public static bool operator !=(ImageGenerationToolSize left, ImageGenerationToolSize right);
public override readonly string ToString();
}
public readonly partial struct IncludedResponseProperty : IEquatable<IncludedResponseProperty> {
public IncludedResponseProperty(string value);
public static IncludedResponseProperty CodeInterpreterCallOutputs { get; }
public static IncludedResponseProperty ComputerCallOutputImageUri { get; }
public static IncludedResponseProperty FileSearchCallResults { get; }
public static IncludedResponseProperty MessageInputImageUri { get; }
public static IncludedResponseProperty ReasoningEncryptedContent { get; }
public readonly bool Equals(IncludedResponseProperty other);
[EditorBrowsable(EditorBrowsableState.Never)]
public override readonly bool Equals(object obj);
[EditorBrowsable(EditorBrowsableState.Never)]
public override readonly int GetHashCode();
public static bool operator ==(IncludedResponseProperty left, IncludedResponseProperty right);
public static implicit operator IncludedResponseProperty(string value);
public static implicit operator IncludedResponseProperty?(string value);
public static bool operator !=(IncludedResponseProperty left, IncludedResponseProperty right);
public override readonly string ToString();
}
public class McpTool : ResponseTool, IJsonModel<McpTool>, IPersistableModel<McpTool> {
public McpTool(string serverLabel, McpToolConnectorId connectorId);
public McpTool(string serverLabel, Uri serverUri);
Expand Down Expand Up @@ -4902,16 +4920,16 @@ public class OpenAIResponseClient {
public virtual ClientResult<ResponseDeletionResult> DeleteResponse(string responseId, CancellationToken cancellationToken = default);
public virtual Task<ClientResult> DeleteResponseAsync(string responseId, RequestOptions options);
public virtual Task<ClientResult<ResponseDeletionResult>> DeleteResponseAsync(string responseId, CancellationToken cancellationToken = default);
public virtual ClientResult GetResponse(string responseId, bool? stream, int? startingAfter, RequestOptions options);
public virtual ClientResult<OpenAIResponse> GetResponse(string responseId, CancellationToken cancellationToken = default);
public virtual Task<ClientResult> GetResponseAsync(string responseId, bool? stream, int? startingAfter, RequestOptions options);
public virtual Task<ClientResult<OpenAIResponse>> GetResponseAsync(string responseId, CancellationToken cancellationToken = default);
public virtual ClientResult GetResponse(string responseId, IEnumerable<IncludedResponseProperty> include, bool? stream, int? startingAfter, bool? includeObfuscation, RequestOptions options);
public virtual ClientResult<OpenAIResponse> GetResponse(string responseId, IEnumerable<IncludedResponseProperty> include = null, int? startingAfter = null, bool? includeObfuscation = null, CancellationToken cancellationToken = default);
public virtual Task<ClientResult> GetResponseAsync(string responseId, IEnumerable<IncludedResponseProperty> include, bool? stream, int? startingAfter, bool? includeObfuscation, RequestOptions options);
public virtual Task<ClientResult<OpenAIResponse>> GetResponseAsync(string responseId, IEnumerable<IncludedResponseProperty> include = null, int? startingAfter = null, bool? includeObfuscation = null, CancellationToken cancellationToken = default);
public virtual CollectionResult<ResponseItem> GetResponseInputItems(string responseId, ResponseItemCollectionOptions options = null, CancellationToken cancellationToken = default);
public virtual CollectionResult GetResponseInputItems(string responseId, int? limit, string order, string after, string before, RequestOptions options);
public virtual AsyncCollectionResult<ResponseItem> GetResponseInputItemsAsync(string responseId, ResponseItemCollectionOptions options = null, CancellationToken cancellationToken = default);
public virtual AsyncCollectionResult GetResponseInputItemsAsync(string responseId, int? limit, string order, string after, string before, RequestOptions options);
public virtual CollectionResult<StreamingResponseUpdate> GetResponseStreaming(string responseId, int? startingAfter = null, CancellationToken cancellationToken = default);
public virtual AsyncCollectionResult<StreamingResponseUpdate> GetResponseStreamingAsync(string responseId, int? startingAfter = null, CancellationToken cancellationToken = default);
public virtual CollectionResult<StreamingResponseUpdate> GetResponseStreaming(string responseId, IEnumerable<IncludedResponseProperty> include = null, int? startingAfter = null, bool? includeObfuscation = null, CancellationToken cancellationToken = default);
public virtual AsyncCollectionResult<StreamingResponseUpdate> GetResponseStreamingAsync(string responseId, IEnumerable<IncludedResponseProperty> include = null, int? startingAfter = null, bool? includeObfuscation = null, CancellationToken cancellationToken = default);
}
public static class OpenAIResponsesModelFactory {
public static MessageResponseItem MessageResponseItem(string id = null, MessageRole role = MessageRole.Assistant, MessageStatus? status = null);
Expand Down Expand Up @@ -4998,6 +5016,7 @@ public enum ResponseContentPartKind {
public class ResponseCreationOptions : IJsonModel<ResponseCreationOptions>, IPersistableModel<ResponseCreationOptions> {
public bool? BackgroundModeEnabled { get; set; }
public string EndUserId { get; set; }
public IList<IncludedResponseProperty> IncludedProperties { get; }
public string Instructions { get; set; }
public int? MaxOutputTokenCount { get; set; }
public IDictionary<string, string> Metadata { get; }
Expand Down
13 changes: 9 additions & 4 deletions specification/base/typespec/responses/operations.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,19 @@ interface Responses {
@route("{response_id}")
getResponse(
@path
@example("resp_677efb5139a88190b512bc3fef8e535d")
response_id: string,

@query(#{ name: "include[]", explode: true })
includables?: Includable[] = #[],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WTF even is #[] ?

include?: Includable[],

@query(#{ explode: true })
stream?: boolean,

@query(#{ explode: true })
starting_after?: int32,

@query stream?: boolean = false,
@query starting_after?: int32,
@query(#{ explode: true })
include_obfuscation?: boolean,
): Response | SseResponseOf<ResponseStreamEvent> | ResponseErrorResponse;

@delete
Expand Down
11 changes: 11 additions & 0 deletions src/Custom/Responses/IncludedResponseProperty.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace OpenAI.Responses;

[CodeGenType("Includable")]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Man, Krzysztof would be twitching if he saw a member named "Includable"

public readonly partial struct IncludedResponseProperty
{
[CodeGenMember("MessageInputImageImageUrl")]
public static IncludedResponseProperty MessageInputImageUri { get; } = new IncludedResponseProperty(MessageInputImageImageUrlValue);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@clientName can't do this? That seems like something it should cover...


[CodeGenMember("ComputerCallOutputOutputImageUrl")]
public static IncludedResponseProperty ComputerCallOutputImageUri { get; } = new IncludedResponseProperty(ComputerCallOutputOutputImageUrlValue);
}
7 changes: 0 additions & 7 deletions src/Custom/Responses/Internal/InternalIncludable.cs

This file was deleted.

35 changes: 0 additions & 35 deletions src/Custom/Responses/OpenAIResponseClient.Protocol.cs

This file was deleted.

Loading
Loading