RAG using Yandex GPT and Yandex Disk

RAG using Yandex GPT and Yandex Disk

Describe the problem/error/question

I’m trying to make a RAG based on Yandex Disk and Yandex GPT
Yandex GPT has released an update that allows you to work with models through OpenAI nodes
The chat model itself works fine.
But when connecting it to Supbase for embeddings, an error occurs:
“Embeddings OpenAI2: Error in sub-node ‘Embeddings OpenAI2‘
400 Base64 encoding format is not supported”

Or " 400: “Array input must contain exactly one string”" if there are more than 1 chunks…

Help, friends, please!

What is the error message (if any)?

Embeddings OpenAI2: Error in sub-node ‘Embeddings OpenAI2‘
400 Base64 encoding format is not supported

Please share your workflow

Share the output returned by the last node

Embeddings OpenAI2: Error in sub-node ‘Embeddings OpenAI2‘
400 Base64 encoding format is not supported

Information on your n8n setup

  • n8n version: [email protected]
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): ?
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: Win11

This error most likely means that the n8n tries to send a chunk to Yandex GPT for embedding with encoding_format set to base64 (or, most likely, without the value set, which defaults to base64), where Yandex expects this to be a float:

https://yandex.cloud/en/docs/foundation-models/concepts/openai-compatibility#embeddings

1 Like

Thanks for the reply, jabbson! I am not an expert in this matter. Maybe you can tell me how to refine this in n8n?

I don’t believe this can be done with the Embeddings OpenAI node. I think if you really need to use Yandex GPT, your best bet could be using Yandex’s rest api and semi-manually injecting them into supabase.

1 Like

Thanks for the prompt response, jabbson! As you can see in my workflow, I use the standard Supabase Vector node - only “special” types of nodes can be “attached” to it (and intermediate nodes cannot be inserted because of the dotted lines). That’s why I used a ready-made OpenAI node. How do I set up what you’re talking about?

You would setup an http request node to hit the Rest API followed by the regular Supabase node to insert the row for each embedding. Alternatively you could also create row using Supabase Rest API, in this case you would end up having two http request nodes.

1 Like

Dear jabbson, I’ll give it a try and come back with feedback. I think it’s brilliant. Let’s see if I can make it happen :slight_smile:

1 Like

Hello, did you manage to make it work?

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