Chat with GPT
Body
-
model string
Default value is
gpt-3.5-turbo
. -
messages array[object]
At least
1
element. -
internal_functions array[string]
POST
/gpt/chat
curl \
-X POST https://api.itsrose.rest/gpt/chat \
-H "Content-Type: application/json" \
-d '{"model":"gpt-3.5-turbo","messages":[{"name":"Frieren","role":"user","content":"Define love in simple way"}],"internal_functions":["brainly"]}'
Request examples
{
"model": "gpt-3.5-turbo",
"messages": [
{
"name": "Frieren",
"role": "user",
"content": "Define love in simple way"
}
],
"internal_functions": [
"brainly"
]
}
Response examples (200)
{
"status": true,
"message": "success",
"result": {
"model": "string",
"message": {
"role": "assistant",
"content": "string",
"function_call": {
"name": "string",
"arguments": "string"
}
},
"functions": [
{}
]
}
}
Response examples (400)
{
"status": false,
"message": "string",
"result": {}
}
Response examples (401)
{
"status": false,
"message": "string",
"result": {}
}
Response examples (500)
{
"status": false,
"message": "string",
"result": {}
}