-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
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 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.
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