Using the regular Azure OpenAI client to get embeddings the request body looks something like this:
{ "model": "text-embedding-3-small", "input": "The quick brown fox jumps over the lazy dog.", "encoding_format": "base64" }
This return a successful response.
However when using the langchain AzureOpenAIEmbeddings class to generate embeddings the payload looks like this:
{ "model": "text-embedding-3-small", "input": [15339, 1917], "encoding_format": "base64" }
This returns a 500 status code. As far as I am aware its because of langchain is using tiktoken to convert the input string into tokenIds for optimization purposes. Can support for this be added or am I barking up the wrong tree?
Thanks!
Using the regular Azure OpenAI client to get embeddings the request body looks something like this:
{ "model": "text-embedding-3-small", "input": "The quick brown fox jumps over the lazy dog.", "encoding_format": "base64" }This return a successful response.
However when using the langchain AzureOpenAIEmbeddings class to generate embeddings the payload looks like this:
{ "model": "text-embedding-3-small", "input": [15339, 1917], "encoding_format": "base64" }This returns a 500 status code. As far as I am aware its because of langchain is using tiktoken to convert the input string into tokenIds for optimization purposes. Can support for this be added or am I barking up the wrong tree?
Thanks!