HTTP REST Chat Bot on A State-of-the-Art Large-scale Pretrained Response generation model (DialoGPT)
DialoGPT is a SOTA large-scale pretrained dialogue response generation model for multiturn conversations. The human evaluation results indicate that the response generated from DialoGPT is comparable to human response quality under a single-turn conversation Turing test. The model is trained on 147M multi-turn dialogue from Reddit discussion thread.
Server default start host 127.0.0.1 and port 5000
At the first launch, the 1,34 GB model will be downloaded.
Endpoint bot message:
class Message(BaseModel):
user_uid: str
message: str
# Send post message to bot
@app.post("bot/message/")
def get_message(message: Message):
response = bot.get_message(message.message, message.user_uid)
return {"response": response}message - user text message user_uid - unique user id (for chat history)
POST message:
{
"user_uid": "123456",
"message": "How are you?"
}Response:
{
"response": "I'm good, how are you?"
}