Coder Social home page Coder Social logo

Comments (9)

tindo2003 avatar tindo2003 commented on August 15, 2024 2

I am getting same issue. Perhaps, the deployment is different from the model name? As indicated by #1560

from langchain.

liugddx avatar liugddx commented on August 15, 2024 1

Let me see.

from langchain.

jackbullen avatar jackbullen commented on August 15, 2024

Did you deploy your embedding endpoint in Azure? If not then try that.

I don't think this is an issue with langchain.

from langchain.

Govindarajan-D avatar Govindarajan-D commented on August 15, 2024

@jackbullen. Yes it is deployed. I am converting an existing code for running using langchain.

In my existing model, I have used AzureOpenAI from openai library and used embeddings.create and it works without issue.
Even in my issue description, I have mentioned that __tokenize works in langchain but not "embed_query"

from langchain.

jackbullen avatar jackbullen commented on August 15, 2024

Yes it is deployed.

OK, I asked did you deploy it.

If you did and it's still giving the same error then idk, but a temporary workaround is passing the string query rather than tokens into OpenAIEmbeddings.client.create

from langchain.

tindo2003 avatar tindo2003 commented on August 15, 2024

Hi, any updates since? Thanks!

from langchain.

Govindarajan-D avatar Govindarajan-D commented on August 15, 2024

Yes it is deployed.

OK, I asked did you deploy it.

If you did and it's still giving the same error then idk, but a temporary workaround is passing the string query rather than tokens into OpenAIEmbeddings.client.create

Sorry about that, but I did not deploy the Open AI model in Azure, but I am using it with API Key. Embedding works when I use AzureOpenAI.embeddings.create but only fails when I use langchain

from langchain.

amanjam avatar amanjam commented on August 15, 2024

I am facing the same issue if it is resolved yet, I have a Proxy endpoint provided by the hackathon I am taking part in, for me langchain AzureOpenAIEmbeddings is giving me 422 error

from langchain.

TEH000 avatar TEH000 commented on August 15, 2024

set check_embedding_ctx_length=False works for me

eg.
from langchain_openai import OpenAIEmbeddings

embeddings = OpenAIEmbeddings(model=model_name, openai_api_key="key", base_url=url, check_embedding_ctx_length=False)

from langchain.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.