File size: 674 Bytes
7b02951 76fe07e 7b02951 76fe07e 7b02951 76fe07e 7b02951 a9482b7 7b02951 76fe07e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
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,
memory=memory("conversation-buffer-window", k=5),
verbose=True,
)
qnabot.save_index("index.pkl")
iface = create_interface(qnabot)
iface.launch()
|