Skip to main content
warning

🚧 Cortex.cpp is currently under development. Our documentation outlines the intended behavior of Cortex, which may not yet be fully implemented in the codebase.

Token Configuration Guide

This document describes how to configure HuggingFace token settings for Cortex.

Command Line Interface (CLI)​

Basic Usage​


cortex config [OPTIONS] [COMMAND]

Commands​

  • status: Display all current configurations

cortex config status

Example Output:


+-----------------------+------------------------+
| Config name | Value |
+-----------------------+------------------------+
| huggingface_token | |
+-----------------------+------------------------+

Options​

OptionDescriptionExample
-h, --helpPrint help message and exit
--huggingface_token <token>Set HuggingFace tokencortex config --huggingface_token token

Token API Configuration​

Endpoints​

Get Current Configuration​


GET /v1/configs

Retrieves the current configuration settings.

Response​

{
"allowed_origins": [
"http://localhost:39281",
"http://127.0.0.1:39281",
"http://0.0.0.0:39281"
],
"cors": true,
"huggingface_token": ""
}

Update Configuration​


PATCH /v1/configs

Updates HuggingFace token configuration settings.

Request Headers​

Content-Type: application/json

Request Body​

{
"huggingface_token": "token"
}

Parameters​
FieldTypeDescription
huggingface_tokenstringHuggingFace 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"
}