diff --git a/.idea/.idea.YandexGPT/.idea/indexLayout.xml b/.idea/.idea.YandexGPT/.idea/indexLayout.xml
new file mode 100644
index 0000000..7b08163
--- /dev/null
+++ b/.idea/.idea.YandexGPT/.idea/indexLayout.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.YandexGPT/.idea/vcs.xml b/.idea/.idea.YandexGPT/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/.idea.YandexGPT/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/YandexGPT.CLI/Program.cs b/YandexGPT.CLI/Program.cs
index e5dff12..9744e5e 100644
--- a/YandexGPT.CLI/Program.cs
+++ b/YandexGPT.CLI/Program.cs
@@ -1,3 +1,23 @@
-// See https://aka.ms/new-console-template for more information
+using OpenAI.Chat;
+using OpenAI.RealtimeConversation;
+using YandexGPT.CLI.Services;
+
+Console.WriteLine("Let's start!");
+
+var service = new YandexGptService();
+var client = service.CreateClient();
+var chat = client.GetChatClient("gpt://b1gg9b7e74q248tvan7f/yandexgpt/latest");
+
+
+var query = Console.ReadLine();;
+while (query is not ("exit" and "quit"))
+{
+ var message = ChatMessage.CreateUserMessage(query);
+ var response = chat.CompleteChat(message);
+ foreach (var row in response.Value.Content)
+ {
+ Console.WriteLine(row.Text);
+ }
+ query = Console.ReadLine();
+}
-Console.WriteLine("Hello, World!");
\ No newline at end of file
diff --git a/YandexGPT.CLI/Services/YandexGptService.cs b/YandexGPT.CLI/Services/YandexGptService.cs
new file mode 100644
index 0000000..5fc456f
--- /dev/null
+++ b/YandexGPT.CLI/Services/YandexGptService.cs
@@ -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;
+ }
+}
\ No newline at end of file
diff --git a/YandexGPT.CLI/YandexGPT.CLI.csproj b/YandexGPT.CLI/YandexGPT.CLI.csproj
index 2f4fc77..4d80193 100644
--- a/YandexGPT.CLI/YandexGPT.CLI.csproj
+++ b/YandexGPT.CLI/YandexGPT.CLI.csproj
@@ -7,4 +7,9 @@
enable
+
+
+
+
+