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

Rag 5 Semantic Query (Fast Start throws an error) #989

Open
lekejo opened this issue Sep 5, 2024 · 3 comments
Open

Rag 5 Semantic Query (Fast Start throws an error) #989

lekejo opened this issue Sep 5, 2024 · 3 comments

Comments

@lekejo
Copy link

lekejo commented Sep 5, 2024

Hello,
I am new to all of this and I was trying to follow and run the RAG notebooks on google colab. The 5th notebook in the RAG series (Fast Start) when run on colab throws the following error. In fact, you can find the error in the original notebook itself which was uploaded. It seems this notebook never ran well.

update: Step 4 - Generating Embeddings in chomadb db - with Model- industry-bert-contracts

TypeError Traceback (most recent call last)
in <cell line: 2>()
1 print("\nupdate: Step 4 - Generating Embeddings in {} db - with Model- {}".format(vector_db, embedding_model))
----> 2 library.install_new_embedding(embedding_model=embedding_model, vector_db=vector_db)

TypeError: Library.install_new_embedding() got an unexpected keyword argument 'embedding_model'

I hope you see that.

@pritesh2000
Copy link
Contributor

I had run this file recently but didn't encounter any error. In some cases, rerun would solve problem.

@lekejo
Copy link
Author

lekejo commented Sep 14, 2024

Hello all,
Thanks for replying back.
I was able to run the notebook on google collab after removing the "embedding_model=" and "vector_db=". The original notebook (ipynb and not the .py) file seems to have issues. you can find errors in the notebook after the line of code. That's what I want to highlight. See for yourself here:

print("\nupdate: Step 4 - Generating Embeddings in {} db - with Model- {}".format(vector_db, embedding_model))
library.install_new_embedding(embedding_model=embedding_model, vector_db=vector_db)
     


**update: Step 4 - Generating Embeddings in chomadb db - with Model- industry-bert-contracts
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-13-ddf9472f6b35> in <cell line: 2>()
      1 print("\nupdate: Step 4 - Generating Embeddings in {} db - with Model- {}".format(vector_db, embedding_model))
----> 2 library.install_new_embedding(embedding_model=embedding_model, vector_db=vector_db)

TypeError: Library.install_new_embedding() got an unexpected keyword argument 'embedding_model'**

@ahmedsalim3
Copy link

Hi @lekejo, you're right. It seems there's a typo in the example_5_rag_semantic_query.ipynb notebook.

The issue occurred because the install_new_embedding function in Library class expects the parameter embedding_model_name instead of embedding_model . (see source)

To fix this, you just need to update the keyword argument in the code like so:

library.install_new_embedding(embedding_model_name=embedding_model, vector_db=vector_db)

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

No branches or pull requests

3 participants