mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-16 18:52:12 +03:00
33eec50a09
moved to mintlify
43 lines
1.4 KiB
Plaintext
43 lines
1.4 KiB
Plaintext
---
|
|
sidebar_position: 1
|
|
title: Create a brain
|
|
---
|
|
|
|
To create a brain, you need to make a POST request to the `/brains/` endpoint. This endpoint requires authentication, and you need to provide the following parameters in the request body:
|
|
|
|
- `name` (Optional): The name of the brain. If not provided, it defaults to "Default brain."
|
|
|
|
- `description` (Optional): A description of the brain. If not provided, it defaults to "This is a description."
|
|
|
|
- `status` (Optional): The status of the brain, which can be "private" or another value of your choice. If not provided, it defaults to "private."
|
|
|
|
- `model` (Optional): The model to use for the brain.
|
|
|
|
- `temperature` (Optional): The temperature setting for the brain. If not provided, it defaults to 0.0.
|
|
|
|
- `max_tokens` (Optional): The maximum number of tokens for the output. If not provided, it defaults to 256.
|
|
|
|
- `openai_api_key` (Optional): An API key for OpenAI. If not provided, it defaults to None.
|
|
|
|
- `prompt_id` (Optional): A UUID associated with a prompt.
|
|
|
|
Here's an example request using `curl`:
|
|
|
|
```http
|
|
POST /brains/ HTTP/1.1
|
|
Host: your-api-url
|
|
Authorization: Bearer YOUR_ACCESS_TOKEN
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"name": "My Custom Brain",
|
|
"description": "This is my brain description",
|
|
"status": "private",
|
|
"model": "gpt-3.5-turbo",
|
|
"temperature": 0.8,
|
|
"max_tokens": 512,
|
|
"openai_api_key": "YOUR_OPENAI_API_KEY",
|
|
"prompt_id": "YOUR_PROMPT_UUID"
|
|
}
|
|
```
|