Create OpenAI-compatible API using GitHub models for free AI access
Ready for 3.0What this workflow does
This AI workflow has 12 nodes and runs when a chat message arrives (plus 2 other triggers). Along the way it connects OpenAI Chat Model. It also calls models.github.ai over HTTP.
How it runs
Trigger: When a chat message arrives (plus 2 other triggers).
- Powered By Github Models (Basic LLM Chain): sends a prompt to an LLM, with model: n8n Webhooks
- Github Models (HTTP Request): calls models.github.ai
- Github Chat Completions (HTTP Request): calls models.github.ai (POST)
- Aggregate: combines items into one
- Is Agent? (If): checks a condition and branches into true / false
- Models Response (Respond to Webhook): sends the response back to the webhook caller
- Agent Response (Respond to Webhook): sends the response back to the webhook caller
- Chat Response (Respond to Webhook): sends the response back to the webhook caller
Services it uses
HTTP calls to: models.github.ai
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (8)
- Aggregate
n8n-nodes-base.aggregate - HTTP Request
n8n-nodes-base.httpRequest - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Respond to Webhook
n8n-nodes-base.respondToWebhook - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Webhook
n8n-nodes-base.webhook - If
n8n-nodes-base.if
From the author
This n8n template shows you how to connect Github's Free Models to your existing n8n AI workflows. Whilst it is possible to use HTTP nodes to access Github Models, The aim of this template is to use it with existing n8n LLM nodes - saves the trouble of…