samwit / langchain-tutorials Goto Github PK
View Code? Open in Web Editor NEWA set of LangChain Tutorials from my youtube channel
A set of LangChain Tutorials from my youtube channel
I went through “langchain-tutorials” but cannot find the code in the video"LangChain + Retrieval Local LLMs for Retrieval QA - No OpenAI!!!" . Can you help me? Thanks
2024/gemma2_local_rag/indexer.py
when it comes to Chroma.from_documents, I get the following error:
File "/rag/indexer.py", line 47, in
vectorstore = Chroma.from_documents(
File "/opt/conda/lib/python3.10/site-packages/langchain_community/vectorstores/chroma.py", line 790, in from_documents
return cls.from_texts(
File "/opt/conda/lib/python3.10/site-packages/langchain_community/vectorstores/chroma.py", line 754, in from_texts
chroma_collection.add_texts(texts=texts, metadatas=metadatas, ids=ids)
File "/opt/conda/lib/python3.10/site-packages/langchain_community/vectorstores/chroma.py", line 276, in add_texts
embeddings = self._embedding_function.embed_documents(texts)
File "/opt/conda/lib/python3.10/site-packages/langchain_community/embeddings/ollama.py", line 211, in embed_documents
embeddings = self._embed(instruction_pairs)
File "/opt/conda/lib/python3.10/site-packages/langchain_community/embeddings/ollama.py", line 199, in _embed
return [self.process_emb_response(prompt) for prompt in iter]
File "/opt/conda/lib/python3.10/site-packages/langchain_community/embeddings/ollama.py", line 199, in
return [self.process_emb_response(prompt) for prompt in iter]
File "/opt/conda/lib/python3.10/site-packages/langchain_community/embeddings/ollama.py", line 170, in _process_emb_response
raise ValueError(f"Error raised by inference endpoint: {e}")
ValueError: Error raised by inference endpoint: HTTPConnectionPool(host='localhost', port=11434): Max retries exceeded with url: /api/embeddings (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f97338b0d30>: Failed to establish a new connection: [Errno 111] Connection refused'))
Hi Sam,
In the conversation with memory tutorial, you have the lines:
from pprint import pprint
pprint(conversation.memory.store)
store
apparently is no longer an attribute of memory. What would be the proper replacement? thanks. I get the error:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[/Users/erlebach/src/2023/langchain_ecosystem/langchain_tutorials_wittenveek/YT_LangChain_Basic_Conversation_Chatbot_with_Memory_Demo.ipynb](https://file+.vscode-resource.vscode-cdn.net/Users/erlebach/src/2023/langchain_ecosystem/langchain_tutorials_wittenveek/YT_LangChain_Basic_Conversation_Chatbot_with_Memory_Demo.ipynb) Cell 67 line 2
[1](vscode-notebook-cell:/Users/erlebach/src/2023/langchain_ecosystem/langchain_tutorials_wittenveek/YT_LangChain_Basic_Conversation_Chatbot_with_Memory_Demo.ipynb#Y123sZmlsZQ%3D%3D?line=0) from pprint import pprint
----> [2](vscode-notebook-cell:/Users/erlebach/src/2023/langchain_ecosystem/langchain_tutorials_wittenveek/YT_LangChain_Basic_Conversation_Chatbot_with_Memory_Demo.ipynb#Y123sZmlsZQ%3D%3D?line=1) pprint(conversation.memory.store)
AttributeError: 'ConversationEntityMemory' object has no attribute 'store'
Thanks! Great tutorial videos by the way!
Gordon
Thank you for making good videos. I was wondering how to find the related examples, especially about the 16K tokens LangChain example, if you have published it? Sorry if this is a stupid question, but I didn't notice it here.
the
from langchain.llms import Ollama
has to be replaced with
from langchain_community.llms import Ollama
Hi,
First of all, thank you for sharing all this on YouTube.
I ran the script rag.py exactly the way you did and I am getting the following issue, could you please run your script back and see if it breaks as well?
ValueError: Expected EmbeddingFunction.call to have the following signature: odict_keys(['self', 'input']), got odict_keys(['self', 'args', 'kwargs'])
Please see https://docs.trychroma.com/embeddings for details of the EmbeddingFunction interface.
Please note the recent change to the EmbeddingFunction interface: https://docs.trychroma.com/migration#migration-to-0416---november-7-2023
How to improve agents response in terms of borderless tables? A table where there are no definite headers, these tables are present in 10k reports, when i extract them from pdfs and store them in csv's i want to ask questions with them or say such a table is an example, i see the question answering isnt that great, i have received indefinite answers, or the GPT has denied an answer, did you work on such scenarios?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.