exception "create conversation error"
Closed this issue · 1 comments
kilinnik commented
I followed your example and got a "create conversation error" exception public static async Task RequestChatGPT(string prompt)
{
var services = new ServiceCollection();
const string token = Token;
services.AddBingClient(new() { Token = token });
var app = services.BuildServiceProvider();
var service = app.GetRequiredService();
var chatCts = new CancellationTokenSource();
//Set timeout by CancellationTokenSource
chatCts.CancelAfter(TimeSpan.FromMinutes(5));
var res = await service.ChatAsync(new(prompt), chatCts.Token);
return res.Text;
}