Questions Tagged [Py-Langchain]
Ask Question Langchain Is an Open-Source Framework for Developing Applications Powered by Language Models. Use This Tag for the Python-Specific Package. 190...
LangChain is an open-source framework for developing applications powered by language models. Use this tag for the python-specific package.
Must Read
190
questions with no upvoted or accepted answers
6
votes
1
answer
828
views
Are Langchain toolkits able to be modified? Can we add tools to a pandas_dataframe_agent toolkit?
I'm new to langchain, so I'm guessing this is possible but demonstrates my lack of a full understanding of the components in langchain. I have successfully created and used the Pandas Dataframe Agent ...
6
votes
0
answers
903
views
Refer to specific files using LangChain & Question-Answering about differences/comparisons
I have not found documentation regarding Question-Answering based on multiple text files, while referencing the text files individually.
Example:
I have file1.txt through file20.txt.
file1.txt is from ...
5
votes
2
answers
3k
views
How to incorporate context/chat history in OpenAI ChatBot using ChatGPT and langchain in Python?
Please bear with me as this is literally the first major code I have ever written and its for OpenAI's ChatGPT API.
What I intend to do with this code is load a pdf document or a group of pdf ...
3
votes
0
answers
2k
views
Langchain AgentExecutor Won't Use Any Tools
I'm using the tiiuae/falcon-40b-instruct off HF, and I am trying to incorporate it with LangChain ReAct. I'm using a regular LLMChain with a StringPromptTemplate that's just the standard Thought/...
3
votes
0
answers
790
views
Make LangChain agent output also Retrieval's info
I am working on creating a langchain agent
logging.info("Initializing the tools")
tools = [
StructuredTool.from_function(some_func),
Tool(
...
3
votes
0
answers
652
views
Calling OpenAI via LangChain taking long time and failing
Please help me with this issue. I've been trying for the last few days to solve it without any success. I am calling the LLM via LangChain:
calling openai via Langchain
response = llm.call_as_llm(f&...
3
votes
0
answers
623
views
Cant use streamlit fileuploader with langchian tranform loaders
i want to use st.file_uploader to upload a file based on the extension, use the necessary loader
ex:
The normal working is
from langchain.document_loaders import PyPDFLoader
loader = PyPDFLoader(&...
2
votes
1
answer
137
views
GPT4All prompt size
Name: gpt4all
Version: 2.0.2
I am trying to query a database using GPT4All package using my postgresql database.
Below is the code
from langchain.callbacks.streaming_stdout import ...
2
votes
1
answer
240
views
Can I use Apache Solr as a vectorstore in LangChain?
Is there a way to connect Solr to use it as a vectorstore for a chatbot being developed using LangChain and OpenAI API? Solr is currently not supported as a vectorstore in LangChain, but LangChain's ...
2
votes
0
answers
592
views
How to optimize the building time with LlamaIndex by storing an agent or a toolkit?
I'm currently building a chatbot agent with llama_index to take benefit of a dataset of 13 000 documents I have. However, making the toolkit to then build the agent takes a lot of time (4h) because I ...
2
votes
0
answers
744
views
Langchain prints Context before question and answer
import os
import nltk
from langchain import PromptTemplate, LLMChain
from langchain.llms import GPT4All
from langchain.callbacks.base import CallbackManager
from langchain.callbacks.streaming_stdout ...
2
votes
0
answers
332
views
Asynchronous tools break the chain in langchain implementation
I implemented langchain as a Python API, created via FASTAPI and uvicorn.
The Python API is composed of one main service and various microservices the main service call when required. These ...
2
votes
1
answer
2k
views
Combine vectore store into Langchain toolkit
Trying to have the agent use 2 vector stores as tools during its run. The files are in different folders out of necessity and they are different formats one is text and one is pdf. Thus why I need to ...
2
votes
1
answer
3k
views
How to add memory to load_qa_chain or How to implement ConversationalRetrievalChain with custom prompt with multiple inputs
I am trying to provide a custom prompt for doing Q&A in langchain. I wasn't able to do that with ConversationalRetrievalChain as it was not allowing for multiple custom inputs in custom prompt. ...
1
vote
1
answer
65
views
Raise "Message of 'system' type not supported by Gemini" exception by ChatGoogleGenerativeAI with ConversationalRetrievalChain
I am trying to implement Document based question answering system using Langchain and Gemini Pro but getting error
langchain_google_genai.chat_models.ChatGoogleGenerativeAIError: Message of 'system' ...