All Questions
Tagged with large-language-model py-langchain
63
questions
-1
votes
0
answers
16
views
Issue with SQLDatabase.from_uri in langchain when including materialized views
This is not working for views ( working for tables in the same database)
db = SQLDatabase.from_uri(rds_uri,include_tables=["mv_complete_dur_info_update_new"],view_support=True,schema="...
0
votes
0
answers
40
views
SQL query is not correctly generated using langchain, nlp and llm
I have created a application which takes input question and converts it in SQL query using langchain, llm and nlp but sometimes it creating wrong query especially in the beginning following is the ...
1
vote
0
answers
41
views
why message content is alway empty when I create my own tool with retriever in langchain?
I create a simpler retriever based on docs, after I create a tool and I want to bind it in LLM object, but when I make a question it return empty content.
This is the code:
llm = ChatOpenAI(...
0
votes
0
answers
46
views
Retrieval QA chain using langchain with LaMini Model
I was trying to follow this guid on RAG chatbot from pinecone - https://docs.pinecone.io/guides/get-started/build-a-rag-chatbot
Instead of using OpenAI I was using alternatives like ...
1
vote
1
answer
216
views
Performing Function Calling with Mistral AI through Hugging Face Endpoint
I am trying to perform function calling using Mistral AI through the Hugging Face endpoint. Mistral AI requires input in a specific string format (assistant: ... \n user: ...). However, the input ...
0
votes
0
answers
319
views
Async Chain Invocation with Langchain Gets Stuck at await chain.invoke() in Python
I am working on a project using the Langchain library to process and query information from a PDF document. My setup involves loading the PDF, splitting it into chunks, adding these chunks to a vector ...
0
votes
0
answers
29
views
How do I get the destination chains which have been executed based on the input
Output which I get from the bellow code :
{'input': '2+2', 'text': 'Sure, I'd be happy to help with that question!\n\nThe question you've asked is "2 + 2."\n\nTo answer this question, we can ...
0
votes
1
answer
922
views
Update table using Langchain SQL Agent/Tool got OutputParserException/Parsing LLM output
How to use the Python langchain agent to update data in the SQL table?
I'm using the below py-langchain code for creating an SQL agent.
from sqlalchemy import Column, Integer, String, Table, Date, ...
0
votes
0
answers
200
views
Error when trying to get answer using qa_chain
I'm following this tutorial and I'm at the step where I am testing chatting with the AI chatbot. I have created the qa_chain and I am using it similar to how it is in the tutorial but I am getting the ...
0
votes
0
answers
875
views
Stop AgentExecutor chain after arriving at the Final answer (in LangChain)
I am using a react agent in Langchain for a chatbot. I want to stop the agent execution once the agent arrives on the Final Answer. The problem is for queries like "What is your name?" the ...
0
votes
0
answers
301
views
Langchain agent keyerror: 'agent'
I'm encountering a KeyError: 'agent' when initializing an AgentExecutor object in my Python script. Here's the traceback:, is there any way i could fix this:
-------------------------------------------...
0
votes
0
answers
146
views
Langchain StuffDocumentsChain is not stopping
I'm using StuffDocumentsChain in my llm Q&A app, the model is Mistral 7b v0.2 instruct.
I'm using load_qa_chain from langchain.chains.question_answering.
The chain is tarting to generate correct ...
2
votes
0
answers
534
views
How to combine Parent Document Retriever with Self Query Retriever with Lang Chain framework
I have implemented a Self Query retriever (https://python.langchain.com/docs/modules/data_connection/retrievers/self_query) for my RAG model, and it works fine. I can retrieve specific chunks of ...
1
vote
1
answer
570
views
Does anybody knows why my tool is expecting an "arg1" in Langchain?
Well few days ago my code was working perfectly but today I'm having this error so many times in console:
TypeError: SQLFilterTool._run() got an unexpected keyword argument 'arg1'
The agent that I use ...
0
votes
1
answer
135
views
Error while using openAI key? getting RateLimitError
I just created a openAI key within my project for using LLM but can't access it.
Tried this
from langchain.llms import OpenAI
import os
os.environ["OPEN_API_KEY"]="openAI key here"
...