# The response from original prompt from llama_index.llms import OpenAI from llama_index.prompts import PromptTemplate llm = OpenAI(model="gpt-3.5-turbo-16k") template = ( "We have provided context information below. n" "---------------------n" "{context_str}" "n---------------------n" "Given this information, please answer the question: {query_str}n" ) qa_template = PromptTemplate(template) # you can create text prompt (for completion API) prompt = qa_template.format(context_str="nn".join(context_list), query_str=question) response = llm.complete(prompt) print(str(response))