Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump langchain version + add required pck to run #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gtracer
Copy link

@gtracer gtracer commented Feb 10, 2023

No description provided.

Copy link

@shynsky shynsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, works as expected.

@arnegebert
Copy link

arnegebert commented Mar 27, 2023

Edit: same issue as langchain-ai/langchain#1100, I created my embeddings with an older version

Trying to upgrade this PR to the latest version, I receive the following error:

Traceback (most recent call last):
  File "/home/arne/Documents/GitHub/cashew/qa.py", line 25, in <module>
    result = chain({"question": args.question})
  File "/home/arne/.local/share/virtualenvs/cashew-KA6SwOM3/lib/python3.10/site-packages/langchain/chains/base.py", line 142, in __call__
    raise e
  File "/home/arne/.local/share/virtualenvs/cashew-KA6SwOM3/lib/python3.10/site-packages/langchain/chains/base.py", line 139, in __call__
    outputs = self._call(inputs)
  File "/home/arne/.local/share/virtualenvs/cashew-KA6SwOM3/lib/python3.10/site-packages/langchain/chains/qa_with_sources/base.py", line 105, in _call
    docs = self._get_docs(inputs)
  File "/home/arne/.local/share/virtualenvs/cashew-KA6SwOM3/lib/python3.10/site-packages/langchain/chains/qa_with_sources/vector_db.py", line 49, in _get_docs
    docs = self.vectorstore.similarity_search(
  File "/home/arne/.local/share/virtualenvs/cashew-KA6SwOM3/lib/python3.10/site-packages/langchain/vectorstores/faiss.py", line 166, in similarity_search
    docs_and_scores = self.similarity_search_with_score(query, k)
  File "/home/arne/.local/share/virtualenvs/cashew-KA6SwOM3/lib/python3.10/site-packages/langchain/vectorstores/faiss.py", line 135, in similarity_search_with_score
    embedding = self.embedding_function(query)
  File "/home/arne/.local/share/virtualenvs/cashew-KA6SwOM3/lib/python3.10/site-packages/langchain/embeddings/openai.py", line 167, in embed_query
    embedding = self._embedding_func(text, engine=self.query_model_name)
  File "/home/arne/.local/share/virtualenvs/cashew-KA6SwOM3/lib/python3.10/site-packages/langchain/embeddings/openai.py", line 123, in _embedding_func
    if self.embedding_ctx_length > 0:
AttributeError: 'OpenAIEmbeddings' object has no attribute 'embedding_ctx_length'

Does someone know what is going on here? Obviously a version mismatch, but not sure where. (I tried with 0.0.100 and 0.0.123.)

@JackCrish
Copy link

Tested. Works. Just re-export your API key when finished installing. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants