I am using the following code in a .NET Standard 2.0 project within a Xamarin.Forms Solution
string _model = "gpt-3.5-turbo";
_openAI_Client = new ChatClient(model: _model, _apiKey);
ChatCompletion chatCompletion = await _openAI_Client.CompleteChatAsync(new ChatMessage[] {
new UserChatMessage("Deep Reinforcement Learning for Finance")
});
however I am receiving the following exception on the execution of CompleteChatAsync()
System.ClientModel.ClientResultException: 'HTTP 400 (invalid_request_error: )
Parameter: messages.[0].content
Invalid value for 'content': expected a string, got null.'
I am using the following code in a .NET Standard 2.0 project within a Xamarin.Forms Solution
string _model = "gpt-3.5-turbo";
_openAI_Client = new ChatClient(model: _model, _apiKey);
ChatCompletion chatCompletion = await _openAI_Client.CompleteChatAsync(new ChatMessage[] {
new UserChatMessage("Deep Reinforcement Learning for Finance")
});
however I am receiving the following exception on the execution of CompleteChatAsync()
System.ClientModel.ClientResultException: 'HTTP 400 (invalid_request_error: )
Parameter: messages.[0].content
Invalid value for 'content': expected a string, got null.'