Ecologits.ai方法を使用してAIモデルの炭素足跡を測定する
中級
これはAI Summarization, Multimodal AI分野の自動化ワークフローで、7個のノードを含みます。主にSet, ManualTrigger, ChainLlm, LmChatOpenAiなどのノードを使用。 Ecologits.ai方法でAIモデルの炭素足跡を測定
前提条件
- •OpenAI API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"nodes": [
{
"id": "e374f8b8-ff4a-4b98-af50-d609338ec38f",
"name": "ワークフロー実行時",
"type": "n8n-nodes-base.manualTrigger",
"position": [
0,
-160
],
"parameters": {},
"typeVersion": 1
},
{
"id": "6cce6b66-bd1a-419b-86c1-b76aa257e96c",
"name": "基本LLMチェーン",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
608,
-160
],
"parameters": {
"text": "Enter here your user prompt",
"batching": {},
"messages": {
"messageValues": [
{
"message": "Enter here the system prompt"
}
]
},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "d0ea8139-307d-4de6-9f29-11216958f362",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
672,
64
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "dMiSy27YCK6c6rra",
"name": "Duv's OpenAI"
}
},
"typeVersion": 1.2
},
{
"id": "0fca2f27-8a0b-46d0-9dfc-27967afe2ae5",
"name": "gCO₂eを計算",
"type": "n8n-nodes-base.set",
"position": [
960,
-160
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "cc17f2be-ce12-488f-89c7-de200b4c4869",
"name": "AI output",
"type": "string",
"value": "={{ $json.text }}"
},
{
"id": "c396e3b8-f07f-4153-9892-1b499a724dbc",
"name": "AI output gCO₂e",
"type": "number",
"value": "={{ Math.ceil($json.text.length / 4) * $('Conversion factor').item.json['Conversion factor (in gCO₂e/token)'] }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "5c25ded0-c24d-455b-82fb-d54d267ca591",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
-624,
-384
],
"parameters": {
"width": 560,
"height": 672,
"content": "# Measure Your AI's Carbon Footprint\n\nThis workflow demonstrates a technique to calculate the gCO₂e (grams of CO₂ equivalent) of an AI model's output, based on the methodology from **Ecologits.ai**.\n\n## How it works\n\nA dedicated **Conversion factor** node makes it easy to set your parameters. The **Calculate gCO₂e** node then uses this factor and the AI's text output to estimate the carbon footprint.\n\n## How to use this snippet\n\n1. **Set your conversion factor (Important!):** The default factor is for **GPT-4o in the US**. You **must** visit **ecologits.ai/latest** to find the correct factor for *your model and server region* and update the value in the **\"Conversion factor\"** node.\n2. **Connect the snippet:** Place the **\"Conversion factor\"** node before your AI node and the **\"Calculate gCO₂e\"** node after it.\n3. **Update the calculation:** Modify the **\"Calculate gCO₂e\"** node to use the output text from *your* AI node.\n\n**Pro-Tip:** For higher accuracy, use the direct `output_tokens` value from your AI node's data if it's available."
},
"typeVersion": 1
},
{
"id": "941043b0-01ee-4553-87ec-1246a4cb2f2b",
"name": "変換係数",
"type": "n8n-nodes-base.set",
"position": [
304,
-160
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "a2c5484b-173e-4647-8dc1-23c32a899f75",
"name": "Conversion factor (in gCO₂e/token)",
"type": "number",
"value": 0.0612
}
]
}
},
"typeVersion": 3.4
},
{
"id": "430fc390-50b7-4feb-8c8f-be196a342d60",
"name": "付箋1",
"type": "n8n-nodes-base.stickyNote",
"position": [
224,
-240
],
"parameters": {
"color": 5,
"width": 272,
"height": 336,
"content": "### Adapt this value to your model & settings\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nUse the expert mode here to find the factor that fits best:\nhttps://huggingface.co/spaces/genai-impact/ecologits-calculator"
},
"typeVersion": 1
}
],
"connections": {
"6cce6b66-bd1a-419b-86c1-b76aa257e96c": {
"main": [
[
{
"node": "0fca2f27-8a0b-46d0-9dfc-27967afe2ae5",
"type": "main",
"index": 0
}
]
]
},
"941043b0-01ee-4553-87ec-1246a4cb2f2b": {
"main": [
[
{
"node": "6cce6b66-bd1a-419b-86c1-b76aa257e96c",
"type": "main",
"index": 0
}
]
]
},
"d0ea8139-307d-4de6-9f29-11216958f362": {
"ai_languageModel": [
[
{
"node": "6cce6b66-bd1a-419b-86c1-b76aa257e96c",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"e374f8b8-ff4a-4b98-af50-d609338ec38f": {
"main": [
[
{
"node": "941043b0-01ee-4553-87ec-1246a4cb2f2b",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
中級 - AI要約, マルチモーダルAI
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
GPT-4 と Airtable を使用してワークフローを自動のに記録・バックアップ
GPT-4 と Airtable を使用してワーキ弗洛ーを自動のに記録しバックアップする
If
N8n
Set
+
If
N8n
Set
38 ノードGuillaume Duvernay
AI要約
動のAIネットワークリサーチャー:プレーンTextからカスタムCSV
GPT-4とLinkupを活用したカスタムCSVへのテキスト変換を実現する動のAIウェブリサーチャー
Set
Code
Split Out
+
Set
Code
Split Out
16 ノードGuillaume Duvernay
その他
LookioとOpenAI GPTを使用して知識源から事実に基づく記事を作成
Lookio と OpenAI GPT を使って、知识源から基礎のな記事を作成する
Set
Split Out
Aggregate
+
Set
Split Out
Aggregate
19 ノードGuillaume Duvernay
コンテンツ作成
Super RAGとGPT-5を使用して知識源から事実に基づく記事を作成
Super RAG と GPT-5 を使って、知识源から基礎のな記事を作成する
Set
Split Out
Aggregate
+
Set
Split Out
Aggregate
19 ノードGuillaume Duvernay
AI RAG検索拡張
AIによる計画、Linkup検索、GPT-5を使って研究支援記事を作成
AIによる計画、Linkup検索、GPT-5を使って研究支援記事を作成
Set
Split Out
Aggregate
+
Set
Split Out
Aggregate
19 ノードGuillaume Duvernay
コンテンツ作成
毎日 Jira チケット要約ジェネレーター(GPT-5 + Jira API)
GPT-5とJira APIを使用した毎日のJiraチケット要約ジェネレーター
Set
Code
Jira
+
Set
Code
Jira
24 ノードBilly Christi
AI要約