Questions tagged [langchain]

LangChain is an open-source framework for developing applications powered by language models. Use [py-langchain] for the python-specific package.

LangChain is an open-source framework for developing applications powered by language models. Use [py-langchain] for the python-specific package.

672 questions
0
votes
0 answers

How much CPU memory does langchain program use while running in jupyter notebook?

I want to know how much CPU memory is used when we run a langchain program with a specific LLM model. Also I want to know how much memory does it use based on the size of the data set that we pass in the program. I use a 64 bit Windows 11 OS. I…
0
votes
0 answers

LangChain: Chunking issue with text_splitter.split_documents & RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=0)

I have a set of text files where each file where the file sizes vary from 1K to 2.5k. Is this possible? text_splitter = RecursiveCharacterTextSplitter(chunk_size=2500, chunk_overlap=0) texts = text_splitter.split_documents(data)
Rdhill
  • 57
  • 1
  • 4
0
votes
0 answers

Custom langchain tool not completing agent pipeline

I'm trying to make a AI assistant capable of sending messages on discord I'm having trouble understanding why the discord function doesn't validate the agent pipeline in this code : import json from dotenv import load_dotenv from langchain.chains…
0
votes
0 answers

Why does when installing chromadb, I'm stuck with preparing wheel metadata? How do I fix this?

I am trying to use OpenAI alongside chromadb and langchain. However, when I go to install chromadb, I get stuck with "preparing wheel metadata" for hours. Is this an error? Is there a way around it? See image for reference. enter image description…
0
votes
1 answer

Data Protection when indexing and querying your own documents using LlamaIndex and LangChain

we have some sensitive data which we want to Data Ingestion, Data Indexing locally on prem but should not be sent externally from the company network In this case such as langchain.vectorstores stores locally for Data Ingestion, Data Indexing what…
Jeff Power
  • 33
  • 6
0
votes
1 answer

Export LangChain Index?

I just created a langchain index in Python by passing in quite a few URLs. I used the UnstructuredURLLoader as my Document Loader. Now, to use UnstructuredURLLoader, I had to install several packages on my environment including several very larges…
Minura Punchihewa
  • 1,498
  • 1
  • 12
  • 35
0
votes
0 answers

InvalidRequestError Must provide an engine ( gpt 4 azure open ai Langchain python)

I'm trying to integrate gpt 4 azure open ai with Langchain but when i try to use it inside ConversationalRetrievalChain it is throwing some error raise error.InvalidRequestError(\\n *~* openai.error.InvalidRequestError: Must provide an \'engine\'…
0
votes
1 answer

Change environment variable setted in jupyter Notebook with magics

Hope this question is not already answered, I've searched many posts but none of them says how to change an environment variable. I wanted to load environment variables in .env so followed the steps in this post. %env…
0
votes
2 answers

ModuleNotFoundError: No module named 'langchain.agents'

Just intalled Lanchain. Been going through the first few steps of the getting started tutorial without a problem till I reach the Agents section. from langchain.agents import load_tools from langchain.agents import initialize_agent from…
nid
  • 155
  • 3
  • 9
0
votes
2 answers

Langchain implementation on a random dataset. I want to generate a count plot. It runs on Jupyter notebook but not on VScode

The code is running smoothly on Jupyter notebook. It is generating a count plot or any chart I want. However, while I run it on VS Code, it is not giving me any kind of charts. The code gives textual answers as expected but it does not display any…
0
votes
0 answers

Langchain 'terminal' issue with "nano"

I have installed nano using chocolatey but whenever I'am creating an agent that is supposed to use the terminal to modify a script, it run for an infinite time. Here is the script : import os from langchain.agents import load_tools,…
0
votes
0 answers

NestJS importing ESM and having public property type

I am using langchain library in NestJS. Langchain is ESM so following docs I have added a dynamic import like so: @Injectable() export class LangchainService { public openAI: any; constructor() { this.loadOpenAI(); } private async…
Guerrilla
  • 13,375
  • 31
  • 109
  • 210
0
votes
0 answers

How to detect table in PDF when each PDF have different formats?

I am having task at hand where users have multiple types of PDFs (number of variations is in 100s) and I am supposed to extract table with specific characteristics from those. Each PDF can have multiple tables. One more issue is, tables have similar…
0
votes
2 answers

Python LangChain CSV Agent need help in Chart Image saving

I am pretty new in LangChain, playing with Langchain's CSV Agent. It is giving me the desired result. Look at the attached image Now, I want to use the code outside of Google Colab. However, in the python script, it is giving me the text, but as…
LuckyCoder
  • 520
  • 8
  • 27
0
votes
1 answer

Langchain with Azure AttributeError: Can't get attribute 'Document' when importing langchain.schema in Python

I'm working on a Python project that uses the langchain library with Azure embeddings. However, I'm encountering an issue when trying to load the serialized Faiss index with the OpenAIEmbeddings when they are generated by Azure. Here's the error…
kslote1
  • 720
  • 6
  • 15