You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to run an assistant turn, and add additional user messages in a single call, the SDK is not allowing it.
The reason is that additionalMessages property is of type IEnumerable<ThreadMessage> additionalMessages = null for both CreateRunStreamingAsync and CreateRunAsync
As an SDK user, I'm not able to construct that object (which requires Id, ThreadId, assistantId, etc) in order to store additional messages before running the thread run,
CreateMessageAsync is using less properties and can be called without these properties (Id, createddate, etc):
Alternative, call the CreateMessageAsync before calling the CreateRunAsync():
But this will result in unnecessary calls the Agent API.
Please, change the additionalMessages to a property similar with CreateMessageRequest (that is currently internal) in order to be able to send additional messages when running the agent response.
Expected behavior
It is expected to be able to add additional messages when creating the thread run.
The text was updated successfully, but these errors were encountered:
github-actionsbot
added
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-triage
Workflow: This is a new issue that needs to be triaged to the appropriate team.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
labels
Nov 19, 2024
jsquire
added
Client
This issue points to a problem in the data-plane of the library.
AI Projects
and removed
needs-triage
Workflow: This is a new issue that needs to be triaged to the appropriate team.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
labels
Nov 19, 2024
Hi @sandrohanea, Thank you for reporting this issue and sharing detailed reproduction steps.
The issue appears to be related to how the additionalMessages property is defined in the underlying TypeSpec. We haven’t manually created a type for this property, and it follows the schema defined in the TypeSpec file. You can review the spec for additionalMessages here: TypeSpec Reference.
Here’s an alternate approach you can use to make it work:
In the C# SDK, we provide both convenience methods and protocol methods. The issue lies in the convenience method, where we use input and output models. However, you can still use the protocol method without any issues. Protocol methods allow you pass the raw request and retrieve the raw response directly.
Library name and version
Azure.AI.Projects 1.0.0-alpha.20241114.1
Describe the bug
When trying to run an assistant turn, and add additional user messages in a single call, the SDK is not allowing it.
The reason is that
additionalMessages
property is of typeIEnumerable<ThreadMessage> additionalMessages = null
for bothCreateRunStreamingAsync
andCreateRunAsync
As an SDK user, I'm not able to construct that object (which requires Id, ThreadId, assistantId, etc) in order to store additional messages before running the thread run,
CreateMessageAsync is using less properties and can be called without these properties (Id, createddate, etc):

Alternative, call the CreateMessageAsync before calling the CreateRunAsync():

But this will result in unnecessary calls the Agent API.
Please, change the additionalMessages to a property similar with
CreateMessageRequest
(that is currently internal) in order to be able to send additional messages when running the agent response.Expected behavior
It is expected to be able to add additional messages when creating the thread run.
Actual behavior
It is not possible to add the additional messages
Reproduction Steps
See above
Environment
Host:
Version: 9.0.0
Architecture: x64
Commit: 9d5a6a9aa4
The text was updated successfully, but these errors were encountered: