AI Settings API Documentation
GET: Retrieve AnswerAI
Description
This route is used to instruct the AI on how to respond to queries after retrieving relevant content from the vector database.
Method
GET
Query Parameters
sort
(string): The field by which to sort the answerai.page
(number): The page number of the results.limit
(number): The number of items per page.
Response
- Returns a JSON response retrieve with the
baseprompt
andbaseSystemMessage
or an error message.
Status Codes
200 OK
: AnswerAI retrieved successfully.500 Internal Server Error
: Error listing AnswerAI.
Throws
- An error if request validation or AnswerAI retrieval fails.
Example cURL
curl --location 'https://app.ai12z.net/api/projects/{projectId}/aisettings' \
--header 'Authorization: Bearer <YOUR_KEY>' \
--data-urlencode 'sort=name' \
--data-urlencode 'page=1' \
--data-urlencode 'limit=10'
PUT: Update an AnswerAI
Description
This route is used to update an existing relevant content from the vector database.
Method
PUT
Request Body
Example request body:
{
"basePrompt": "updated baseprompt",
"baseSystemMessage": "updated baseSystemMessage"
}
Response
- Returns the updated AnswerAI.
Status Codes
200 OK
: AnswerAI updated successfully.500 Internal Server Error
: Error updating the AnswerAI.
Throws
- An error if request validation or AnswerAI update fails.
Example cURL
curl --location --request PUT 'ttps://app.ai12z.net/api/projects/{projectId}/aisettings' \
--header 'Authorization: Bearer <YOUR_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"basePrompt": "updated baseprompt",
"baseSystemMessage":"updated baseSystemMessage",
}'
PUT: Update ImageAI
Description
This route is used to update the delivers images in response to user queries and interprets images uploaded by users.
Method
PUT
Request Body
Example request body:
{
"imageMinWidth": "updated imageMinwidth"
}
Response
- Returns the updated ImageAI.
Status Codes
200 OK
: ImageAI updated successfully.500 Internal Server Error
: Error updating the ImageAI.
Throws
- An error if request validation or ImageAI update fails.
Example cURL
curl --location --request PUT 'ttps://app.ai12z.net/api/projects/{projectId}/aisettings/imageai' \
--header 'Authorization: Bearer <YOUR_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"imageMinWidth":"updated imageMinwidth"
}'