-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix deprecated langchain warning for llama3 #953
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
Conversation
Thanks for the PR! output
Could you please help me resolve the error? I may recommend updating markdown with the new Trace after every cell with code. |
Would you like to address deprecation warnings in 3rd and 8th cells?
8th ### Router
|
You may take a look on this PR #905 for more context |
Thanks @IgorKasianenko - addressed the deprecation warnings in 3rd/8th cells & included the updated trace. Interestingly I can't reproduce the error in the last cell, it does seem to work for me... |
After installing the conda env from scratch and creating new langchain API key I can confirm that I am facing the same error as #894 (comment) Todays error log
Debugging it as stand alone function works as expected:
|
@sviswana I checked it with all small models and they result in the same issue:
|
yea it's super strange - b/c I'm using the small llama3.2:1b model myself |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG
"from langchain_community.document_loaders import WebBaseLoader\n", | ||
"from langchain_community.vectorstores import Chroma\n", | ||
"from langchain_community.embeddings import HuggingFaceEmbeddings\n", | ||
"from langchain_huggingface import HuggingFaceEmbeddings\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created brand new conda env to test it end to end and I am getting
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[4], line 14
6 from langchain_huggingface import HuggingFaceEmbeddings
8 urls = [
9 "https://lilianweng.github.io/posts/2023-06-23-agent/",
10 "https://lilianweng.github.io/posts/2023-03-15-prompt-engineering/",
11 "https://lilianweng.github.io/posts/2023-10-25-adv-attack-llm/",
12 ]
---> 14 docs = [WebBaseLoader(url).load() for url in urls]
15 docs_list = [item for sublist in docs for item in sublist]
17 text_splitter = RecursiveCharacterTextSplitter.from_tiktoken_encoder(
18 chunk_size=250, chunk_overlap=0
19 )
Cell In[4], line 14, in <listcomp>(.0)
6 from langchain_huggingface import HuggingFaceEmbeddings
8 urls = [
9 "https://lilianweng.github.io/posts/2023-06-23-agent/",
10 "https://lilianweng.github.io/posts/2023-03-15-prompt-engineering/",
11 "https://lilianweng.github.io/posts/2023-10-25-adv-attack-llm/",
12 ]
---> 14 docs = [WebBaseLoader(url).load() for url in urls]
15 docs_list = [item for sublist in docs for item in sublist]
17 text_splitter = RecursiveCharacterTextSplitter.from_tiktoken_encoder(
...
--> 347 from bs4 import BeautifulSoup
349 if parser is None:
350 if url.endswith(".xml"):
ModuleNotFoundError: No module named 'bs4'
What does this PR do?
Fixes # 894 (raised in #894)
Updating the imports & some linter issues in 3p-integrations/langchain/langgraph_rag_agent_local.ipynb --> tested E2E and can view the langchain traces for the last 2 cells:
https://smith.langchain.com/public/35e29916-70be-4146-8fc9-9787cb111ef5/r
https://smith.langchain.com/public/8ec9370f-29e2-46b4-842c-8ab949f8a3fa/r