Files
YandexGPT/YandexGPT.CLI/Services/YandexGptService.cs
Mikhail Shahovalov 0aa0e59710 Оно живое
2025-05-09 15:16:06 +03:00

21 lines
514 B
C#

using System.ClientModel;
using OpenAI;
namespace YandexGPT.CLI.Services;
public class YandexGptService
{
public OpenAIClient CreateClient()
{
var options = new OpenAI.OpenAIClientOptions()
{
Endpoint = new Uri("https://llm.api.cloud.yandex.net/v1")
};
var credential = new ApiKeyCredential("AQVN1a58GEuuJPE4-cQptps_j35i0DRAvx8d8VJN");
var client = new OpenAI.OpenAIClient(credential, options);
return client;
}
}