1. Types of Secrets
Supported secret types for Flock:- OpenAI
- Ollama
- Azure
- Anthropic
2. Creating a Secret
Secrets can be created with theCREATE SECRET SQL command. Temporary secrets are stored in memory, while persistent
secrets are stored on disk. If no secret name is provided, DuckDB automatically assigns a default provider name.
2.1 OpenAI API Key
__default_openai.
2.2 Ollama API URL
__default_ollama.
2.3 Azure API Configuration
__default_azure.
2.4 Anthropic API Key
__default_anthropic. The API_VERSION parameter is optional.
3. Persistent Secrets
To persist secrets across DuckDB sessions, useCREATE PERSISTENT SECRET:
3.1 Example for OpenAI (Persistent):
3.2 Example for Ollama (Persistent):
3.3 Example for Azure (Persistent):
3.4 Example for Anthropic (Persistent):
API_VERSION '2024-01-01' to use a custom API version.
4. Deleting Secrets
To delete a secret, use theDROP SECRET command. For default provider secrets, the name will follow the pattern
__default_<provider_name>.
4.1 Deleting Temporary Secrets
To delete a temporary secret, use:__default_<provider_name>, e.g., __default_openai,
__default_ollama, __default_azure, or __default_anthropic.
Example for deleting a default temporary OpenAI secret:
4.2 Deleting Persistent Secrets
To delete a persistent secret, use:__default_<provider_name>, e.g., __default_openai,
__default_ollama, __default_azure, or __default_anthropic.
Example for deleting a default persistent OpenAI secret:

