removed unused code
This commit is contained in:
parent
fb42ee0eee
commit
395de571a4
9
main.py
9
main.py
@ -1,4 +1,4 @@
|
|||||||
from llama_index import (SimpleDirectoryReader, ServiceContext, StorageContext, PromptTemplate,
|
from llama_index import (SimpleDirectoryReader, ServiceContext, StorageContext,
|
||||||
load_index_from_storage, Document, set_global_service_context)
|
load_index_from_storage, Document, set_global_service_context)
|
||||||
from llama_index.node_parser import SimpleNodeParser
|
from llama_index.node_parser import SimpleNodeParser
|
||||||
from llama_index import VectorStoreIndex
|
from llama_index import VectorStoreIndex
|
||||||
@ -37,13 +37,6 @@ else:
|
|||||||
storage_context = StorageContext.from_defaults(persist_dir="./index")
|
storage_context = StorageContext.from_defaults(persist_dir="./index")
|
||||||
index = load_index_from_storage(storage_context)
|
index = load_index_from_storage(storage_context)
|
||||||
|
|
||||||
custom_prompt = PromptTemplate(
|
|
||||||
"----------------\n"
|
|
||||||
"Chat history: {chat_history}\n"
|
|
||||||
"----------------\n"
|
|
||||||
"Please answer this question by referring to the podcast: {question}"
|
|
||||||
)
|
|
||||||
|
|
||||||
chat_text_qa_msgs = [
|
chat_text_qa_msgs = [
|
||||||
ChatMessage(
|
ChatMessage(
|
||||||
role=MessageRole.SYSTEM,
|
role=MessageRole.SYSTEM,
|
||||||
|
Loading…
Reference in New Issue
Block a user