Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
93 changes: 75 additions & 18 deletions api/OpenAI.net8.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4650,6 +4650,17 @@ public enum ComputerCallStatus {
Completed = 1,
Incomplete = 2
}
[Experimental("OPENAI001")]
public class ComputerTool : ResponseTool, IJsonModel<ComputerTool>, IPersistableModel<ComputerTool> {
public ComputerTool(ComputerToolEnvironment environment, int displayWidth, int displayHeight);
public int DisplayHeight { get; set; }
public int DisplayWidth { get; set; }
public ComputerToolEnvironment Environment { get; set; }
protected override ResponseTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
protected override ResponseTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
}
[Experimental("OPENAICUA001")]
public readonly partial struct ComputerToolEnvironment : IEquatable<ComputerToolEnvironment> {
public ComputerToolEnvironment(string value);
Expand Down Expand Up @@ -4701,6 +4712,18 @@ public enum FileSearchCallStatus {
Failed = 4
}
[Experimental("OPENAI001")]
public class FileSearchTool : ResponseTool, IJsonModel<FileSearchTool>, IPersistableModel<FileSearchTool> {
public FileSearchTool(IEnumerable<string> vectorStoreIds);
public BinaryData Filters { get; set; }
public int? MaxResultCount { get; set; }
public FileSearchToolRankingOptions RankingOptions { get; set; }
public IList<string> VectorStoreIds { get; }
protected override ResponseTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
protected override ResponseTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
}
[Experimental("OPENAI001")]
public readonly partial struct FileSearchToolRanker : IEquatable<FileSearchToolRanker> {
public FileSearchToolRanker(string value);
public static FileSearchToolRanker Auto { get; }
Expand Down Expand Up @@ -4761,6 +4784,18 @@ public enum FunctionCallStatus {
Incomplete = 2
}
[Experimental("OPENAI001")]
public class FunctionTool : ResponseTool, IJsonModel<FunctionTool>, IPersistableModel<FunctionTool> {
public FunctionTool(string functionName, BinaryData functionParameters, bool? strictModeEnabled);
public string FunctionDescription { get; set; }
public string FunctionName { get; set; }
public BinaryData FunctionParameters { get; set; }
public bool? StrictModeEnabled { get; set; }
protected override ResponseTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
protected override ResponseTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
}
[Experimental("OPENAI001")]
public class MessageResponseItem : ResponseItem, IJsonModel<MessageResponseItem>, IPersistableModel<MessageResponseItem> {
public IList<ResponseContentPart> Content { get; }
public MessageRole Role { get; }
Expand Down Expand Up @@ -5264,10 +5299,10 @@ public class ResponseTokenUsage : IJsonModel<ResponseTokenUsage>, IPersistableMo
[Experimental("OPENAI001")]
public class ResponseTool : IJsonModel<ResponseTool>, IPersistableModel<ResponseTool> {
[Experimental("OPENAICUA001")]
public static ResponseTool CreateComputerTool(ComputerToolEnvironment environment, int displayWidth, int displayHeight);
public static ResponseTool CreateFileSearchTool(IEnumerable<string> vectorStoreIds, int? maxResultCount = null, FileSearchToolRankingOptions rankingOptions = null, BinaryData filters = null);
public static ResponseTool CreateFunctionTool(string functionName, string functionDescription, BinaryData functionParameters, bool functionSchemaIsStrict = false);
public static ResponseTool CreateWebSearchTool(WebSearchUserLocation userLocation = null, WebSearchContextSize? searchContextSize = null);
public static ComputerTool CreateComputerTool(ComputerToolEnvironment environment, int displayWidth, int displayHeight);
public static FileSearchTool CreateFileSearchTool(IEnumerable<string> vectorStoreIds, int? maxResultCount = null, FileSearchToolRankingOptions rankingOptions = null, BinaryData filters = null);
public static FunctionTool CreateFunctionTool(string functionName, BinaryData functionParameters, bool? strictModeEnabled, string functionDescription = null);
public static WebSearchTool CreateWebSearchTool(WebSearchToolLocation userLocation = null, WebSearchToolContextSize? searchContextSize = null);
protected virtual ResponseTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
protected virtual ResponseTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
Expand Down Expand Up @@ -5566,28 +5601,50 @@ public enum WebSearchCallStatus {
Failed = 3
}
[Experimental("OPENAI001")]
public readonly partial struct WebSearchContextSize : IEquatable<WebSearchContextSize> {
public WebSearchContextSize(string value);
public static WebSearchContextSize High { get; }
public static WebSearchContextSize Low { get; }
public static WebSearchContextSize Medium { get; }
public readonly bool Equals(WebSearchContextSize other);
public class WebSearchTool : ResponseTool, IJsonModel<WebSearchTool>, IPersistableModel<WebSearchTool> {
public WebSearchTool();
public WebSearchToolContextSize? SearchContextSize { get; set; }
public WebSearchToolLocation UserLocation { get; set; }
protected override ResponseTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
protected override ResponseTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
}
[Experimental("OPENAI001")]
public class WebSearchToolApproximateLocation : WebSearchToolLocation, IJsonModel<WebSearchToolApproximateLocation>, IPersistableModel<WebSearchToolApproximateLocation> {
public WebSearchToolApproximateLocation();
public string City { get; set; }
public string Country { get; set; }
public string Region { get; set; }
public string Timezone { get; set; }
protected override WebSearchToolLocation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
protected override WebSearchToolLocation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
}
[Experimental("OPENAI001")]
public readonly partial struct WebSearchToolContextSize : IEquatable<WebSearchToolContextSize> {
public WebSearchToolContextSize(string value);
public static WebSearchToolContextSize High { get; }
public static WebSearchToolContextSize Low { get; }
public static WebSearchToolContextSize Medium { get; }
public readonly bool Equals(WebSearchToolContextSize other);
[EditorBrowsable(EditorBrowsableState.Never)]
public override readonly bool Equals(object obj);
[EditorBrowsable(EditorBrowsableState.Never)]
public override readonly int GetHashCode();
public static bool operator ==(WebSearchContextSize left, WebSearchContextSize right);
public static implicit operator WebSearchContextSize(string value);
public static implicit operator WebSearchContextSize?(string value);
public static bool operator !=(WebSearchContextSize left, WebSearchContextSize right);
public static bool operator ==(WebSearchToolContextSize left, WebSearchToolContextSize right);
public static implicit operator WebSearchToolContextSize(string value);
public static implicit operator WebSearchToolContextSize?(string value);
public static bool operator !=(WebSearchToolContextSize left, WebSearchToolContextSize right);
public override readonly string ToString();
}
[Experimental("OPENAI001")]
public class WebSearchUserLocation : IJsonModel<WebSearchUserLocation>, IPersistableModel<WebSearchUserLocation> {
public static WebSearchUserLocation CreateApproximateLocation(string country = null, string region = null, string city = null, string timezone = null);
protected virtual WebSearchUserLocation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
public class WebSearchToolLocation : IJsonModel<WebSearchToolLocation>, IPersistableModel<WebSearchToolLocation> {
public static WebSearchToolApproximateLocation CreateApproximateLocation(string country = null, string region = null, string city = null, string timezone = null);
protected virtual WebSearchToolLocation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
protected virtual WebSearchUserLocation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
protected virtual WebSearchToolLocation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
}
}
Expand Down
Loading