Akcje OpenAI
Przykład: Chatbot AI
AI Chat Bot
Bot responds using OpenAI GPT

Telegram Bot
Bot Update
message
userID

OpenAI
Send Prompt
model
gpt-4
instructions
You are a helpful assistant
input
message
responseText

Telegram Bot
Send Message
chatId
userID
text
responseText
Send Prompt to OpenAI
Wyślij tekstowy prompt do modelu OpenAI i otrzymaj odpowiedź.
Wejścia
| Wejście | Typ | Opis |
|---|---|---|
| model | string | Nazwa modelu (domyślnie: gpt-3.5-turbo). Opcje: gpt-4, gpt-4o, gpt-3.5-turbo |
| instructions | string | Prompt systemowy określający zachowanie AI |
| input | string | Wiadomość lub prompt użytkownika |
Wyjścia
| Wyjście | Typ | Opis |
|---|---|---|
| responseText | string | Odpowiedź wygenerowana przez AI |
| usage | json | Zużycie tokenów: {"prompt_tokens": N, "completion_tokens": N, "total_tokens": N} |
Przykładowe zastosowania
- Bot echo z AI: Przeciągnij wiadomość Telegram → input, odeślij responseText z powrotem
- Podsumowywacz: Ustaw instructions na "Summarize the following text", przeciągnij treść → input
- Tłumacz: "Translate to English" jako instructions
- Ekstraktor danych: "Extract name, email, phone from this text. Return as JSON"