Skip to content

Commit 6199d41

Browse files
committed
merge
2 parents 03aaeec + 346256d commit 6199d41

File tree

58 files changed

+13833
-13444
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+13833
-13444
lines changed

api/OpenAI.net8.0.cs

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4980,9 +4980,13 @@ public class FunctionTool : ResponseTool, IJsonModel<FunctionTool>, IPersistable
49804980
}
49814981
[Experimental("OPENAI001")]
49824982
public class McpTool : ResponseTool, IJsonModel<McpTool>, IPersistableModel<McpTool> {
4983+
public McpTool(string serverLabel, McpToolConnectorId connectorId);
49834984
public McpTool(string serverLabel, Uri serverUri);
49844985
public McpToolFilter AllowedTools { get; set; }
4986+
public string AuthorizationToken { get; set; }
4987+
public McpToolConnectorId? ConnectorId { get; set; }
49854988
public IDictionary<string, string> Headers { get; set; }
4989+
public string ServerDescription { get; set; }
49864990
public string ServerLabel { get; set; }
49874991
public Uri ServerUri { get; set; }
49884992
public McpToolCallApprovalPolicy ToolCallApprovalPolicy { get; set; }
@@ -5004,7 +5008,7 @@ public class McpToolCallApprovalPolicy : IJsonModel<McpToolCallApprovalPolicy>,
50045008
}
50055009
[Experimental("OPENAI001")]
50065010
public class McpToolCallApprovalRequestItem : ResponseItem, IJsonModel<McpToolCallApprovalRequestItem>, IPersistableModel<McpToolCallApprovalRequestItem> {
5007-
public McpToolCallApprovalRequestItem(string serverLabel, string toolName, BinaryData toolArguments);
5011+
public McpToolCallApprovalRequestItem(string id, string serverLabel, string toolName, BinaryData toolArguments);
50085012
public string ServerLabel { get; set; }
50095013
public BinaryData ToolArguments { get; set; }
50105014
public string ToolName { get; set; }
@@ -5038,6 +5042,28 @@ public class McpToolCallItem : ResponseItem, IJsonModel<McpToolCallItem>, IPersi
50385042
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
50395043
}
50405044
[Experimental("OPENAI001")]
5045+
public readonly partial struct McpToolConnectorId : IEquatable<McpToolConnectorId> {
5046+
public McpToolConnectorId(string value);
5047+
public static McpToolConnectorId Dropbox { get; }
5048+
public static McpToolConnectorId Gmail { get; }
5049+
public static McpToolConnectorId GoogleCalendar { get; }
5050+
public static McpToolConnectorId GoogleDrive { get; }
5051+
public static McpToolConnectorId MicrosoftTeams { get; }
5052+
public static McpToolConnectorId OutlookCalendar { get; }
5053+
public static McpToolConnectorId OutlookEmail { get; }
5054+
public static McpToolConnectorId SharePoint { get; }
5055+
public readonly bool Equals(McpToolConnectorId other);
5056+
[EditorBrowsable(EditorBrowsableState.Never)]
5057+
public override readonly bool Equals(object obj);
5058+
[EditorBrowsable(EditorBrowsableState.Never)]
5059+
public override readonly int GetHashCode();
5060+
public static bool operator ==(McpToolConnectorId left, McpToolConnectorId right);
5061+
public static implicit operator McpToolConnectorId(string value);
5062+
public static implicit operator McpToolConnectorId?(string value);
5063+
public static bool operator !=(McpToolConnectorId left, McpToolConnectorId right);
5064+
public override readonly string ToString();
5065+
}
5066+
[Experimental("OPENAI001")]
50415067
public class McpToolDefinition : IJsonModel<McpToolDefinition>, IPersistableModel<McpToolDefinition> {
50425068
public McpToolDefinition(string name, BinaryData inputSchema);
50435069
public BinaryData Annotations { get; set; }
@@ -5062,6 +5088,7 @@ public class McpToolDefinitionListItem : ResponseItem, IJsonModel<McpToolDefinit
50625088
}
50635089
[Experimental("OPENAI001")]
50645090
public class McpToolFilter : IJsonModel<McpToolFilter>, IPersistableModel<McpToolFilter> {
5091+
public bool? IsReadOnly { get; set; }
50655092
public IList<string> ToolNames { get; }
50665093
protected virtual McpToolFilter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
50675094
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
@@ -5135,6 +5162,8 @@ public class OpenAIResponseClient {
51355162
public OpenAIResponseClient(string model, string apiKey);
51365163
[Experimental("OPENAI001")]
51375164
public Uri Endpoint { get; }
5165+
[Experimental("OPENAI001")]
5166+
public string Model { get; }
51385167
public ClientPipeline Pipeline { get; }
51395168
public virtual ClientResult CancelResponse(string responseId, RequestOptions options);
51405169
public virtual ClientResult<OpenAIResponse> CancelResponse(string responseId, CancellationToken cancellationToken = default);
@@ -5392,7 +5421,7 @@ public class ResponseItem : IJsonModel<ResponseItem>, IPersistableModel<Response
53925421
public static FileSearchCallResponseItem CreateFileSearchCallItem(IEnumerable<string> queries);
53935422
public static FunctionCallResponseItem CreateFunctionCallItem(string callId, string functionName, BinaryData functionArguments);
53945423
public static FunctionCallOutputResponseItem CreateFunctionCallOutputItem(string callId, string functionOutput);
5395-
public static McpToolCallApprovalRequestItem CreateMcpApprovalRequestItem(string serverLabel, string name, BinaryData arguments);
5424+
public static McpToolCallApprovalRequestItem CreateMcpApprovalRequestItem(string id, string serverLabel, string name, BinaryData arguments);
53965425
public static McpToolCallApprovalResponseItem CreateMcpApprovalResponseItem(string approvalRequestId, bool approved);
53975426
public static McpToolCallItem CreateMcpToolCallItem(string serverLabel, string name, BinaryData arguments);
53985427
public static McpToolDefinitionListItem CreateMcpToolDefinitionListItem(string serverLabel, IEnumerable<McpToolDefinition> toolDefinitions);
@@ -5574,7 +5603,8 @@ public class ResponseTool : IJsonModel<ResponseTool>, IPersistableModel<Response
55745603
public static ComputerTool CreateComputerTool(ComputerToolEnvironment environment, int displayWidth, int displayHeight);
55755604
public static FileSearchTool CreateFileSearchTool(IEnumerable<string> vectorStoreIds, int? maxResultCount = null, FileSearchToolRankingOptions rankingOptions = null, BinaryData filters = null);
55765605
public static FunctionTool CreateFunctionTool(string functionName, BinaryData functionParameters, bool? strictModeEnabled, string functionDescription = null);
5577-
public static McpTool CreateMcpTool(string serverLabel, Uri serverUri, IDictionary<string, string> headers = null, McpToolFilter allowedTools = null, McpToolCallApprovalPolicy toolCallApprovalPolicy = null);
5606+
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);
5607+
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);
55785608
public static WebSearchTool CreateWebSearchTool(WebSearchToolLocation userLocation = null, WebSearchToolContextSize? searchContextSize = null);
55795609
protected virtual ResponseTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
55805610
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
@@ -5809,13 +5839,17 @@ public class StreamingResponseMcpCallArgumentsDoneUpdate : StreamingResponseUpda
58095839
}
58105840
[Experimental("OPENAI001")]
58115841
public class StreamingResponseMcpCallCompletedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseMcpCallCompletedUpdate>, IPersistableModel<StreamingResponseMcpCallCompletedUpdate> {
5842+
public string ItemId { get; }
5843+
public int OutputIndex { get; }
58125844
protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
58135845
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
58145846
protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
58155847
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
58165848
}
58175849
[Experimental("OPENAI001")]
58185850
public class StreamingResponseMcpCallFailedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseMcpCallFailedUpdate>, IPersistableModel<StreamingResponseMcpCallFailedUpdate> {
5851+
public string ItemId { get; }
5852+
public int OutputIndex { get; }
58195853
protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
58205854
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
58215855
protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
@@ -5832,20 +5866,26 @@ public class StreamingResponseMcpCallInProgressUpdate : StreamingResponseUpdate,
58325866
}
58335867
[Experimental("OPENAI001")]
58345868
public class StreamingResponseMcpListToolsCompletedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseMcpListToolsCompletedUpdate>, IPersistableModel<StreamingResponseMcpListToolsCompletedUpdate> {
5869+
public string ItemId { get; }
5870+
public int OutputIndex { get; }
58355871
protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
58365872
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
58375873
protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
58385874
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
58395875
}
58405876
[Experimental("OPENAI001")]
58415877
public class StreamingResponseMcpListToolsFailedUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseMcpListToolsFailedUpdate>, IPersistableModel<StreamingResponseMcpListToolsFailedUpdate> {
5878+
public string ItemId { get; }
5879+
public int OutputIndex { get; }
58425880
protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
58435881
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
58445882
protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
58455883
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
58465884
}
58475885
[Experimental("OPENAI001")]
58485886
public class StreamingResponseMcpListToolsInProgressUpdate : StreamingResponseUpdate, IJsonModel<StreamingResponseMcpListToolsInProgressUpdate>, IPersistableModel<StreamingResponseMcpListToolsInProgressUpdate> {
5887+
public string ItemId { get; }
5888+
public int OutputIndex { get; }
58495889
protected override StreamingResponseUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
58505890
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
58515891
protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);

0 commit comments

Comments
 (0)