-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
34 lines (28 loc) · 973 Bytes
/
app.py
File metadata and controls
34 lines (28 loc) · 973 Bytes
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
32
33
34
from mychat.config import load_config, CONFIG
from mychat.app import run_app
from mychat.chatter import Chatter, ChatHistoryManager
from mychat.note_manager import NoteManager
from mychat.notedb import NoteDBClient
from mychat.vecdb import VecDBClient
if __name__ == "__main__":
# Load configuration file
load_config("config.toml")
chatter = Chatter(
profile=(
"You are a helpful assistant who is going to "
"answer my question through chatting with me."
),
chat_history_manager=ChatHistoryManager(),
note_manager=NoteManager(
note_db_client=NoteDBClient.from_connection_string(
CONFIG.MONGO_CONNECTION_STRING
),
vec_db_client=VecDBClient.from_connection_string(
CONFIG.QDRANT_CONNECTION_STRING
)
),
num_notes_limit=5,
stream=True
)
# run the app
run_app(chatter)