langchain Questions
3
Currently, when using an LLMChain in LangChain, I can get the template prompt used and the response from the model, but is it possible to get the exact text message sent as query to the model, with...
Spenserian asked 7/7, 2023 at 19:1
2
I try to call AzureChatOpenAI() from langchain. Normally I would do:
model = AzureChatOpenAI(
openai_api_base=os.getenv("OPENAI_API_BASE"),
openai_api_version="2023-03-15-preview&quo...
Cheyney asked 25/11, 2023 at 17:10
7
Solved
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/python...
Autism asked 23/5, 2023 at 10:9
1
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="2023-05-15",
o...
Flagstaff asked 23/8, 2023 at 9:29
8
I'm working with LangChain to create a retrieval-based QA system. However, when I attempt to chain Runnables, I encounter a TypeError that I'm unable to resolve. The error occurs when I try to use ...
Ritch asked 9/11, 2023 at 10:29
2
My code below causes the error TypeError: _load_sbert_model() got an unexpected keyword argument 'token' while I try to run it. This is the same code in the documentation for Langchain Instruct Emb...
Bores asked 30/1 at 4:35
4
Solved
I'm currently working on developing a chatbot powered by a Large Language Model (LLM), and I want it to provide responses based on my own documents. I understand that using a fine-tuned model...
Brochure asked 28/8, 2023 at 7:22
3
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 docum...
Openhearth asked 21/5, 2023 at 21:9
8
Solved
When I write code in VS Code, beginning with:
import os
from langchain.chains import RetrievalQA
from langchain.llms import OpenAI
from langchain.document_loaders import TextLoader
I am met with t...
Ambulatory asked 20/7, 2023 at 3:5
1
I tried to create a sarcastic AI chatbot that can mock the user with Ollama and Langchain, and I want to be able to change the LLM running in Ollama without changing my Langchain logic.
The problem...
Iraqi asked 26/11, 2023 at 4:57
7
I have written LangChain code using Chroma DB to vector store the data from a website url. It currently works to get the data from the URL, store it into the project folder and then use that data t...
Twostep asked 12/5, 2023 at 0:15
2
Solved
I can see everything but the Embedding of the documents when I used Chroma with Langchain and OpenAI embeddings. It always show me None for that
Here is the code:
for db_collection_name in tqdm([&q...
Monomorphic asked 1/6, 2023 at 7:7
2
Basically I want to achieve this with Flask and LangChain: https://www.youtube.com/watch?v=x8uwwLNxqis.
I'm building a Q&A Flask app that uses LangChain in the backend, but I'm having trouble t...
Carven asked 24/3, 2023 at 20:13
3
I am trying to create an customer support system using langchain. I am using text documents as external knowledge provider via TextLoader
In order to remember the chat I using ConversationalRetriev...
Studdingsail asked 16/5, 2023 at 14:26
2
I am new to LangChain and I'm trying to create a simple Q&A bot (over documents). Following the documentation and guide on their website, I've created a simple working bot, but I'm struggling t...
Lingam asked 21/8, 2023 at 17:43
3
Solved
My default assumption was that the chunk_size parameter would set a ceiling on the size of the chunks/splits that come out of the split_text method, but that's clearly not right:
from langchain.tex...
Hydrometer asked 7/7, 2023 at 3:50
3
Solved
I'm working with langchain and ChromaDb using python.
Now, I know how to use document loaders. For instance, the below loads a bunch of documents into ChromaDb:
from langchain.embeddings.openai imp...
2
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 i...
Crispen asked 19/7, 2023 at 13:54
1
Solved
I have been trying to use
Chromadb version 0.4.8
Langchain version 0.0.276
with SentenceTransformerEmbeddingFunction as shown in the snippet below.
from langchain.vectorstores import Chroma
from ...
Tachylyte asked 30/8, 2023 at 3:41
2
I want to add a ConversationBufferMemory to pandas_dataframe_agent but so far I was unsuccessful.
I have tried adding the memory via construcor: create_pandas_dataframe_agent(llm, df, verbose=True...
Eon asked 18/6, 2023 at 14:13
1
How could I fix this:
UserWarning: Importing OpenAI from langchain root module is no longer supported.
UserWarning: Importing LLMChain from langchain root module is no longer supported.
UserWarning...
Saker asked 28/9, 2023 at 0:17
4
I am using Langchain with Gradio interface in Python. I have made a conversational agent and am trying to stream its responses to the Gradio chatbot interface. I have had a look at the Langchain do...
Fag asked 19/4, 2023 at 16:58
3
I've a folder with multiple csv files, I'm trying to figure out a way to load them all into langchain and ask questions over all of them.
Here's what I have so far.
from langchain.embeddings.openai...
Philippopolis asked 13/4, 2023 at 15:29
3
I am trying to use LangChain Agents and am unable to import load_tools.
Version: langchain==0.0.27
I tried these:
from langchain.agents import initialize_agent
from langchain.llms import OpenAI
fro...
Paramorphism asked 24/2, 2023 at 3:22
0
I am using langchain with Open ai GPT-3.5. I am using agents to send user's queries to specific tools and I am getting output responses through my agent. Now I want the output response to be JSON b...
Saville asked 6/9, 2023 at 20:49
© 2022 - 2024 — McMap. All rights reserved.