Questions tagged [llama-index]

112 questions
1
vote
1 answer

Use LlamaIndex to load custom LLM model

I am testing LlamaIndex using the Vicuna-7b or 13b models. I have encountered an issue where the model's memory usage appears to be normal when loaded into CPU memory. However, when I place it on the GPU, the VRAM usage seems to double. This…
1
vote
1 answer

Llama_index issue behind HTTP request

I'm having an issue using Llama_Index to use an index previously generated for custom content ChatGPT queries. I generated the index with the following code: from llama_index import SimpleDirectoryReader, GPTListIndex, readers, GPTSimpleVectorIndex,…
Diego Satizabal
  • 119
  • 1
  • 7
1
vote
1 answer

Llamaindex cannot persist index to Chroma DB and load later

I am creatign 2 apps using Llamaindex. One allows me to create and store indexes in Chroma DB and other allows me to later load from this storage and query. Here is my code to load and persist data to ChromaDB: import chromadb from chromadb.config…
user2966197
  • 2,793
  • 10
  • 45
  • 77
1
vote
1 answer

How can we add a list of documents to an existing index in llama-index?

I have an existing index that is created using GPTVectorStoreIndex. However, when I am trying to add a new document to the existing index using the insert method, I am getting the following error : AttributeError: 'list' object has no attribute…
Vivek
  • 124
  • 14
1
vote
1 answer

can we have memory preservation for chatting in llama-index?

I would like to know whether llama-index can be used for creating a custom chatgpt based on the documentation or not. I have an ample amount of data, however, I want to retain context, and add answer the questions accordingly. Is it possible to do…
Vivek
  • 124
  • 14
1
vote
0 answers

Is gpt_index override with llama_index?

Recently I was working with one of my old code. While running it, it throws me an error msg. from gpt_index import SimpleDirectoryReader, GPTListIndex, GPTSimpleVectorIndex Error : ImportError: cannot import name 'BaseLanguageModel' from…
Yugal
  • 21
  • 6
1
vote
1 answer

llama_index with LLM doing out of context answering

I am using llama_index with custom LLM. LLM I have used is open assistant Pythia model. My code : import os from llama_index import ( GPTKeywordTableIndex, SimpleDirectoryReader, LLMPredictor, ServiceContext, PromptHelper ) from…
Ankit Bansal
  • 2,162
  • 8
  • 42
  • 79
1
vote
1 answer

llama-index unstructured simple directory reader not working

I am trying to use Unstrcutred.io version of llama-index as defined here I have a pdf file and a html file in my data directory and when I execute, I get following error - File "main.py", line 199, in lddataV2 SimpleDirectoryReader =…
user2966197
  • 2,793
  • 10
  • 45
  • 77
1
vote
1 answer

'PandasExcelReader' object has no attribute '_concat_rows' in llama-index excel reader

I am trying to read an excel file with multiple sheets using llama-index. Here is my code: from pathlib import Path from llama_index import download_loader PandasExcelReader = download_loader("PandasExcelReader") loader =…
user2966197
  • 2,793
  • 10
  • 45
  • 77
1
vote
1 answer

What's the principles of llama index's similarity_top_k?

In the llama index, if the value of similarity_top_k is set to be very large, such as the number of all blocks, is this equivalent to feeding the entire document to GPT? Will this not exceed the maximum tokens limit? enter image description…
pkubob
  • 11
  • 1
1
vote
0 answers

Pytorch - Intent creation data

I am trying to create a local chatbot based on: existing models (french language) customized models (custom confidential texts that I need to train) As pythonic, PyTorch seems to be perfect with TorchText. I am trying to reproduce the same kind of…
emilie zawadzki
  • 2,035
  • 1
  • 18
  • 25
1
vote
0 answers

How can I solve a attribute error in llama_index in google colab

AttributeError Traceback (most recent call last) in () ----> 1 ask_ai() 2 frames /usr/local/lib/python3.10/dist-packages/llama_index/indices/loading.py in load_indices_from_storage(storage_context,…
chris k
  • 11
  • 1
1
vote
1 answer

How can I use GPU in GPTVectorStoreIndex

I am working on a project where I want to train/fine-tune chatgpt like on my custom model, and for the same, I am using the below mentioned code. I am able to get the output, however, I want to use GPU for a better speed. from gpt_index import…
Vivek
  • 124
  • 14
1
vote
0 answers

Llama_index index.query returns proper response when .py file is run via CLI but return "None" when used with (Django)api call

I am trying to het a response from openai. This works fine when I run the file form the CLI.(see code below) Because it prints the response to the command line. from django.views.decorators.csrf import csrf_exempt from llama_index import…
1
vote
2 answers

How to return the result of llama_index's index.query(query, streaming=True)?

I am trying to return the result of llama_index's index.query(query, streaming=True). But not sure how to do it. This one obviously doesn't work. index = GPTSimpleVectorIndex.load_from_disk(index_file) return index.query(query,…