Questions tagged [gpt-index]

8 questions
7
votes
1 answer

How to add 'message history' to llama-index based GPT-3 in Python

I am fairly new to using llama-index library for training GPT-3 as well as using ChatGPT through the standard API (both in Python). I have noticed that standard ChatGPT API i could simply do the following code below to have ChatGPT get message…
Lawrd_Das
  • 71
  • 3
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
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

C# OpenAI API, GPT Index own website instead of database or folder with data, programmatically?

Consider the following code snippet: CompletionRequest completionRequest = new CompletionRequest(); completionRequest.Prompt = query; completionRequest.Model = OpenAI_API.Models.Model.DavinciText; OpenAIAPI openAIAPI = new…
TechManiac
  • 214
  • 3
  • 12
0
votes
1 answer

How to support OpenAI's Chat Completions API format in LlamaIndex?

I'm currently using LlamaIndex for a project, and I'm trying to find a way to support the complex prompt format used by OpenAI's Chat Completions API within the chat engine of LlamaIndex. The OpenAI API uses a list of messages for its prompts, where…
Ray
  • 1
0
votes
0 answers

In llamaindex / gptindex, how do i control number of responses to a query

In the following code def load_index(): # index if dir 'storage' does not exist if not os.path.exists('storage'): print('Building index...') build_index() storage_context =…
piedpiper
  • 1,222
  • 3
  • 14
  • 27
0
votes
1 answer

How to deploy python code to azure function using vs code

My python code uses API call and data path from where it takes the file and convert it into json index file. Then while making the query it returns the answer from that index file. I have tried to deploy the on Azure function using VS code but…
Sam
  • 21
  • 2
0
votes
0 answers

How to pass a prompt template to GPT Index Method

I am trying to connect huggingface model with external data using GPTListIndex. GPTListIndex(documents,llm_predictor=llm_predictor) I want to use a prompt also. Here is prompt template. example_prompt = PromptTemplate( input_variables=["Query",…
Talha Anwar
  • 2,699
  • 4
  • 23
  • 62