Kütüphane / Yapay Zekâ Ajanları ve Asistanlar
Yapay Zekâ Ajanları ve Asistanlar
Answer website chat questions about attached documents with OpenAI
When a chat message arrives, it runs an AI agent with OpenAI / ChatGPT.
Ne yapar
## Answer questions about a document your visitor attaches A chat on your website where the visitor attaches a PDF, a .txt or a .md file and asks about it. The agent answers from the document only, quotes it, and remembers it for the rest of the conversation. A file sent without a question gets a short summary. ### Requirements - An n8n instance the visitor's browser can reach on a public URL. Tested on n8n 2.45.7. - An OpenAI API key, or credentials for any other chat model n8n supports. ### Set up 1. Open Chat model and add your OpenAI credential, or swap in any chat model. 2. Open When chat message received, put your site in Allowed Origins, then publish the workflow and copy the production URL that ends in /chat. 3. Paste this in your page, with your URL: html import { createChat } from 'https://cdn.jsdelivr.net/npm/@aparte/n8n-chat@0.1.0/dist/cdn/n8n-chat.js'; createChat({ webhookUrl: 'YOUR_PRODUCTION_URL', allowFileUploads: true }); That widget is @aparte/n8n-chat (MIT): the visitor drops, pastes or picks a file, and finds the conversation again after a reload. n8n's own widget (@n8n/chat) works with this workflow too, with the same allowFileUploads: true.
Adımlar
- When chat message received
- Settings
- A file attached?
- Which kind of file?
- Read the PDF
- Read the text
- The document
- Unsupported file
- Keep it in the conversation
- Back to the message
- Answer
- Chat model
- Conversation memory
Benzer otomasyonlar
Yapay Zekâ Ajanları ve AsistanlarOpenAI ve Open-Meteo ile Hava Durumu Sorularını Yanıtlama6 adımYapay Zekâ Ajanları ve AsistanlarOpenAI Agent Aracıyla Hacker News Sorularını Yanıtla9 adımYapay Zekâ Ajanları ve AsistanlarE-posta sorularını Ollama ve Claude ile SQL'e dönüştür23 adımYapay Zekâ Ajanları ve AsistanlarSoruları OpenAI ajanı ve SearchApi ile yanıtla5 adım