Skip to content

Commit

Permalink
any updates
Browse files Browse the repository at this point in the history
  • Loading branch information
katsuhira02 committed Jul 5, 2024
1 parent 018c719 commit e5235d3
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions supabase/functions/ai-koshey/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1078,18 +1078,17 @@ botAiKoshey.command("face", async (ctx) => {
await ctx.reply(lang ? "Чтобы использовать данную функцию, необходимо приобрести уровень water 🌊" : "To use this function, you need to purchase the water level 🌊")
})

botAiKoshey.command("brain", async (ctx) => {
console.log("brain");
botAiKoshey.command("model", async (ctx) => {
console.log("model");
await ctx.replyWithChatAction("typing");
if (!ctx.from) throw new Error("User not found");
const lang = await isRu(ctx)
// await ctx.reply(lang ? "Чтобы использовать данную функцию, необходимо приобрести уровень water 🌊" : "To use this function, you need to purchase the water level 🌊")
await ctx.reply(lang ? "Выберите модель" : "Select a model", {
await ctx.reply(lang ? "🧠 Выберите модель ИИ" : "🧠Select Model Ai", {
reply_markup: {
inline_keyboard: [
[{ text: "GPT-4", callback_data: "model_gpt-4" }],
[{ text: "GPT-4o", callback_data: "model_gpt-4o" }],
[{ text: "GPT-4-turbo", callback_data: "model_gpt-4-turbo"}]
[{ text: "GPT-4", callback_data: "model_gpt-4" }, { text: "GPT-4o", callback_data: "model_gpt-4o" }, { text: "GPT-4-turbo", callback_data: "model_gpt-4-turbo"}],
[{ text: "GPT-3.5-turbo", callback_data: "model_gpt-3.5-turbo"}],
],
},
})
Expand All @@ -1114,7 +1113,7 @@ botAiKoshey.command("mode", async (ctx) => {
await ctx.replyWithChatAction("typing");
if (!ctx.from) throw new Error("User not found");
const lang = await isRu(ctx);
await ctx.reply(`${lang ? "Выберите режим:" : "Select mode:"}`, {
await ctx.reply(`${lang ? "📳 Выберите режим общения с ИИ" : "📳 Select AI communication mode"}`, {
reply_markup: {
inline_keyboard: [
[
Expand Down Expand Up @@ -1862,7 +1861,7 @@ botAiKoshey.on("callback_query:data", async (ctx) => {
const model = callbackData.split("_")[1];
console.log(model, "model");
await setModel(telegram_id, model);
await ctx.reply(lang ? `Вы выбрали модель ${model}` : `You selected the model ${model}`);
await ctx.reply(lang ? `🔋 Вы выбрали модель ${model}` : `🔋 You selected the model ${model}`);
return;
}

Expand Down Expand Up @@ -2095,8 +2094,12 @@ await botAiKoshey.api.setMyCommands([
description: "🤓 Add avatar's face",
},
{
command: "/brain",
description: "🧠 Add avatar's brain",
command: "/mode",
description: "📳 Select AI communication mode",
},
{
command: "/model",
description: "🧠 Add avatar's model",
},
// {
// command: "/text_to_speech",
Expand Down

0 comments on commit e5235d3

Please sign in to comment.