Questions tagged [llama-index]

112 questions
0
votes
0 answers

LLamaindex index.storage_context.persist() not storing vector_store

index.storage_context.persist() is not storing the vector_store and creating thevector_store.json file When I try to load from disk and run sc2 = StorageContext.from_defaults(persist_dir='./storage'), i get the following error: No existing…
0
votes
1 answer

ImportError: cannot import name 'SimpleDirectoryReader' from 'llama_index' (unknown location)

from llama_index import SimpleDirectoryReader, ServiceContext, VectorStoreIndex from llama_index.llms import OpenAI Upon trying the above imports I get the following error: ImportError: cannot import name 'SimpleDirectoryReader' from 'llama_index'…
abstract
  • 21
  • 5
0
votes
0 answers

StreamResponse FastAPI with Llama_index

I am trying to stream back the response of my chat agent. I am really new to python and i am trying to learn to do this type of things. This id the code: async def chat(input_text): custom_prompt = Prompt( """ xxx """ ) try: …
Fran ETH
  • 23
  • 1
  • 6
0
votes
0 answers

llama_index : VectorStoreIndex

I have the following python codes: from llama_index import ( SimpleDirectoryReader, VectorStoreIndex, ) documents = SimpleDirectoryReader("docs").load_data() index = VectorStoreIndex.from_documents(documents) #Why is there openAI…
mce
  • 1
  • 2
0
votes
0 answers

I want a suggestion to embed a large number of PDF into a Faiss Vector Store | Llama_Index | PDF reader

Actually I am trying to build a chat bot which can answer the questions from a set of pdf's. I use llama_index for retrival. The bot is working now without any issues. But the quality of the answers is not that great :( . I believe that is because I…
Nandha
  • 11
  • 1
0
votes
1 answer

AI related questions on OpenAI and Llama LLM usage

I keep seeing examples of calling OpenAI API, but i am using LLM llama2 and i am not interested to use OpenAI API, why OpenAI package is required for the following PromptHelper and LLMPredictor import, the modules supposedly come from llama_index,…
mce
  • 1
  • 2
0
votes
2 answers

llama index vectorstore querying with specific filtering

I have this simple code to query from files thats saved in a chroma vector store. Now if each file belongs to some user and each user can only query with data from their files and not others, how can I achieve this? I was thinking maybe save userId…
son
  • 7
  • 1
  • 2
0
votes
1 answer

ValueError: Invalid message for Chatbot component: (message)

I am building the chatbot based on llama_index, langchain and gradio (as GUI). My code look like this at the moment: import gradio as gr import langchain from langchain.memory import ConversationBufferMemory from langchain.chains import…
Renata Ka
  • 21
  • 2
0
votes
0 answers

Use llama index to reference back to the files which are being used to answer QUERIES

import openai from llama_index import ServiceContext, GPTVectorStoreIndex, LLMPredictor, PromptHelper, SimpleDirectoryReader, load_index_from_storage, StorageContext from langchain import OpenAI import os import re drivepath =…
0
votes
0 answers

How can I load a Loras model from Huggingface's leaderboard?

From open_llm_leaderboard, there are many interesting 30b loras model with extremely good performance But HOW CAN I LOAD IT without adapter_config.json? I am really sorry that I am new to the field, but if I didn't understand it wrongly, with a…
0
votes
0 answers

Unable to read data as Llama index Documents

I'm currently working with llama index trying to parse a column of my pandas dataframe as a Document object with llama index with the final goal of fitting my data into an LLM (I'm using gpt-4-32k). Does anyone know how to do this without explicitly…
0
votes
0 answers

Is llamaindex quantity or quality?

llamaindex is a method of randomly loading a lot of related information, or a method of shaping information so that it is easy for llamaindex to recognize, which is preferable? Currently I'm using llamaindex with 1,000 text files (5,000,000…
Keita
  • 1
0
votes
0 answers

Document Insertion with time-weighted postprocessor (Python) Llama Index (GPT Index)

I want to insert a document (initially text like pdf, docx, etc.) into an existing index w/ Time-Weighted Rerank. The index is already created with metadata for time-stamping, How can the insertion be conducted for any new data(docs) to insert in…
Strike
  • 164
  • 1
  • 13
0
votes
0 answers

Not able to fetch files from a directory using llama-index and qdrant db

I am using qdrant db locally. My Folder is located on /home/komica/git/playbookhub/api directory name data in which I have a demo.txt file. The issue is when I use to fetch this data directory by using llama-index query, I always get the error as…
0
votes
0 answers

Implementing Caching Mechanism for Chatbot Responses in Llamaindex and Langchain

Description: I am currently working on a chatbot implementation for customer queries using Llamaindex and Langchain technologies. My goal is to enhance the chatbot's functionality by incorporating a caching mechanism for frequently asked questions.…