Add "url" support for OpenAI embedder #775
Replies: 1 comment 2 replies
-
Hello 👋 Thank you for the suggestion. It so happens that the upcoming v1.10 is adding the
Microsoft Azure OpenAI uses non-standard headers for authentication.
These providers are not using the OpenAI API, they're using an OpenAI**-like** API. Some examples of the differences:
The Instead, you should use the
"default": {
"source": "rest",
"url": "https://api.deepinfra.com/v1/openai/embeddings",
"apiKey": "<YOUR_DEEPINFRA_TOKEN>",
"request": {
"input": "{{text}}",
"model": "BAAI/bge-large-en-v1.5",
"encoding_format": "float"
},
"response": {
"data": [
{
"embedding": "{{embedding}}"
}
]
}
} or, to optimize throughput, as it seems supported by DeepInfra: "default": {
"source": "rest",
"url": "https://api.deepinfra.com/v1/openai/embeddings",
"apiKey": "<YOUR_DEEPINFRA_TOKEN>",
"request": {
"input": ["{{text}}", "{{..}}"],
"model": "BAAI/bge-large-en-v1.5",
"encoding_format": "float"
},
"response": {
"data": [
{
"embedding": "{{embedding}}"
},
"{{..}}"
]
}
} |
Beta Was this translation helpful? Give feedback.
-
It's a known thing that lots of AI providers use OpenAI API as their standard.
It would be nice if we could use OpenAI API but specifying a host other than
api.openai.com
This would allow to use Microsoft Azure OpenAI and other providers as DeepInfra (which uses OpenAI API as well https://deepinfra.com/BAAI/bge-large-en-v1.5/api )
So I would suggest to extend configuration for OpenAI so we could use other vendors but the same API
Beta Was this translation helpful? Give feedback.
All reactions