Questions tagged [llama-index]

112 questions
0
votes
1 answer

ImportError: cannot import name 'CustomLLM' from 'llama_index.llms'

I'm having difficulties to work with llama_index. I want to load a custom LLM to use it. Fortunately, they have the exact example for my need on their documentation, unfortunately, it does not work! They have these imports in their example: from…
Peyman
  • 3,097
  • 5
  • 33
  • 56
0
votes
0 answers

Llama_index One of nodes or index_struct must be provided

I am getting the same error every time. I have tried a lot of solutions but i cant get it to work. I am using the new version of llama_index v=0.6.35 i believe. I always get the following error: ** Error: One of nodes or index_struct must be…
Fran ETH
  • 23
  • 1
  • 6
0
votes
0 answers

llama_index's query answer returns None for streaming=True

I am trying to understand how the OpenAI streaming works using LlamaIndex. Specifically, looking at this tutorial: https://gpt-index.readthedocs.io/en/latest/how_to/customization/streaming.html I'm trying to adapt this other tutorial on 10K analysis…
professorDante
  • 2,290
  • 16
  • 26
0
votes
0 answers

How to improve the output of fine tuned Open Llama 7b model for text generation?

I am trying to fine tune a openllama model with huggingface's peft and lora. I fine tuned the model on a specific dataset. However, the output from the model.generate() is very poor for the given input. When I give a whole sentence form the dataset…
0
votes
0 answers

Python: Extracting multiple unique source documents from query engine response

I'm working on a project involving the llama_index library where I'm using an instance of a query engine to retrieve a response to a query. The response, an instance of Response class, is expected to contain a list of source nodes, each representing…
AuroraS
  • 59
  • 8
0
votes
1 answer

How to download the llama parameters?

I am working with pyllama but had some problems. I simply do what they said on https://github.com/juncongmoo/pyllama: python -m llama.download --model_size 7B It said ❤️ Resume download is supported. You can ctrl-c and rerun the program to resume…
Zizheng Yang
  • 141
  • 1
  • 12
0
votes
0 answers

How to use LangChain to store, load, and query Loaders on LlamaHub?

Can loaders on LlamaHub only use LlamaIndex? How can LangChain be used to store, load, and query it? For example, Mongo Loader. I saw on LlamaHub that it seems that all the examples use LlamaIndex. So what can LlamaHub provide for LangChain? If…
chenkun
  • 45
  • 6
0
votes
1 answer

How to use LangChain to load the index generated by LlamaIndex and perform a query?

I used LlamaIndex to generate an index for a section of text, which is stored in the myindex folder. How should I use LangChain to load it and query it? At present, I can only use LlamaIndex for querying, but this will lack the functionality of…
chenkun
  • 45
  • 6
0
votes
0 answers

Can't load S3 index file using Llama Index

I am trying to load a Llama index file that I already created and saved to S3. This is the code sample provided by the Llama Index docs (https://gpt-index.readthedocs.io/en/latest/how_to/storage/save_load.html). However, when I use this code to…
beachCode
  • 3,202
  • 8
  • 36
  • 69
0
votes
1 answer

Error with query engine (Python, OpenAI, Pinecone, Llama_Index)

I was using an old version of llama_index for a while, I just updated the package and a lot of syntax changed... I am currently trying to use Pinecode for vector indexes and OpenAI for embeddings and completion. This is my code: with open(file_path,…
0
votes
0 answers

Llamaindex query working in windows but failing in linux

This code works fine in windows but the same fails in Linux. I get RetryError[] error in linux. I have no idea why this is the case. from llama_index import SimpleDirectoryReader,…
0
votes
0 answers

Understanding parameters in LlamaIndex's prompt_helper and reducing token usage

I need a clear explanation about the parameters of the prompt_helper in LlamaIndex. Unfortunately the documentation about this is very short. I would like to understand the actual role of each parameter in creating the index. My goal is to reduce…
Ire00
  • 79
  • 6
0
votes
0 answers

How to limit gpt to provide answers from index created by llamaindex without hallucinations, but also give good responses?

I'm trying to leverage the openAI gpt API to create a custom site that would be able to make brand recommendations based on users questions. Some examples of users questions are: Which coffee brands offer organic or fair trade options? I'm…
0
votes
1 answer

use llama index to create embeddings for commercial pipeline

I have the the python 3 code below. In the code I am using llama_index from meta to create an index object from my own text corpus. I'm then passing queries to that index object to get responses back from openai's chatgpt, using my additional text…
user3476463
  • 3,967
  • 22
  • 57
  • 117
0
votes
0 answers

Why does llama return None when response_mode is no_text?

When I query using a LlaMA index, it returns a JSON object that has the response for the query and the source nodes (with the score) it used to generate an answer. But it not work. engine = RetrieverQueryEngine.from_args(retriever, service_context, …
bai you
  • 41
  • 4