# AI generation not working in the code node - unknown error

**URL:** <https://community.n8n.io/t/ai-generation-not-working-in-the-code-node-unknown-error/51613>\
**Category:** Questions\
**Tags:** code\
**Created:** [August 11, 2024, 5:04pm UTC](https://community.n8n.io/t/ai-generation-not-working-in-the-code-node-unknown-error/51613 "2024-08-11T17:04:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lexgabrees](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/lexgabrees/32/53624_2.png) [@lexgabrees](https://community.n8n.io/u/lexgabrees)\
**Post date:** [August 11, 2024, 5:04pm UTC](https://community.n8n.io/t/ai-generation-not-working-in-the-code-node-unknown-error/51613/1 "2024-08-11T17:04:19Z")

</div>

Hey … I just set all the environment variables that are needed for AI generation in the code node, and the button shows up. However, it doesn’t generate. Instead, it tells me ‘unknown error’ …

Anyone have an idea ?

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/26906_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [August 11, 2024, 5:04pm UTC](https://community.n8n.io/t/ai-generation-not-working-in-the-code-node-unknown-error/51613/2 "2024-08-11T17:04:20Z")

</div>

It looks like your topic is missing some important information. Could you provide the following if applicable.

- **n8n version:**
- **Database (default: SQLite):**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):**
- **Operating system:**

---

<div class="post-metadata">

**Author:** ![ria](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ria/32/99251_2.png) [@ria](https://community.n8n.io/u/ria)\
**Post date:** [August 15, 2024, 9:29am UTC](https://community.n8n.io/t/ai-generation-not-working-in-the-code-node-unknown-error/51613/3 "2024-08-15T09:29:15Z")

</div>

Hi @lexgabrees

Very sorry to say, but we had to disable that feature for now. You can read more about it here:

> [@construction Ask AI updates: HTTP Node helper (beta), and self-hosted!](http://community.n8n.io/t/ask-ai-updates-http-node-helper-beta-and-self-hosted/45455/46):
>
> Hi, So we have some bad news on this one, The Ask AI in the code node was incorrectly announced and it is not available in the self hosted version of n8n at the moment, this may change in the future. We also made the choice recently to remove the Ask AI beta option for the HTTP Request node, The best approach for this now would be to use a mix of the AI nodes and the HTTP Tool which will give you more control. Sorry for the bad news, I will get the docs updated and the main post now.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/36532_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [August 22, 2024, 9:29am UTC](https://community.n8n.io/t/ai-generation-not-working-in-the-code-node-unknown-error/51613/4 "2024-08-22T09:29:25Z")

</div>

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