Token Configuration Guide
A lot of the models available today can be found on HuggingFace. This page describes how to configure HuggingFace token settings for Cortex.
Command Line Interface (CLI)
Basic Usage
cortex config [OPTIONS] [COMMAND]
To display all current configurations
cortex config status
+-----------------------+------------------------+| Config name | Value |+-----------------------+------------------------+| huggingface_token | |+-----------------------+------------------------+
Options
Option | Description | Example |
---|---|---|
-h, --help | Print help message and exit | |
--huggingface_token <token> | Set HuggingFace token | cortex config --huggingface_token token |
Token API Configuration
Endpoints
Get Current Configuration
GET /v1/configs
curl GET http://127.0.0.1:39281/v1/configs
{ "allowed_origins": [ "http://localhost:39281", "http://127.0.0.1:39281", "http://0.0.0.0:39281" ], "cors": true, "huggingface_token": "", "no_proxy": "example.com,::1,localhost,127.0.0.1", "proxy_password": "", "proxy_url": "", "proxy_username": "", "verify_host_ssl": true, "verify_peer_ssl": true, "verify_proxy_host_ssl": true, "verify_proxy_ssl": true}
Update Configuration
PATCH /v1/configs
Updates HuggingFace token configuration settings.
Request Headers
Content-Type: application/json
Request Body
{ "huggingface_token": "token"}
Parameters
Field | Type | Description |
---|---|---|
huggingface_token | string | HuggingFace token to pull models |
Response
{ "config": { "allowed_origins": [ "http://localhost:39281", "http://127.0.0.1:39281", "http://0.0.0.0:39281" ], "cors": true, "huggingface_token": "token" }, "message": "Configuration updated successfully"}