Оно живое
This commit is contained in:
21
YandexGPT.CLI/Services/YandexGptService.cs
Normal file
21
YandexGPT.CLI/Services/YandexGptService.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user