Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -62,7 +62,11 @@ def get_chat_history(chat_messages):
|
|
62 |
chat_history = []
|
63 |
for message in chat_messages:
|
64 |
chat_history.append(ChatMessage(content=message.content, role=message.role))
|
65 |
-
return chat_history[-
|
|
|
|
|
|
|
|
|
66 |
|
67 |
@app.post('/request')
|
68 |
def request(req: Request):
|
|
|
62 |
chat_history = []
|
63 |
for message in chat_messages:
|
64 |
chat_history.append(ChatMessage(content=message.content, role=message.role))
|
65 |
+
return chat_history[-6:]
|
66 |
+
|
67 |
+
@app.get("/")
|
68 |
+
def index():
|
69 |
+
return {"content":"Chatbot NSI"}
|
70 |
|
71 |
@app.post('/request')
|
72 |
def request(req: Request):
|