langchain Questions
6
Solved
I am getting an ImportError while using GPTSimpleVectorIndex from the llama-index library. Have installed the latest version of llama-index library and trying to run it on python 3.9.
from llama_in...
Mcvay asked 9/7, 2023 at 4:26
8
First and foremost I'm using the latest of Python (==3.11.2) and the most recent version of langchain (==0.0.128).
Following the latest docs on DirectoryLoader, the following line should work:
from...
Upper asked 1/4, 2023 at 16:42
6
Solved
I was trying to embed some documents on postgresql with the help of pgvector extension and langchain. Unfortunately I'm having trouble with the following error:
(psycopg2.errors.UndefinedObject) ty...
Eastbourne asked 10/5, 2023 at 16:28
5
I have been working with langchain's chroma vectordb. It has two methods for running similarity search with scores.
vectordb.similarity_search_with_score()
vectordb.similarity_search_with_relevanc...
3
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:
pi...
4
Solved
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 he...
Dentate asked 5/5, 2023 at 17:9
3
Solved
I tried executing a langchain agent. I want to save the output from verbose into a variable, but all I can access from the agent.run is only the final answer.
How can I save the verbose output to a...
Garratt asked 5/6, 2023 at 11:31
6
Solved
All of sudden langchain_community & langchain packages started throwing error:
TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
The error getting ge...
5
Solved
Here is the full code. It runs perfectly fine on https://learn.deeplearning.ai/ notebook. But when I run it on my local machine, I get an error about
ImportError: Could not import docarray python ...
Nonu asked 11/8, 2023 at 1:41
2
Solved
I'm trying to run a chain in LangChain with memory and multiple inputs. The closest error I could find was was posted here, but in that one, they are passing only one input.
Here is the setup:
from...
2
Solved
I am following this guide to set up a self-RAG.
I am not allowed to use OpenAI models at the moment, so I've been using ChatOllama models instead. I want to pipe outputs using the "with_struct...
2
Solved
I am using Python Flask app for chat over data. In the console I am getting streamable response directly from the OpenAI since I can enable streming with a flag streaming=True.
The problem is, that...
Sedgewick asked 18/5, 2023 at 20:53
2
Solved
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 Open...
Poleaxe asked 27/11, 2023 at 8:1
2
Solved
I am trying to put together a simple "Q&A with sources" using Langchain and a specific URL as the source data. The URL consists of a single page with quite a lot of information on it....
Crore asked 15/6, 2023 at 11:31
7
I'm creating a conversation like so:
llm = ChatOpenAI(temperature=0, openai_api_key=OPENAI_API_KEY, model_name=OPENAI_DEFAULT_MODEL)
conversation = ConversationChain(llm=llm, memory=ConversationBuf...
Gorden asked 8/4, 2023 at 13:51
5
Solved
This is how I am defining the executor
const executor = await initializeAgentExecutorWithOptions(tools, model, {
agentType: 'chat-conversational-react-description',
verbose: false,
});
Whenever ...
Miscreance asked 2/11, 2023 at 7:26
2
Solved
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("...
Casares asked 22/8, 2023 at 6:30
6
Solved
I am trying to use a custom embedding model in Langchain with chromaDB. I can't seem to find a way to use the base embedding class without having to use some other provider (like OpenAIEmbeddings o...
Protestation asked 2/10, 2023 at 16:51
1
I've previously built a pdf searching tool in LangChain which uses the
chain.run(input_documents=, question=) syntax to ask the model questions along with context from that pdf.
I want to integrate...
Cliff asked 19/7, 2023 at 10:20
2
Solved
I am using the SQL Database Agent to query a postgres database. I want to use gpt 4 or gpt 3.5 models in the OpenAI llm passed to the agent, but it says I must use ChatOpenAI. Using ChatOpenAI thro...
Pasadis asked 7/6, 2023 at 9:40
2
so i recently started to work on chromabd and i am facing this error:
"module 'chromadb' has no attribute 'config'"
here is my code:
from langchain.vectorstores import Chroma
from sent...
1
How does one correctly parse data from load_qa_chain?
It is easy to retrieve an answer using the QA chain, but we want the LLM to return two answers, which then parsed by a output parser, PydanticO...
5
Solved
I've searched all over langchain documentation on their official website but I didn't find how to create a langchain doc from a str variable in python so I searched in their GitHub code and I found...
Homogenous asked 25/6, 2023 at 15:9
8
this is my code:
import os
from dotenv import load_dotenv,find_dotenv
load_dotenv(find_dotenv())
print(os.environ.get("OPEN_AI_KEY"))
from langchain.llms import OpenAI
llm=OpenAI(model_...
Exhilaration asked 31/7, 2023 at 2:38
5
i have built a splitter function with langchain library that splits a series of python files.
At another point in the code I need to convert these documents back into python code. Only I do not kno...
Mourner asked 1/9, 2023 at 20:27
1 Next >
© 2022 - 2024 — McMap. All rights reserved.