77 questions
36
votes
7
answers
32k
views
import langchain => Error : TypeError: issubclass() arg 1 must be a class
I want to use langchain for my project.
so I installed it using following command : pip install langchain
but While importing "langchain" I am facing following Error:
File /usr/lib/python3.8/...
7
votes
2
answers
4k
views
Langchain / ChromaDB: Why does VectorStore return so many duplicates?
import os
from langchain.llms import OpenAI
import bs4
import langchain
from langchain import hub
from langchain.document_loaders import UnstructuredFileLoader
from langchain.embeddings import ...
1
vote
1
answer
4k
views
langchain - Azure OpenAI api - returning additional information than the asked question
I am trying to develop a chatbot using streamlit,langchain Azure OpenAI api.
I have been successful in deploying the model and invoking an response but it is not what I expect.
here is the prompt and ...
33
votes
3
answers
69k
views
langchain : ModuleNotFoundError: No module named 'langchain_community'
Trying to execute this code:
from langchain_community.vectorstores import FAISS
Error it is showing:
ModuleNotFoundError: No module named 'langchain_community'
Thou I have executed the command:
pip ...
26
votes
2
answers
29k
views
What is the difference between OpenAI and ChatOpenAI in LangChain?
I read the LangChain Quickstart.
There is a demo inside:
from langchain.llms import OpenAI
from langchain.chat_models import ChatOpenAI
llm = OpenAI()
chat_model = ChatOpenAI()
llm.predict("hi!&...
17
votes
4
answers
54k
views
Get all documents from ChromaDb using Python and langchain
I'm using langchain to process a whole bunch of documents which are in an Mongo database.
I can load all documents fine into the chromadb vector storage using langchain. Nothing fancy being done here. ...
10
votes
6
answers
13k
views
langchain_community & langchain packages giving error: Missing 1 required keyword-only argument: 'recursive_guard'
All of sudden langchain_community & langchain packages started throwing error:
TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
The error getting ...
9
votes
5
answers
22k
views
Langchain's AzureOpenAI error: Resource not found
I’m trying to use LangChain’s AzureOpenAI as below but getting this error.
Do you know how can I fix this?
openai.error.InvalidRequestError: Resource not found
# Import Azure OpenAI
from langchain....
9
votes
2
answers
19k
views
Why doesn't langchain ConversationalRetrievalChain remember the chat history, even though I added it to the chat_history parameter?
Studying AI and LangChain, and I was trying to make a conversational chatbot. So far so good, I managed to get feed it custom texts and it answers questions based on the text, but for some reason it ...
4
votes
2
answers
8k
views
ValueError: `run` not supported when there is not exactly one input key, got ['question', 'documents']
Getting the error while trying to run a langchain code.
ValueError: `run` not supported when there is not exactly one input key, got ['question', 'documents'].
Traceback:
File "c:\users\aviparna....
4
votes
1
answer
11k
views
I don't understand how the prompts work in llama_index
I have been trying to query a pdf file in my local directory using LLM, I have downloaded the LLM model I'm using in my local system (GPT4All-13B-snoozy.ggmlv3.q4_0.bin) and trying to use langchain ...
3
votes
3
answers
6k
views
Langchain ParentDocumetRetriever: Save and load
I am using the PartentDocumentRetriever from Langchain.
Now I first want to build my vector database and then want to retrieve stuff.
Here is my file that builds the database:
# =======================...
3
votes
1
answer
8k
views
Loading data using `UnstructuredURLLoader` of LangChain halts with `TP_NUM_C_BUFS too small: 50`
I am attempting to replicate the code provided in the documentation of LangChain (URL - 🦜🔗 LangChain 0.0.167) to enable loading HTML files from a list of URLs into a document format, which can then ...
2
votes
0
answers
1k
views
Doesn't read the model [closed]
I am writing a program in Python, I want to connect GPT4ALL so that the program works like a GPT chat, only locally in my programming environment. To do this, I already installed the GPT4All-13B-...
2
votes
1
answer
2k
views
How can I add an extra tool to CSVAgent or PandasDataFrameAgent from langchain library
I have a very simple code using the langchain library to query a pandas dataframe.
model = AzureOpenAI(
deployment_name="text-davinci-003",
openai_api_version="...