Skip to content

Commit 26cf999

Browse files
TuanTuan
Tuan
authored and
Tuan
committed
Add AI Gateway
1 parent dc45f88 commit 26cf999

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

index.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ const sendTelegramMessage = async (bot: Telegraf, chatId: string, message: strin
6868
bot.telegram.sendMessage(chatId, normalize(message), { parse_mode: "MarkdownV2", ...options });
6969

7070
/**
71-
* Waits for an OpenAI thread to complete.
71+
* Waits for an AI provider thread to complete.
7272
*
73-
* @param {OpenAI} openai - The OpenAI client instance
73+
* @param {OpenAI} openai - The AI provider client instance
7474
* @param {string} threadId - The ID of the thread to wait for
7575
* @param {string} runId - The ID of the run to wait for
7676
* @returns {Promise<import("openai").ThreadRun>} The completed thread run
@@ -275,9 +275,9 @@ export default {
275275
},
276276

277277
/**
278-
* Process an email using OpenAI's chat completion API.
278+
* Process an email using AI provider's chat completion API.
279279
*
280-
* Given an email data, it will call OpenAI's chat completion API with the email data and the configured system/user prompts.
280+
* Given an email data, it will call AI provider's chat completion API with the email data and the configured system/user prompts.
281281
* The response will be parsed as JSON and returned.
282282
* If the response is not a transaction email, `false` will be returned.
283283
* If the response is a transaction email, the transaction details will be returned as an object.
@@ -313,7 +313,7 @@ export default {
313313
},
314314

315315
/**
316-
* Store a transaction in OpenAI's vector store.
316+
* Store a transaction in AI provider's vector store.
317317
* @param {false | { result: string, datetime: string, message: string, amount: number, currency: string, bank_name: string, bank_icon: string }} details - The transaction details
318318
* @param {Environment} env - The environment variables
319319
* @returns {Promise<void>}

0 commit comments

Comments
 (0)