C# call Azure OpenAI gpt-35-turbo and set Message dynamically

진세훈 DX팀(YA) 0 Reputation points

i use Azure.AI.OpenAI and use function( client.GetChatCompletionsAsync ) for call the OpenAI API like that1

it work well.

so, i want to change the Messages to variables List User's image

but that is not work, Because the Messages provide readonly. do you know how?

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,469 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,423 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 43,361 Reputation points Microsoft Employee

    @진세훈 DX팀(YA) I think the same question is answered by the SDK team on the dotnet SDK github repo. Please see this thread for details. It looks like by design, all list-based members of models in the Azure SDK libraries are read-only.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.
    0 comments No comments