Assistente de Chat AI com GPT-5 Mini, Memória e Google Search (SerpAPI)

Título

Assistente de Chat AI com GPT-5 Mini, Memória e Google Search (SerpAPI)

Descrição

Este workflow n8n cria um assistente de chat AI inteligente alimentado pelo GPT-5 Mini. O assistente mantém o contexto da conversa usando memória e pode realizar buscas em tempo real no Google através da SerpAPI quando informações adicionais ou atualizadas são necessárias.

Recursos

  • Conversas em linguagem natural usando GPT-5 Mini

  • Memória de conversa para respostas contextualizadas

  • Busca na web em tempo real usando SerpAPI

  • Interação acionada por chat

  • Fácil de estender com ferramentas de IA e integrações adicionais

Casos de Uso

  • Assistente de IA para uso geral

  • Pesquisa e coleta de informações

  • Chatbot de suporte ao cliente

  • Assistente educacional e de aprendizado

  • Assistente de base de conhecimento

Requisitos

  • Chave de API do OpenAI

  • Chave de API da SerpAPI

  • n8n v1.x ou posterior

Estrutura do Workflow

Chat Trigger → AI Agent → GPT-5 Mini Model + Memory + Google Search Tool

’ ’ ’

{
“nodes”: [
{
“parameters”: {
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.chatTrigger”,
“typeVersion”: 1.4,
“position”: [
0,
0
],
“id”: “85db3e1a-d159-4c5c-9aaa-7b719ca3160b”,
“name”: “When chat message received”,
“webhookId”: “85327619-46fd-4845-863e-9aba86369ea3”
},
{
“parameters”: {
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 3.1,
“position”: [
288,
0
],
“id”: “88d0da6b-c41b-4196-9f92-d1d2649adfca”,
“name”: “AI Agent”
},
{
“parameters”: {
“model”: {
“__rl”: true,
“mode”: “list”,
“value”: “gpt-5-mini”
},
“builtInTools”: {},
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatOpenAi”,
“typeVersion”: 1.3,
“position”: [
224,
224
],
“id”: “2f14c30e-4efb-41ca-a0bb-c8518c9c79a8”,
“name”: “OpenAI Chat Model”,
“credentials”: {
“openAiApi”: {
“id”: “q73TCnroK4UOqbtB”,
“name”: “OpenAI account”
}
}
},
{
“parameters”: {},
“type”: “@n8n/n8n-nodes-langchain.memoryBufferWindow”,
“typeVersion”: 1.4,
“position”: [
352,
224
],
“id”: “ccc703ca-915a-4074-b531-c24277cf6e18”,
“name”: “Simple Memory”
},
{
“parameters”: {
“additionalFields”: {},
“requestOptions”: {}
},
“type”: “n8n-nodes-serpapi.serpApiTool”,
“typeVersion”: 1,
“position”: [
480,
224
],
“id”: “078b4f55-c588-4eb8-b084-9e455ab96d9d”,
“name”: “Google search in SerpApi”,
“credentials”: {
“serpApi”: {
“id”: “nLK9dVyzXTHCbGo9”,
“name”: “SerpApi account”
}
}
}
],
“connections”: {
“When chat message received”: {
“main”: [
[
{
“node”: “AI Agent”,
“type”: “main”,
“index”: 0
}
]
]
},
“OpenAI Chat Model”: {
“ai_languageModel”: [
[
{
“node”: “AI Agent”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“Simple Memory”: {
“ai_memory”: [
[
{
“node”: “AI Agent”,
“type”: “ai_memory”,
“index”: 0
}
]
]
},
“Google search in SerpApi”: {
“ai_tool”: [
[
{
“node”: “AI Agent”,
“type”: “ai_tool”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “8381e5aff768d7f1047b707c712872733e6c9ed9facc73a037ab89e4434f0b98”
}
}

’ ’ ’

1 curtida

Welcome @Venkatasairam005!

Good starting point for a research assistant. One quick improvement worth adding: the SerpAPI tool will search on every turn even when the model doesn’t need fresh data, which burns API calls. You can reduce this by giving the Google Search tool a more specific description that includes when to use it (for example: “use this tool only when the question requires current or real-time information”) - that nudges GPT-5 Mini to reserve the search for cases that actually need it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.