diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentStreamEvent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentStreamEvent.cs
index 0c2e715e09a9..97c4efa2a29e 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentStreamEvent.cs
+++ b/sdk/ai/Azure.AI.Projects/src/Generated/AgentStreamEvent.cs
@@ -77,7 +77,7 @@ public AgentStreamEvent(string value)
public static AgentStreamEvent ThreadRunRequiresAction { get; } = new AgentStreamEvent(ThreadRunRequiresActionValue);
/// Event sent when a run is completed. The data of this event is of type ThreadRun.
public static AgentStreamEvent ThreadRunCompleted { get; } = new AgentStreamEvent(ThreadRunCompletedValue);
- /// Event sent when a run ends incompleted. The data of this event is of type ThreadRun.
+ /// Event sent when a run ends incomplete. The data of this event is of type ThreadRun.
public static AgentStreamEvent ThreadRunIncomplete { get; } = new AgentStreamEvent(ThreadRunIncompleteValue);
/// Event sent when a run fails. The data of this event is of type ThreadRun.
public static AgentStreamEvent ThreadRunFailed { get; } = new AgentStreamEvent(ThreadRunFailedValue);
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsClient.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentsClient.cs
index 6d8476ffe785..03f27eba3f54 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsClient.cs
+++ b/sdk/ai/Azure.AI.Projects/src/Generated/AgentsClient.cs
@@ -1706,11 +1706,12 @@ public virtual Response UpdateMessage(string threadId, string messageId, Request
/// The strategy to use for dropping messages as the context windows moves forward.
/// Controls whether or not and which tool is called by the model.
/// Specifies the format that the model must output.
+ /// If `true` functions will run in parallel during tool use.
/// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.
/// The cancellation token to use.
/// or is null.
/// is an empty string, and was expected to be non-empty.
- public virtual async Task> CreateRunAsync(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default)
+ public virtual async Task> CreateRunAsync(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(threadId, nameof(threadId));
Argument.AssertNotNull(assistantId, nameof(assistantId));
@@ -1730,6 +1731,7 @@ public virtual async Task> CreateRunAsync(string threadId, s
truncationStrategy,
toolChoice,
responseFormat,
+ parallelToolCalls,
metadata ?? new ChangeTrackingDictionary(),
null);
RequestContext context = FromCancellationToken(cancellationToken);
@@ -1776,11 +1778,12 @@ public virtual async Task> CreateRunAsync(string threadId, s
/// The strategy to use for dropping messages as the context windows moves forward.
/// Controls whether or not and which tool is called by the model.
/// Specifies the format that the model must output.
+ /// If `true` functions will run in parallel during tool use.
/// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.
/// The cancellation token to use.
/// or is null.
/// is an empty string, and was expected to be non-empty.
- public virtual Response CreateRun(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default)
+ public virtual Response CreateRun(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(threadId, nameof(threadId));
Argument.AssertNotNull(assistantId, nameof(assistantId));
@@ -1800,6 +1803,7 @@ public virtual Response CreateRun(string threadId, string assistantId
truncationStrategy,
toolChoice,
responseFormat,
+ parallelToolCalls,
metadata ?? new ChangeTrackingDictionary(),
null);
RequestContext context = FromCancellationToken(cancellationToken);
@@ -1817,7 +1821,7 @@ public virtual Response CreateRun(string threadId, string assistantId
///
/// -
///
- /// Please try the simpler convenience overload with strongly typed models first.
+ /// Please try the simpler convenience overload with strongly typed models first.
///
///
///
@@ -1858,7 +1862,7 @@ public virtual async Task CreateRunAsync(string threadId, RequestConte
///
/// -
///
- /// Please try the simpler convenience overload with strongly typed models first.
+ /// Please try the simpler convenience overload with strongly typed models first.
///
///
///
@@ -2522,10 +2526,11 @@ public virtual Response CancelRun(string threadId, string runId, RequestContext
/// The strategy to use for dropping messages as the context windows moves forward.
/// Controls whether or not and which tool is called by the model.
/// Specifies the format that the model must output.
+ /// If `true` functions will run in parallel during tool use.
/// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.
/// The cancellation token to use.
/// is null.
- public virtual async Task> CreateThreadAndRunAsync(string assistantId, AgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, IEnumerable overrideTools = null, UpdateToolResourcesOptions toolResources = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default)
+ public virtual async Task> CreateThreadAndRunAsync(string assistantId, AgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, IEnumerable overrideTools = null, UpdateToolResourcesOptions toolResources = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(assistantId, nameof(assistantId));
@@ -2544,6 +2549,7 @@ public virtual async Task> CreateThreadAndRunAsync(string as
truncationStrategy,
toolChoice,
responseFormat,
+ parallelToolCalls,
metadata ?? new ChangeTrackingDictionary(),
null);
RequestContext context = FromCancellationToken(cancellationToken);
@@ -2586,10 +2592,11 @@ public virtual async Task> CreateThreadAndRunAsync(string as
/// The strategy to use for dropping messages as the context windows moves forward.
/// Controls whether or not and which tool is called by the model.
/// Specifies the format that the model must output.
+ /// If `true` functions will run in parallel during tool use.
/// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.
/// The cancellation token to use.
/// is null.
- public virtual Response CreateThreadAndRun(string assistantId, AgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, IEnumerable overrideTools = null, UpdateToolResourcesOptions toolResources = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default)
+ public virtual Response CreateThreadAndRun(string assistantId, AgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, IEnumerable overrideTools = null, UpdateToolResourcesOptions toolResources = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(assistantId, nameof(assistantId));
@@ -2608,6 +2615,7 @@ public virtual Response CreateThreadAndRun(string assistantId, AgentT
truncationStrategy,
toolChoice,
responseFormat,
+ parallelToolCalls,
metadata ?? new ChangeTrackingDictionary(),
null);
RequestContext context = FromCancellationToken(cancellationToken);
@@ -2625,7 +2633,7 @@ public virtual Response CreateThreadAndRun(string assistantId, AgentT
///
/// -
///
- /// Please try the simpler convenience overload with strongly typed models first.
+ /// Please try the simpler convenience overload with strongly typed models first.
///
///
///
@@ -2663,7 +2671,7 @@ public virtual async Task CreateThreadAndRunAsync(RequestContent conte
///
/// -
///
- /// Please try the simpler convenience overload with strongly typed models first.
+ /// Please try the simpler convenience overload with strongly typed models first.
///
///
///
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.Serialization.cs
index 91cd817d3827..bde5271e3de4 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.Serialization.cs
+++ b/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.Serialization.cs
@@ -209,6 +209,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
writer.WriteNull("response_format");
}
}
+ if (Optional.IsDefined(ParallelToolCalls))
+ {
+ writer.WritePropertyName("parallel_tool_calls"u8);
+ writer.WriteBooleanValue(ParallelToolCalls.Value);
+ }
if (Optional.IsCollectionDefined(Metadata))
{
if (Metadata != null)
@@ -278,6 +283,7 @@ internal static CreateRunRequest DeserializeCreateRunRequest(JsonElement element
TruncationObject truncationStrategy = default;
BinaryData toolChoice = default;
BinaryData responseFormat = default;
+ bool? parallelToolCalls = default;
IReadOnlyDictionary metadata = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
@@ -425,6 +431,15 @@ internal static CreateRunRequest DeserializeCreateRunRequest(JsonElement element
responseFormat = BinaryData.FromString(property.Value.GetRawText());
continue;
}
+ if (property.NameEquals("parallel_tool_calls"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ parallelToolCalls = property.Value.GetBoolean();
+ continue;
+ }
if (property.NameEquals("metadata"u8))
{
if (property.Value.ValueKind == JsonValueKind.Null)
@@ -460,6 +475,7 @@ internal static CreateRunRequest DeserializeCreateRunRequest(JsonElement element
truncationStrategy,
toolChoice,
responseFormat,
+ parallelToolCalls,
metadata ?? new ChangeTrackingDictionary(),
serializedAdditionalRawData);
}
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.cs
index f3f8b30781b3..25145f80a5bb 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.cs
+++ b/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.cs
@@ -100,9 +100,10 @@ internal CreateRunRequest(string assistantId)
/// The strategy to use for dropping messages as the context windows moves forward.
/// Controls whether or not and which tool is called by the model.
/// Specifies the format that the model must output.
+ /// If `true` functions will run in parallel during tool use.
/// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.
/// Keeps track of any properties unknown to the library.
- internal CreateRunRequest(string assistantId, string overrideModelName, string overrideInstructions, string additionalInstructions, IReadOnlyList additionalMessages, IReadOnlyList overrideTools, bool? stream, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData)
+ internal CreateRunRequest(string assistantId, string overrideModelName, string overrideInstructions, string additionalInstructions, IReadOnlyList additionalMessages, IReadOnlyList overrideTools, bool? stream, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, bool? parallelToolCalls, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData)
{
AssistantId = assistantId;
OverrideModelName = overrideModelName;
@@ -118,6 +119,7 @@ internal CreateRunRequest(string assistantId, string overrideModelName, string o
TruncationStrategy = truncationStrategy;
ToolChoice = toolChoice;
ResponseFormat = responseFormat;
+ ParallelToolCalls = parallelToolCalls;
Metadata = metadata;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
@@ -268,6 +270,8 @@ internal CreateRunRequest()
///
///
public BinaryData ResponseFormat { get; }
+ /// If `true` functions will run in parallel during tool use.
+ public bool? ParallelToolCalls { get; }
/// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.
public IReadOnlyDictionary Metadata { get; }
}
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.Serialization.cs
index 10ad472113df..0af226f2493c 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.Serialization.cs
+++ b/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.Serialization.cs
@@ -197,6 +197,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
writer.WriteNull("response_format");
}
}
+ if (Optional.IsDefined(ParallelToolCalls))
+ {
+ writer.WritePropertyName("parallel_tool_calls"u8);
+ writer.WriteBooleanValue(ParallelToolCalls.Value);
+ }
if (Optional.IsCollectionDefined(Metadata))
{
if (Metadata != null)
@@ -266,6 +271,7 @@ internal static CreateThreadAndRunRequest DeserializeCreateThreadAndRunRequest(J
TruncationObject truncationStrategy = default;
BinaryData toolChoice = default;
BinaryData responseFormat = default;
+ bool? parallelToolCalls = default;
IReadOnlyDictionary metadata = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
@@ -408,6 +414,15 @@ internal static CreateThreadAndRunRequest DeserializeCreateThreadAndRunRequest(J
responseFormat = BinaryData.FromString(property.Value.GetRawText());
continue;
}
+ if (property.NameEquals("parallel_tool_calls"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ parallelToolCalls = property.Value.GetBoolean();
+ continue;
+ }
if (property.NameEquals("metadata"u8))
{
if (property.Value.ValueKind == JsonValueKind.Null)
@@ -443,6 +458,7 @@ internal static CreateThreadAndRunRequest DeserializeCreateThreadAndRunRequest(J
truncationStrategy,
toolChoice,
responseFormat,
+ parallelToolCalls,
metadata ?? new ChangeTrackingDictionary(),
serializedAdditionalRawData);
}
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.cs
index d234f56a46c8..89fa5de82d55 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.cs
+++ b/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.cs
@@ -96,9 +96,10 @@ internal CreateThreadAndRunRequest(string assistantId)
/// The strategy to use for dropping messages as the context windows moves forward.
/// Controls whether or not and which tool is called by the model.
/// Specifies the format that the model must output.
+ /// If `true` functions will run in parallel during tool use.
/// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.
/// Keeps track of any properties unknown to the library.
- internal CreateThreadAndRunRequest(string assistantId, AgentThreadCreationOptions thread, string overrideModelName, string overrideInstructions, IReadOnlyList overrideTools, UpdateToolResourcesOptions toolResources, bool? stream, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData)
+ internal CreateThreadAndRunRequest(string assistantId, AgentThreadCreationOptions thread, string overrideModelName, string overrideInstructions, IReadOnlyList overrideTools, UpdateToolResourcesOptions toolResources, bool? stream, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, bool? parallelToolCalls, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData)
{
AssistantId = assistantId;
Thread = thread;
@@ -114,6 +115,7 @@ internal CreateThreadAndRunRequest(string assistantId, AgentThreadCreationOption
TruncationStrategy = truncationStrategy;
ToolChoice = toolChoice;
ResponseFormat = responseFormat;
+ ParallelToolCalls = parallelToolCalls;
Metadata = metadata;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
@@ -261,6 +263,8 @@ internal CreateThreadAndRunRequest()
///
///
public BinaryData ResponseFormat { get; }
+ /// If `true` functions will run in parallel during tool use.
+ public bool? ParallelToolCalls { get; }
/// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.
public IReadOnlyDictionary Metadata { get; }
}
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.Serialization.cs
index 124ba52d97e1..9a3751e9f5ea 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.Serialization.cs
+++ b/sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.Serialization.cs
@@ -39,15 +39,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
writer.WritePropertyName("file_id"u8);
writer.WriteStringValue(FileId);
}
- if (Optional.IsCollectionDefined(DataSources))
+ if (Optional.IsDefined(DataSource))
{
- writer.WritePropertyName("data_sources"u8);
- writer.WriteStartArray();
- foreach (var item in DataSources)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
+ writer.WritePropertyName("data_source"u8);
+ writer.WriteObjectValue(DataSource, options);
}
writer.WritePropertyName("tools"u8);
writer.WriteStartArray();
@@ -106,7 +101,7 @@ internal static MessageAttachment DeserializeMessageAttachment(JsonElement eleme
return null;
}
string fileId = default;
- IList dataSources = default;
+ VectorStoreDataSource dataSource = default;
IList tools = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
@@ -117,18 +112,13 @@ internal static MessageAttachment DeserializeMessageAttachment(JsonElement eleme
fileId = property.Value.GetString();
continue;
}
- if (property.NameEquals("data_sources"u8))
+ if (property.NameEquals("data_source"u8))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
- List array = new List();
- foreach (var item in property.Value.EnumerateArray())
- {
- array.Add(VectorStoreDataSource.DeserializeVectorStoreDataSource(item, options));
- }
- dataSources = array;
+ dataSource = VectorStoreDataSource.DeserializeVectorStoreDataSource(property.Value, options);
continue;
}
if (property.NameEquals("tools"u8))
@@ -154,7 +144,7 @@ internal static MessageAttachment DeserializeMessageAttachment(JsonElement eleme
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new MessageAttachment(fileId, dataSources ?? new ChangeTrackingList(), tools, serializedAdditionalRawData);
+ return new MessageAttachment(fileId, dataSource, tools, serializedAdditionalRawData);
}
BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.cs
index 0aab327fa3db..be25230a7c4c 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.cs
+++ b/sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.cs
@@ -53,19 +53,18 @@ public MessageAttachment(IEnumerable tools)
{
Argument.AssertNotNull(tools, nameof(tools));
- DataSources = new ChangeTrackingList();
Tools = tools.ToList();
}
/// Initializes a new instance of .
/// The ID of the file to attach to the message.
- /// Azure asset ID.
+ /// Azure asset ID.
/// The tools to add to this file.
/// Keeps track of any properties unknown to the library.
- internal MessageAttachment(string fileId, IList dataSources, IList tools, IDictionary serializedAdditionalRawData)
+ internal MessageAttachment(string fileId, VectorStoreDataSource dataSource, IList tools, IDictionary serializedAdditionalRawData)
{
FileId = fileId;
- DataSources = dataSources;
+ DataSource = dataSource;
Tools = tools;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
@@ -78,7 +77,7 @@ internal MessageAttachment()
/// The ID of the file to attach to the message.
public string FileId { get; set; }
/// Azure asset ID.
- public IList DataSources { get; }
+ public VectorStoreDataSource DataSource { get; set; }
///
/// The tools to add to this file.
///
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStreamEvent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStreamEvent.cs
index 630d33f59e66..b3fd0dcab2ef 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStreamEvent.cs
+++ b/sdk/ai/Azure.AI.Projects/src/Generated/RunStreamEvent.cs
@@ -43,7 +43,7 @@ public RunStreamEvent(string value)
public static RunStreamEvent ThreadRunRequiresAction { get; } = new RunStreamEvent(ThreadRunRequiresActionValue);
/// Event sent when a run is completed. The data of this event is of type ThreadRun.
public static RunStreamEvent ThreadRunCompleted { get; } = new RunStreamEvent(ThreadRunCompletedValue);
- /// Event sent when a run ends incompleted. The data of this event is of type ThreadRun.
+ /// Event sent when a run ends incomplete. The data of this event is of type ThreadRun.
public static RunStreamEvent ThreadRunIncomplete { get; } = new RunStreamEvent(ThreadRunIncompleteValue);
/// Event sent when a run fails. The data of this event is of type ThreadRun.
public static RunStreamEvent ThreadRunFailed { get; } = new RunStreamEvent(ThreadRunFailedValue);
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.Serialization.cs
index 3319be0f6b35..46c6f4a2e3f7 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.Serialization.cs
+++ b/sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.Serialization.cs
@@ -251,11 +251,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
writer.WriteNull("tool_resources");
}
}
- if (Optional.IsDefined(ParallelToolCalls))
- {
- writer.WritePropertyName("parallelToolCalls"u8);
- writer.WriteBooleanValue(ParallelToolCalls.Value);
- }
+ writer.WritePropertyName("parallel_tool_calls"u8);
+ writer.WriteBooleanValue(ParallelToolCalls);
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
foreach (var item in _serializedAdditionalRawData)
@@ -320,7 +317,7 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW
BinaryData responseFormat = default;
IReadOnlyDictionary metadata = default;
UpdateToolResourcesOptions toolResources = default;
- bool? parallelToolCalls = default;
+ bool parallelToolCalls = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
@@ -535,12 +532,8 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW
toolResources = UpdateToolResourcesOptions.DeserializeUpdateToolResourcesOptions(property.Value, options);
continue;
}
- if (property.NameEquals("parallelToolCalls"u8))
+ if (property.NameEquals("parallel_tool_calls"u8))
{
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
parallelToolCalls = property.Value.GetBoolean();
continue;
}
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.cs
index f60b310b3bcb..f267f7c109f2 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.cs
+++ b/sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.cs
@@ -73,8 +73,9 @@ public partial class ThreadRun
/// Controls whether or not and which tool is called by the model.
/// The response format of the tool calls used in this run.
/// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.
+ /// Determines if tools can be executed in parallel within the run.
/// , , , , or is null.
- internal ThreadRun(string id, string threadId, string assistantId, RunStatus status, RunError lastError, string model, string instructions, IEnumerable tools, DateTimeOffset createdAt, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, IncompleteRunDetails incompleteDetails, RunCompletionUsage usage, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, IReadOnlyDictionary metadata)
+ internal ThreadRun(string id, string threadId, string assistantId, RunStatus status, RunError lastError, string model, string instructions, IEnumerable tools, DateTimeOffset createdAt, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, IncompleteRunDetails incompleteDetails, RunCompletionUsage usage, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, IReadOnlyDictionary metadata, bool parallelToolCalls)
{
Argument.AssertNotNull(id, nameof(id));
Argument.AssertNotNull(threadId, nameof(threadId));
@@ -105,6 +106,7 @@ internal ThreadRun(string id, string threadId, string assistantId, RunStatus sta
ToolChoice = toolChoice;
ResponseFormat = responseFormat;
Metadata = metadata;
+ ParallelToolCalls = parallelToolCalls;
}
/// Initializes a new instance of .
@@ -145,7 +147,7 @@ internal ThreadRun(string id, string threadId, string assistantId, RunStatus sta
/// Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis.
/// Determines if tools can be executed in parallel within the run.
/// Keeps track of any properties unknown to the library.
- internal ThreadRun(string id, string @object, string threadId, string assistantId, RunStatus status, RequiredAction requiredAction, RunError lastError, string model, string instructions, IReadOnlyList tools, DateTimeOffset createdAt, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, IncompleteRunDetails incompleteDetails, RunCompletionUsage usage, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, IReadOnlyDictionary metadata, UpdateToolResourcesOptions toolResources, bool? parallelToolCalls, IDictionary serializedAdditionalRawData)
+ internal ThreadRun(string id, string @object, string threadId, string assistantId, RunStatus status, RequiredAction requiredAction, RunError lastError, string model, string instructions, IReadOnlyList tools, DateTimeOffset createdAt, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, IncompleteRunDetails incompleteDetails, RunCompletionUsage usage, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, IReadOnlyDictionary metadata, UpdateToolResourcesOptions toolResources, bool parallelToolCalls, IDictionary serializedAdditionalRawData)
{
Id = id;
Object = @object;
@@ -331,6 +333,6 @@ internal ThreadRun()
/// Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis.
public UpdateToolResourcesOptions ToolResources { get; }
/// Determines if tools can be executed in parallel within the run.
- public bool? ParallelToolCalls { get; }
+ public bool ParallelToolCalls { get; }
}
}
diff --git a/sdk/ai/Azure.AI.Projects/tsp-location.yaml b/sdk/ai/Azure.AI.Projects/tsp-location.yaml
index b003672683bc..4bb558ad0447 100644
--- a/sdk/ai/Azure.AI.Projects/tsp-location.yaml
+++ b/sdk/ai/Azure.AI.Projects/tsp-location.yaml
@@ -1,4 +1,4 @@
directory: specification/ai/Azure.AI.Projects
-commit: f82185fa22ee5b879726d7b3a35e98691016db5d
+commit: 3586c8bc2712121b9bed08917ef254006ef117cf
repo: Azure/azure-rest-api-specs
additionalDirectories: