Оно живое

This commit is contained in:
Mikhail Shahovalov
2025-05-09 15:16:06 +03:00
parent b6e05f8705
commit 0aa0e59710
5 changed files with 62 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
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;
}
}