Finished backend

This commit is contained in:
youssefsoli
2023-11-27 03:56:36 -05:00
parent 161dcd3332
commit 91f5d8d755
4 changed files with 273 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
> For the demo, language ∈ {EN_JA, EN_ZH-CN}
POST /ai-mark {
question: str,
user_answer: str,
expected: str,
chapter: str,
language: str
}
-> {correct: bool, reason: str}
POST /human-chat {
target_name: str,
target_hobbies: list\[str],
history: list\[{from\_me: bool, msg: str}],
language: str
}
-> {msg: str}
> Chat histories will be stored in localStorage
POST /recognize (Body is an audio file)
-> {text: str}
POST /character-chat {
character: str
history: list\[{from_me: bool, msg: str}]
language: str
}
-> {msg: str, audio: UUID}
GET /audio/{UUID}
Run `openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365` to generate a self-signed certificate for HTTPS.