Cannot read properties of undefined (reading '0') Embeddings OpenAI

Cannot read properties of undefined (reading ‘0’)

How to fix this please tell me how to select a model

Hi @alexguzmenko

Unfortunately, I don’t think OpenRouter supports the Embeddings endpoints of OpenAI. You would have to use a different model-provider to get the embeddings. Obviously, you could use OpenAI embeddings, but HuggingFace also supports them. If you are running this locally, you can also use Ollama embeddings.

1 Like