# Bug Node OpenAI Assistant : tool "query" formatting

**URL:** <https://community.n8n.io/t/bug-node-openai-assistant-tool-query-formatting/35814>\
**Category:** Questions\
**Tags:** node, langchain\
**Created:** [January 24, 2024, 5:28pm UTC](https://community.n8n.io/t/bug-node-openai-assistant-tool-query-formatting/35814 "2024-01-24T17:28:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lester\_Reynolds](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/lester_reynolds/32/33132_2.png) [@Lester\_Reynolds](https://community.n8n.io/u/Lester_Reynolds)\
**Post date:** [January 24, 2024, 5:28pm UTC](https://community.n8n.io/t/bug-node-openai-assistant-tool-query-formatting/35814/1 "2024-01-24T17:28:46Z")

</div>

The **OpenAI Assistant node** does not allow for French or other special characters when using **tools** :

```auto
[
{
"query": "Votre derni�re r�daction n'�tait pas conforme aux instructions, car elle incluait <span class="bold">la cr�ation de contenu non demand�</span>. Il �tait demand� uniquement l'<span class="bold">optimisation de sections sp�cifiques</span> du texte existant."
}
]

```

Could it be possible to change the encoding to utf8 or handle the cases ?

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/196425_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [January 24, 2024, 5:28pm UTC](https://community.n8n.io/t/bug-node-openai-assistant-tool-query-formatting/35814/2 "2024-01-24T17:28:47Z")

</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:** ![Lester\_Reynolds](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/lester_reynolds/32/33132_2.png) [@Lester\_Reynolds](https://community.n8n.io/u/Lester_Reynolds)\
**Post date:** [January 24, 2024, 5:45pm UTC](https://community.n8n.io/t/bug-node-openai-assistant-tool-query-formatting/35814/3 "2024-01-24T17:45:19Z")

</div>

v 1.26.0, cloud

---

<div class="post-metadata">

**Author:** ![EmeraldHerald](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/emeraldherald/32/35355_2.png) [@EmeraldHerald](https://community.n8n.io/u/EmeraldHerald)\
**Post date:** [January 25, 2024, 12:16pm UTC](https://community.n8n.io/t/bug-node-openai-assistant-tool-query-formatting/35814/4 "2024-01-25T12:16:07Z")

</div>

Hi @Lester_Reynolds 👋 Thanks for posting what version of n8n you’re on!

It might be best for @oleg to confirm when he’s back, but I don’t believe that there’s the ability to set UTF8 encoding 🤔

I just tried this with the chat assistant and a calculation, which was able to parse non-latin characters just fine. Could you provide perhaps some example JSON of what you’re sending to the AI assistant? Is it only this specific tool that’s encountering the error, or is it others?

---

<div class="post-metadata">

**Author:** ![Lester\_Reynolds](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/lester_reynolds/32/33132_2.png) [@Lester\_Reynolds](https://community.n8n.io/u/Lester_Reynolds)\
**Post date:** [January 25, 2024, 6:18pm UTC](https://community.n8n.io/t/bug-node-openai-assistant-tool-query-formatting/35814/5 "2024-01-25T18:18:56Z")

</div>

> [@EmeraldHerald](#):
>
> example JSON of what you’re sending to the AI assistant? Is it only this specific tool that’s encount

The assistant can parse specials chars no problem, except when creating the **query** to use a tool.

No tool worked for me. I can see that the query that is sent does not contain proper encoding

---

<div class="post-metadata">

**Author:** ![Lester\_Reynolds](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/lester_reynolds/32/33132_2.png) [@Lester\_Reynolds](https://community.n8n.io/u/Lester_Reynolds)\
**Post date:** [January 26, 2024, 10:36am UTC](https://community.n8n.io/t/bug-node-openai-assistant-tool-query-formatting/35814/6 "2024-01-26T10:36:21Z")

</div>

Okay it turns out that the problem came from GPT4, and was fixed in today’s release !

---

<div class="post-metadata">

**Author:** ![EmeraldHerald](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/emeraldherald/32/35355_2.png) [@EmeraldHerald](https://community.n8n.io/u/EmeraldHerald)\
**Post date:** [January 30, 2024, 9:51am UTC](https://community.n8n.io/t/bug-node-openai-assistant-tool-query-formatting/35814/7 "2024-01-30T09:51:36Z")

</div>

Hi @Lester_Reynolds - glad that this was fixed up with the new release! 🙌

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [February 6, 2024, 9:52am UTC](https://community.n8n.io/t/bug-node-openai-assistant-tool-query-formatting/35814/8 "2024-02-06T09:52:30Z")

</div>

Closed on February 6, 2024, 9:52am UTC

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