Last active
October 23, 2023 21:57
-
-
Save bonadio/7cdb21101870dd1e5022dc34960b4ac5 to your computer and use it in GitHub Desktop.
API bot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST https://algumservidor/api_send/v1/chat | |
{ | |
"client_id": 123 # identificador do cliente | |
"app_id": 123 # identificador do app | |
"action": "INSERT", # INSERT REMOVE ASK | |
"id": "12", # identificador para INSERT ou REMOVE | |
"text": "texto", # se for REMOVE em branco | |
"secret": "codigo de segurança" # código de segurança que vamos compartilhar | |
"api_key": "open_ai_api_key" # a chave da API | |
} | |
A resposta será | |
{ | |
"status": "OK", # OK ou ERROR se for ERROR no text tera a mensagem | |
"text": "texto da resposta", # | |
"result_action": "ACTION_RESPONSE", # ACTION_RESPONSE "estamos respondendo" ACTION_NO_RESPONSE nao achamos resposta | |
"tokens": [ # tokens vai ser um array com MODELO e QTD informando a quantidade de tokens usada em cada chamada | |
{ | |
"model": "GPT-3.5", | |
"qtd": 300 | |
}, | |
{ | |
"model": "OPENAI-EMBEDDING", | |
"qtd": 300 | |
}, | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment