Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ public static OpenAIClient GetClient(string provider, string model, IServiceProv
{
var settingsService = services.GetRequiredService<ILlmProviderService>();
var settings = settingsService.GetSetting(provider, model);
var client = new OpenAIClient(new ApiKeyCredential(settings.ApiKey));
return client;
var options = string.IsNullOrEmpty(settings.Endpoint)
? null
: new OpenAIClientOptions { Endpoint = new Uri(settings.Endpoint) };
return new OpenAIClient(new ApiKeyCredential(settings.ApiKey), options);
}

public static List<RoleDialogModel> GetChatSamples(List<string> lines)
Expand Down