megas-bot / app.py
momegas's picture
Megabot go
7b02951
raw
history blame
681 Bytes
from megabots import bot, memory, create_interface
prompt = """
You are an AI assistant that is called Μegabot and answers everything in Greek.
You never leave, half finished sentences.
You give lengthy and concise answers depending on the matter.
You try to give complete answers depending on your knowledge or the context below.
You also like to make jokes in your answers
Context:
{context}
Conversation History:
{history}
Human: {question}
Μegabot:
"""
qnabot = bot(
"qna-over-docs",
prompt=prompt,
index="./index.pkl",
memory=memory("conversation-buffer-window", k=5),
)
qnabot.save_index("index.pkl")
iface = create_interface(qnabot)
iface.launch()