diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI..JsonSerializerContext.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI..JsonSerializerContext.g.cs
index 87783e92..627eab8e 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI..JsonSerializerContext.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI..JsonSerializerContext.g.cs
@@ -337,8 +337,8 @@ namespace tryAGI.OpenAI
typeof(global::tryAGI.OpenAI.JsonConverters.ComputerScreenshotImageTypeNullableJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.ComputerCallOutputItemParamTypeJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.ComputerCallOutputItemParamTypeNullableJsonConverter),
- typeof(global::tryAGI.OpenAI.JsonConverters.ComputerEnvironment1JsonConverter),
- typeof(global::tryAGI.OpenAI.JsonConverters.ComputerEnvironment1NullableJsonConverter),
+ typeof(global::tryAGI.OpenAI.JsonConverters.ComputerEnvironmentJsonConverter),
+ typeof(global::tryAGI.OpenAI.JsonConverters.ComputerEnvironmentNullableJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.ComputerScreenshotContentTypeJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.ComputerScreenshotContentTypeNullableJsonConverter),
typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallStatusJsonConverter),
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateConversation.g.cs
index a2c499eb..badd2c07 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateConversation.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateConversation.g.cs
@@ -7,11 +7,11 @@ public partial class ConversationsClient
{
partial void PrepareCreateConversationArguments(
global::System.Net.Http.HttpClient httpClient,
- global::tryAGI.OpenAI.CreateConversationRequest request);
+ global::tryAGI.OpenAI.CreateConversationBody request);
partial void PrepareCreateConversationRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
- global::tryAGI.OpenAI.CreateConversationRequest request);
+ global::tryAGI.OpenAI.CreateConversationBody request);
partial void ProcessCreateConversationResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
@@ -29,7 +29,7 @@ partial void ProcessCreateConversationResponseContent(
/// The token to cancel the operation with
///
public async global::System.Threading.Tasks.Task CreateConversationAsync(
- global::tryAGI.OpenAI.CreateConversationRequest request,
+ global::tryAGI.OpenAI.CreateConversationBody request,
global::System.Threading.CancellationToken cancellationToken = default)
{
request = request ?? throw new global::System.ArgumentNullException(nameof(request));
@@ -171,24 +171,17 @@ partial void ProcessCreateConversationResponseContent(
/// Create a conversation.
///
///
- /// Initial items to include in the conversation context.
- /// You may add up to 20 items at a time.
- ///
- ///
- /// Set of 16 key-value pairs that can be attached to an object. This can be
- /// useful for storing additional information about the object in a structured
- /// format, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters.
+ /// Initial items to include in the conversation context. You may add up to 20 items at a time.
///
+ ///
/// The token to cancel the operation with
///
public async global::System.Threading.Tasks.Task CreateConversationAsync(
global::System.Collections.Generic.IList? items = default,
- global::System.Collections.Generic.Dictionary? metadata = default,
+ object? metadata = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
- var __request = new global::tryAGI.OpenAI.CreateConversationRequest
+ var __request = new global::tryAGI.OpenAI.CreateConversationBody
{
Items = items,
Metadata = metadata,
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteConversation.g.cs
index 2760c9a2..93d5838f 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteConversation.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteConversation.g.cs
@@ -23,7 +23,7 @@ partial void ProcessDeleteConversationResponseContent(
///
/// Delete a conversation
- /// Delete a conversation with the given ID.
+ /// Delete a conversation. Items in the conversation will not be deleted.
///
///
/// Example: conv_123
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.GetConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.GetConversation.g.cs
index 38202200..123d2ef1 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.GetConversation.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.GetConversation.g.cs
@@ -23,7 +23,7 @@ partial void ProcessGetConversationResponseContent(
///
/// Retrieve a conversation
- /// Get a conversation with the given ID.
+ /// Get a conversation
///
///
/// Example: conv_123
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.UpdateConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.UpdateConversation.g.cs
index 39d3755c..f4316574 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.UpdateConversation.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.UpdateConversation.g.cs
@@ -25,7 +25,7 @@ partial void ProcessUpdateConversationResponseContent(
///
/// Update a conversation
- /// Update a conversation's metadata with the given ID.
+ /// Update a conversation
///
///
/// Example: conv_123
@@ -176,20 +176,23 @@ partial void ProcessUpdateConversationResponseContent(
///
/// Update a conversation
- /// Update a conversation's metadata with the given ID.
+ /// Update a conversation
///
///
/// Example: conv_123
///
///
- /// Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
+ /// Set of 16 key-value pairs that can be attached to an object. This can be
+ /// useful for storing additional information about the object in a structured
+ /// format, and querying for objects via API or the dashboard.
+ /// Keys are strings with a maximum length of 64 characters. Values are strings
+ /// with a maximum length of 512 characters.
///
/// The token to cancel the operation with
///
public async global::System.Threading.Tasks.Task UpdateConversationAsync(
string conversationId,
- global::System.Collections.Generic.Dictionary metadata,
+ global::System.Collections.Generic.Dictionary? metadata,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __request = new global::tryAGI.OpenAI.UpdateConversationBody
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.CreateConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.CreateConversation.g.cs
index 4e71d684..53195660 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.CreateConversation.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.CreateConversation.g.cs
@@ -12,7 +12,7 @@ public partial interface IConversationsClient
/// The token to cancel the operation with
///
global::System.Threading.Tasks.Task CreateConversationAsync(
- global::tryAGI.OpenAI.CreateConversationRequest request,
+ global::tryAGI.OpenAI.CreateConversationBody request,
global::System.Threading.CancellationToken cancellationToken = default);
///
@@ -20,21 +20,14 @@ public partial interface IConversationsClient
/// Create a conversation.
///
///
- /// Initial items to include in the conversation context.
- /// You may add up to 20 items at a time.
- ///
- ///
- /// Set of 16 key-value pairs that can be attached to an object. This can be
- /// useful for storing additional information about the object in a structured
- /// format, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters.
+ /// Initial items to include in the conversation context. You may add up to 20 items at a time.
///
+ ///
/// The token to cancel the operation with
///
global::System.Threading.Tasks.Task CreateConversationAsync(
global::System.Collections.Generic.IList? items = default,
- global::System.Collections.Generic.Dictionary? metadata = default,
+ object? metadata = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.DeleteConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.DeleteConversation.g.cs
index 6ba4d092..cb77087f 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.DeleteConversation.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.DeleteConversation.g.cs
@@ -6,7 +6,7 @@ public partial interface IConversationsClient
{
///
/// Delete a conversation
- /// Delete a conversation with the given ID.
+ /// Delete a conversation. Items in the conversation will not be deleted.
///
///
/// Example: conv_123
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.GetConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.GetConversation.g.cs
index 69457a7a..921049c8 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.GetConversation.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.GetConversation.g.cs
@@ -6,7 +6,7 @@ public partial interface IConversationsClient
{
///
/// Retrieve a conversation
- /// Get a conversation with the given ID.
+ /// Get a conversation
///
///
/// Example: conv_123
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.UpdateConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.UpdateConversation.g.cs
index 6c2f554a..aff9a55e 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.UpdateConversation.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.UpdateConversation.g.cs
@@ -6,7 +6,7 @@ public partial interface IConversationsClient
{
///
/// Update a conversation
- /// Update a conversation's metadata with the given ID.
+ /// Update a conversation
///
///
/// Example: conv_123
@@ -21,20 +21,23 @@ public partial interface IConversationsClient
///
/// Update a conversation
- /// Update a conversation's metadata with the given ID.
+ /// Update a conversation
///
///
/// Example: conv_123
///
///
- /// Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
+ /// Set of 16 key-value pairs that can be attached to an object. This can be
+ /// useful for storing additional information about the object in a structured
+ /// format, and querying for objects via API or the dashboard.
+ /// Keys are strings with a maximum length of 64 characters. Values are strings
+ /// with a maximum length of 512 characters.
///
/// The token to cancel the operation with
///
global::System.Threading.Tasks.Task UpdateConversationAsync(
string conversationId,
- global::System.Collections.Generic.Dictionary metadata,
+ global::System.Collections.Generic.Dictionary? metadata,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerEnvironment1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerEnvironment.g.cs
similarity index 82%
rename from src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerEnvironment1.g.cs
rename to src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerEnvironment.g.cs
index dadf089d..b4fa8f5f 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerEnvironment1.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerEnvironment.g.cs
@@ -3,10 +3,10 @@
namespace tryAGI.OpenAI.JsonConverters
{
///
- public sealed class ComputerEnvironment1JsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ public sealed class ComputerEnvironmentJsonConverter : global::System.Text.Json.Serialization.JsonConverter
{
///
- public override global::tryAGI.OpenAI.ComputerEnvironment1 Read(
+ public override global::tryAGI.OpenAI.ComputerEnvironment Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
@@ -18,7 +18,7 @@ public sealed class ComputerEnvironment1JsonConverter : global::System.Text.Json
var stringValue = reader.GetString();
if (stringValue != null)
{
- return global::tryAGI.OpenAI.ComputerEnvironment1Extensions.ToEnum(stringValue) ?? default;
+ return global::tryAGI.OpenAI.ComputerEnvironmentExtensions.ToEnum(stringValue) ?? default;
}
break;
@@ -26,11 +26,11 @@ public sealed class ComputerEnvironment1JsonConverter : global::System.Text.Json
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
- return (global::tryAGI.OpenAI.ComputerEnvironment1)numValue;
+ return (global::tryAGI.OpenAI.ComputerEnvironment)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
- return default(global::tryAGI.OpenAI.ComputerEnvironment1);
+ return default(global::tryAGI.OpenAI.ComputerEnvironment);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
@@ -42,12 +42,12 @@ public sealed class ComputerEnvironment1JsonConverter : global::System.Text.Json
///
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
- global::tryAGI.OpenAI.ComputerEnvironment1 value,
+ global::tryAGI.OpenAI.ComputerEnvironment value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
- writer.WriteStringValue(global::tryAGI.OpenAI.ComputerEnvironment1Extensions.ToValueString(value));
+ writer.WriteStringValue(global::tryAGI.OpenAI.ComputerEnvironmentExtensions.ToValueString(value));
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerEnvironment1Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerEnvironmentNullable.g.cs
similarity index 83%
rename from src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerEnvironment1Nullable.g.cs
rename to src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerEnvironmentNullable.g.cs
index 7fa47fb9..e76dce41 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerEnvironment1Nullable.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerEnvironmentNullable.g.cs
@@ -3,10 +3,10 @@
namespace tryAGI.OpenAI.JsonConverters
{
///
- public sealed class ComputerEnvironment1NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ public sealed class ComputerEnvironmentNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
{
///
- public override global::tryAGI.OpenAI.ComputerEnvironment1? Read(
+ public override global::tryAGI.OpenAI.ComputerEnvironment? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
@@ -18,7 +18,7 @@ public sealed class ComputerEnvironment1NullableJsonConverter : global::System.T
var stringValue = reader.GetString();
if (stringValue != null)
{
- return global::tryAGI.OpenAI.ComputerEnvironment1Extensions.ToEnum(stringValue);
+ return global::tryAGI.OpenAI.ComputerEnvironmentExtensions.ToEnum(stringValue);
}
break;
@@ -26,11 +26,11 @@ public sealed class ComputerEnvironment1NullableJsonConverter : global::System.T
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
- return (global::tryAGI.OpenAI.ComputerEnvironment1)numValue;
+ return (global::tryAGI.OpenAI.ComputerEnvironment)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
- return default(global::tryAGI.OpenAI.ComputerEnvironment1?);
+ return default(global::tryAGI.OpenAI.ComputerEnvironment?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
@@ -42,7 +42,7 @@ public sealed class ComputerEnvironment1NullableJsonConverter : global::System.T
///
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
- global::tryAGI.OpenAI.ComputerEnvironment1? value,
+ global::tryAGI.OpenAI.ComputerEnvironment? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
@@ -53,7 +53,7 @@ public override void Write(
}
else
{
- writer.WriteStringValue(global::tryAGI.OpenAI.ComputerEnvironment1Extensions.ToValueString(value.Value));
+ writer.WriteStringValue(global::tryAGI.OpenAI.ComputerEnvironmentExtensions.ToValueString(value.Value));
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonSerializerContextTypes.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonSerializerContextTypes.g.cs
index c679d94e..a35ccc14 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonSerializerContextTypes.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonSerializerContextTypes.g.cs
@@ -2178,7 +2178,7 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::tryAGI.OpenAI.ComputerEnvironment1? Type538 { get; set; }
+ public global::tryAGI.OpenAI.ComputerEnvironment? Type538 { get; set; }
///
///
///
@@ -3062,7 +3062,7 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::tryAGI.OpenAI.CreateConversationRequest? Type759 { get; set; }
+ public global::tryAGI.OpenAI.CreateConversationBody? Type759 { get; set; }
///
///
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerEnvironment1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerEnvironment.g.cs
similarity index 60%
rename from src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerEnvironment1.g.cs
rename to src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerEnvironment.g.cs
index 69111e32..388d18df 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerEnvironment1.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerEnvironment.g.cs
@@ -6,7 +6,7 @@ namespace tryAGI.OpenAI
///
///
///
- public enum ComputerEnvironment1
+ public enum ComputerEnvironment
{
///
///
@@ -33,35 +33,35 @@ public enum ComputerEnvironment1
///
/// Enum extensions to do fast conversions without the reflection.
///
- public static class ComputerEnvironment1Extensions
+ public static class ComputerEnvironmentExtensions
{
///
/// Converts an enum to a string.
///
- public static string ToValueString(this ComputerEnvironment1 value)
+ public static string ToValueString(this ComputerEnvironment value)
{
return value switch
{
- ComputerEnvironment1.Windows => "windows",
- ComputerEnvironment1.Mac => "mac",
- ComputerEnvironment1.Linux => "linux",
- ComputerEnvironment1.Ubuntu => "ubuntu",
- ComputerEnvironment1.Browser => "browser",
+ ComputerEnvironment.Windows => "windows",
+ ComputerEnvironment.Mac => "mac",
+ ComputerEnvironment.Linux => "linux",
+ ComputerEnvironment.Ubuntu => "ubuntu",
+ ComputerEnvironment.Browser => "browser",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
///
/// Converts an string to a enum.
///
- public static ComputerEnvironment1? ToEnum(string value)
+ public static ComputerEnvironment? ToEnum(string value)
{
return value switch
{
- "windows" => ComputerEnvironment1.Windows,
- "mac" => ComputerEnvironment1.Mac,
- "linux" => ComputerEnvironment1.Linux,
- "ubuntu" => ComputerEnvironment1.Ubuntu,
- "browser" => ComputerEnvironment1.Browser,
+ "windows" => ComputerEnvironment.Windows,
+ "mac" => ComputerEnvironment.Mac,
+ "linux" => ComputerEnvironment.Linux,
+ "ubuntu" => ComputerEnvironment.Ubuntu,
+ "browser" => ComputerEnvironment.Browser,
_ => null,
};
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerUsePreviewTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerUsePreviewTool.g.cs
index 9098bf3d..e8aaff94 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerUsePreviewTool.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerUsePreviewTool.g.cs
@@ -26,9 +26,9 @@ public sealed partial class ComputerUsePreviewTool
///
///
[global::System.Text.Json.Serialization.JsonPropertyName("environment")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerEnvironment1JsonConverter))]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerEnvironmentJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
- public required global::tryAGI.OpenAI.ComputerEnvironment1 Environment { get; set; }
+ public required global::tryAGI.OpenAI.ComputerEnvironment Environment { get; set; }
///
/// The type of the computer use tool. Always `computer_use_preview`.
@@ -65,7 +65,7 @@ public sealed partial class ComputerUsePreviewTool
public ComputerUsePreviewTool(
int displayHeight,
int displayWidth,
- global::tryAGI.OpenAI.ComputerEnvironment1 environment,
+ global::tryAGI.OpenAI.ComputerEnvironment environment,
global::tryAGI.OpenAI.ComputerUsePreviewToolType type = global::tryAGI.OpenAI.ComputerUsePreviewToolType.ComputerUsePreview)
{
this.DisplayHeight = displayHeight;
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MetadataParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBody.Json.g.cs
similarity index 87%
rename from src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MetadataParam.Json.g.cs
rename to src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBody.Json.g.cs
index f4e4c762..83841e12 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MetadataParam.Json.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBody.Json.g.cs
@@ -2,7 +2,7 @@
namespace tryAGI.OpenAI
{
- public sealed partial class MetadataParam
+ public sealed partial class CreateConversationBody
{
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
@@ -34,14 +34,14 @@ public string ToJson(
///
/// Deserializes a JSON string using the provided JsonSerializerContext.
///
- public static global::tryAGI.OpenAI.MetadataParam? FromJson(
+ public static global::tryAGI.OpenAI.CreateConversationBody? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
- typeof(global::tryAGI.OpenAI.MetadataParam),
- jsonSerializerContext) as global::tryAGI.OpenAI.MetadataParam;
+ typeof(global::tryAGI.OpenAI.CreateConversationBody),
+ jsonSerializerContext) as global::tryAGI.OpenAI.CreateConversationBody;
}
///
@@ -51,11 +51,11 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
- public static global::tryAGI.OpenAI.MetadataParam? FromJson(
+ public static global::tryAGI.OpenAI.CreateConversationBody? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
- return global::System.Text.Json.JsonSerializer.Deserialize(
+ return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
}
@@ -63,14 +63,14 @@ public string ToJson(
///
/// Deserializes a JSON stream using the provided JsonSerializerContext.
///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
- typeof(global::tryAGI.OpenAI.MetadataParam),
- jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MetadataParam;
+ typeof(global::tryAGI.OpenAI.CreateConversationBody),
+ jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateConversationBody;
}
///
@@ -80,11 +80,11 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBody.g.cs
similarity index 52%
rename from src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationRequest.g.cs
rename to src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBody.g.cs
index ab620592..c53d4e1c 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationRequest.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBody.g.cs
@@ -4,26 +4,21 @@
namespace tryAGI.OpenAI
{
///
- /// Create a conversation
+ ///
///
- public sealed partial class CreateConversationRequest
+ public sealed partial class CreateConversationBody
{
///
- /// Initial items to include in the conversation context.
- /// You may add up to 20 items at a time.
+ /// Initial items to include in the conversation context. You may add up to 20 items at a time.
///
[global::System.Text.Json.Serialization.JsonPropertyName("items")]
public global::System.Collections.Generic.IList? Items { get; set; }
///
- /// Set of 16 key-value pairs that can be attached to an object. This can be
- /// useful for storing additional information about the object in a structured
- /// format, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters.
+ ///
///
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")]
- public global::System.Collections.Generic.Dictionary? Metadata { get; set; }
+ public object? Metadata { get; set; }
///
/// Additional properties that are not explicitly defined in the schema
@@ -32,34 +27,27 @@ public sealed partial class CreateConversationRequest
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
///
- /// Initial items to include in the conversation context.
- /// You may add up to 20 items at a time.
- ///
- ///
- /// Set of 16 key-value pairs that can be attached to an object. This can be
- /// useful for storing additional information about the object in a structured
- /// format, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters.
+ /// Initial items to include in the conversation context. You may add up to 20 items at a time.
///
+ ///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
- public CreateConversationRequest(
+ public CreateConversationBody(
global::System.Collections.Generic.IList? items,
- global::System.Collections.Generic.Dictionary? metadata)
+ object? metadata)
{
this.Items = items;
this.Metadata = metadata;
}
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- public CreateConversationRequest()
+ public CreateConversationBody()
{
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationRequest.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationRequest.Json.g.cs
deleted file mode 100644
index c16a1c84..00000000
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationRequest.Json.g.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-#nullable enable
-
-namespace tryAGI.OpenAI
-{
- public sealed partial class CreateConversationRequest
- {
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
- ///
- public static global::tryAGI.OpenAI.CreateConversationRequest? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::tryAGI.OpenAI.CreateConversationRequest),
- jsonSerializerContext) as global::tryAGI.OpenAI.CreateConversationRequest;
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::tryAGI.OpenAI.CreateConversationRequest? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
- ///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::tryAGI.OpenAI.CreateConversationRequest),
- jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateConversationRequest;
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
- }
- }
-}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MetadataParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MetadataParam.g.cs
deleted file mode 100644
index 148f3200..00000000
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MetadataParam.g.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-
-#nullable enable
-
-namespace tryAGI.OpenAI
-{
- ///
- /// Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
- ///
- public sealed partial class MetadataParam
- {
-
- ///
- /// Additional properties that are not explicitly defined in the schema
- ///
- [global::System.Text.Json.Serialization.JsonExtensionData]
- public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
- }
-}
\ No newline at end of file
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateConversationBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateConversationBody.g.cs
index 4d9f9edc..27984db8 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateConversationBody.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateConversationBody.g.cs
@@ -9,12 +9,15 @@ namespace tryAGI.OpenAI
public sealed partial class UpdateConversationBody
{
///
- /// Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
+ /// Set of 16 key-value pairs that can be attached to an object. This can be
+ /// useful for storing additional information about the object in a structured
+ /// format, and querying for objects via API or the dashboard.
+ /// Keys are strings with a maximum length of 64 characters. Values are strings
+ /// with a maximum length of 512 characters.
///
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")]
[global::System.Text.Json.Serialization.JsonRequired]
- public required global::System.Collections.Generic.Dictionary Metadata { get; set; }
+ public required global::System.Collections.Generic.Dictionary? Metadata { get; set; }
///
/// Additional properties that are not explicitly defined in the schema
@@ -26,14 +29,17 @@ public sealed partial class UpdateConversationBody
/// Initializes a new instance of the class.
///
///
- /// Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
+ /// Set of 16 key-value pairs that can be attached to an object. This can be
+ /// useful for storing additional information about the object in a structured
+ /// format, and querying for objects via API or the dashboard.
+ /// Keys are strings with a maximum length of 64 characters. Values are strings
+ /// with a maximum length of 512 characters.
///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public UpdateConversationBody(
- global::System.Collections.Generic.Dictionary metadata)
+ global::System.Collections.Generic.Dictionary? metadata)
{
this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata));
}
diff --git a/src/libs/tryAGI.OpenAI/openapi.yaml b/src/libs/tryAGI.OpenAI/openapi.yaml
index 4f2ae33d..7680906a 100644
--- a/src/libs/tryAGI.OpenAI/openapi.yaml
+++ b/src/libs/tryAGI.OpenAI/openapi.yaml
@@ -1136,11 +1136,10 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/CreateConversationRequest'
- required: true
+ $ref: '#/components/schemas/CreateConversationBody'
responses:
'200':
- description: OK
+ description: Success
content:
application/json:
schema:
@@ -1167,7 +1166,7 @@ paths:
tags:
- Conversations
summary: Delete a conversation
- description: Delete a conversation with the given ID.
+ description: Delete a conversation. Items in the conversation will not be deleted.
operationId: deleteConversation
parameters:
- name: conversation_id
@@ -1179,7 +1178,7 @@ paths:
example: conv_123
responses:
'200':
- description: OK
+ description: Success
content:
application/json:
schema:
@@ -1205,7 +1204,7 @@ paths:
tags:
- Conversations
summary: Retrieve a conversation
- description: Get a conversation with the given ID.
+ description: Get a conversation
operationId: getConversation
parameters:
- name: conversation_id
@@ -1217,7 +1216,7 @@ paths:
example: conv_123
responses:
'200':
- description: OK
+ description: Success
content:
application/json:
schema:
@@ -1243,7 +1242,7 @@ paths:
tags:
- Conversations
summary: Update a conversation
- description: Update a conversation's metadata with the given ID.
+ description: Update a conversation
operationId: updateConversation
parameters:
- name: conversation_id
@@ -1258,10 +1257,9 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/UpdateConversationBody'
- required: true
responses:
'200':
- description: OK
+ description: Success
content:
application/json:
schema:
@@ -1271,7 +1269,7 @@ paths:
request:
csharp: "using System;\nusing System.Collections.Generic;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversation updated = client.UpdateConversation(\n conversationId: \"conv_123\",\n new UpdateConversationOptions\n {\n Metadata = new Dictionary\n {\n { \"topic\", \"project-x\" }\n }\n }\n);\nConsole.WriteLine(updated.Id);\n"
curl: "curl https://api.openai.com/v1/conversations/conv_123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"metadata\": {\"topic\": \"project-x\"}\n }'\n"
- go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/conversations\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n conversation, err := client.Conversations.Update(\n context.TODO(),\n \"conv_123\",\n conversations.ConversationUpdateParams{\n Metadata: map[string]string{\n \"foo\": \"string\",\n },\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", conversation.ID)\n}\n"
+ go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/conversations\"\n \"github.com/openai/openai-go/option\"\n \"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n conversation, err := client.Conversations.Update(\n context.TODO(),\n \"conv_123\",\n conversations.ConversationUpdateParams{\n Metadata: shared.Metadata{\n \"foo\": \"string\",\n },\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", conversation.ID)\n}\n"
java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.JsonValue;\nimport com.openai.models.conversations.Conversation;\nimport com.openai.models.conversations.ConversationUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ConversationUpdateParams params = ConversationUpdateParams.builder()\n .conversationId(\"conv_123\")\n .metadata(ConversationUpdateParams.Metadata.builder()\n .putAdditionalProperty(\"foo\", JsonValue.from(\"string\"))\n .build())\n .build();\n Conversation conversation = client.conversations().update(params);\n }\n}"
javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst updated = await client.conversations.update(\n \"conv_123\",\n { metadata: { topic: \"project-x\" } }\n);\nconsole.log(updated);\n"
node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst conversation = await client.conversations.update('conv_123', { metadata: { foo: 'string' } });\n\nconsole.log(conversation.id);"
@@ -1395,12 +1393,12 @@ paths:
request:
csharp: "using System;\nusing System.Collections.Generic;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversationItemList created = client.ConversationItems.Create(\n conversationId: \"conv_123\",\n new CreateConversationItemsOptions\n {\n Items = new List\n {\n new ConversationMessage\n {\n Role = \"user\",\n Content =\n {\n new ConversationInputText { Text = \"Hello!\" }\n }\n },\n new ConversationMessage\n {\n Role = \"user\",\n Content =\n {\n new ConversationInputText { Text = \"How are you?\" }\n }\n }\n }\n }\n);\nConsole.WriteLine(created.Data.Count);\n"
curl: "curl https://api.openai.com/v1/conversations/conv_123/items \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"items\": [\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"Hello!\"}\n ]\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"How are you?\"}\n ]\n }\n ]\n }'\n"
- go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/conversations\"\n \"github.com/openai/openai-go/option\"\n \"github.com/openai/openai-go/responses\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n conversationItemList, err := client.Conversations.Items.New(\n context.TODO(),\n \"conv_123\",\n conversations.ItemNewParams{\n Items: []responses.ResponseInputItemUnionParam{responses.ResponseInputItemUnionParam{\n OfMessage: &responses.EasyInputMessageParam{\n Content: responses.EasyInputMessageContentUnionParam{\n OfString: openai.String(\"string\"),\n },\n Role: responses.EasyInputMessageRoleUser,\n },\n }},\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", conversationItemList.FirstID)\n}\n"
- java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.items.ConversationItemList;\nimport com.openai.models.conversations.items.ItemCreateParams;\nimport com.openai.models.responses.EasyInputMessage;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemCreateParams params = ItemCreateParams.builder()\n .conversationId(\"conv_123\")\n .addItem(EasyInputMessage.builder()\n .content(\"string\")\n .role(EasyInputMessage.Role.USER)\n .build())\n .build();\n ConversationItemList conversationItemList = client.conversations().items().create(params);\n }\n}"
+ go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/conversations\"\n \"github.com/openai/openai-go/option\"\n \"github.com/openai/openai-go/responses\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n conversationItemList, err := client.Conversations.Items.New(\n context.TODO(),\n \"conv_123\",\n conversations.ItemNewParams{\n Items: []responses.ResponseInputItemUnionParam{responses.ResponseInputItemUnionParam{\n OfMessage: &responses.EasyInputMessageParam{\n Content: responses.EasyInputMessageContentUnionParam{\n OfString: openai.String(\"string\"),\n },\n Role: responses.EasyInputMessageRoleUser,\n Type: responses.EasyInputMessageTypeMessage,\n },\n }},\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", conversationItemList.FirstID)\n}\n"
+ java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.items.ConversationItemList;\nimport com.openai.models.conversations.items.ItemCreateParams;\nimport com.openai.models.responses.EasyInputMessage;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemCreateParams params = ItemCreateParams.builder()\n .conversationId(\"conv_123\")\n .addItem(EasyInputMessage.builder()\n .content(\"string\")\n .role(EasyInputMessage.Role.USER)\n .type(EasyInputMessage.Type.MESSAGE)\n .build())\n .build();\n ConversationItemList conversationItemList = client.conversations().items().create(params);\n }\n}"
javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst items = await client.conversations.items.create(\n \"conv_123\",\n {\n items: [\n {\n type: \"message\",\n role: \"user\",\n content: [{ type: \"input_text\", text: \"Hello!\" }],\n },\n {\n type: \"message\",\n role: \"user\",\n content: [{ type: \"input_text\", text: \"How are you?\" }],\n },\n ],\n }\n);\nconsole.log(items.data);\n"
- node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst conversationItemList = await client.conversations.items.create('conv_123', {\n items: [{ content: 'string', role: 'user' }],\n});\n\nconsole.log(conversationItemList.first_id);"
- python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nconversation_item_list = client.conversations.items.create(\n conversation_id=\"conv_123\",\n items=[{\n \"content\": \"string\",\n \"role\": \"user\",\n }],\n)\nprint(conversation_item_list.first_id)"
- ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation_item_list = openai.conversations.items.create(\"conv_123\", items: [{content: \"string\", role: :user}])\n\nputs(conversation_item_list)"
+ node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst conversationItemList = await client.conversations.items.create('conv_123', {\n items: [{ content: 'string', role: 'user', type: 'message' }],\n});\n\nconsole.log(conversationItemList.first_id);"
+ python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nconversation_item_list = client.conversations.items.create(\n conversation_id=\"conv_123\",\n items=[{\n \"content\": \"string\",\n \"role\": \"user\",\n \"type\": \"message\",\n }],\n)\nprint(conversation_item_list.first_id)"
+ ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation_item_list = openai.conversations.items.create(\"conv_123\", items: [{content: \"string\", role: :user, type: :message}])\n\nputs(conversation_item_list)"
response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"type\": \"message\",\n \"id\": \"msg_abc\",\n \"status\": \"completed\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"Hello!\"}\n ]\n },\n {\n \"type\": \"message\",\n \"id\": \"msg_def\",\n \"status\": \"completed\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"How are you?\"}\n ]\n }\n ],\n \"first_id\": \"msg_abc\",\n \"last_id\": \"msg_def\",\n \"has_more\": false\n}\n"
title: Add a user message to a conversation
group: conversations
@@ -10004,7 +10002,7 @@ components:
description: Details about the pending safety check.
nullable: true
description: A pending safety check for the computer call.
- ComputerEnvironment1:
+ ComputerEnvironment:
enum:
- windows
- mac
@@ -10172,7 +10170,7 @@ components:
type: integer
description: The width of the computer display.
environment:
- $ref: '#/components/schemas/ComputerEnvironment1'
+ $ref: '#/components/schemas/ComputerEnvironment'
type:
enum:
- computer_use_preview
@@ -10393,9 +10391,6 @@ components:
description: 'A single item within a conversation. The set of possible types are the same as the `output` type of a [Response object](https://platform.openai.com/docs/api-reference/responses/object#responses/object-output).'
discriminator:
propertyName: type
- x-oaiMeta:
- group: conversations
- name: The item object
ConversationItemList:
title: The conversation item list
required:
@@ -11261,7 +11256,7 @@ components:
file_id:
type: string
description: Name of the file to create.
- CreateConversationRequest:
+ CreateConversationBody:
type: object
properties:
items:
@@ -11269,11 +11264,11 @@ components:
type: array
items:
$ref: '#/components/schemas/InputItem'
- description: "Initial items to include in the conversation context.\nYou may add up to 20 items at a time.\n"
+ description: Initial items to include in the conversation context. You may add up to 20 items at a time.
nullable: true
metadata:
- $ref: '#/components/schemas/Metadata'
- description: Create a conversation
+ type: 'null'
+ nullable: true
CreateEmbeddingRequest:
required:
- model
@@ -18409,13 +18404,6 @@ components:
description: "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n"
nullable: true
x-oaiTypeLabel: map
- MetadataParam:
- maxProperties: 16
- type: object
- additionalProperties:
- maxLength: 512
- type: string
- description: "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters."
Model:
title: Model
required:
@@ -28882,7 +28870,7 @@ components:
type: object
properties:
metadata:
- $ref: '#/components/schemas/MetadataParam'
+ $ref: '#/components/schemas/Metadata'
UpdateVectorStoreFileAttributesRequest:
required:
- attributes