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
使用.net core客户端访问报错
'<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
https://github.com/openai/openai-dotnet
`ApiKeyCredential apiKeyCredential = new ApiKeyCredential(llmModel.Token);
OpenAIClientOptions openAIClientOptions = new OpenAIClientOptions();
openAIClientOptions.Endpoint = new Uri(llmModel.BaseUrl);
ChatClient client = new(model: llmModel.Model, apiKeyCredential, openAIClientOptions);
List<ChatMessage> chatMessages = new List<ChatMessage>();
if (!string.IsNullOrWhiteSpace(model.System))
{
chatMessages.Add(ChatMessage.CreateSystemMessage(model.System));
}
if (!string.IsNullOrWhiteSpace(model.User))
{
chatMessages.Add(ChatMessage.CreateUserMessage(model.User));
}
ChatCompletion completion = await client.CompleteChatAsync(chatMessages);
var llmResult = completion.Content[0].Text;`
复现步骤
预期结果
相关截图
如果没有的话,请删除此节。
The text was updated successfully, but these errors were encountered:
例行检查
问题描述
使用.net core客户端访问报错
'<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
https://github.com/openai/openai-dotnet
`ApiKeyCredential apiKeyCredential = new ApiKeyCredential(llmModel.Token);
OpenAIClientOptions openAIClientOptions = new OpenAIClientOptions();
openAIClientOptions.Endpoint = new Uri(llmModel.BaseUrl);
复现步骤
预期结果
相关截图
如果没有的话,请删除此节。
The text was updated successfully, but these errors were encountered: