File tree Expand file tree Collapse file tree
de/docusaurus-plugin-content-docs/current
fr/docusaurus-plugin-content-docs/current/install
ja/docusaurus-plugin-content-docs/current
zh-Hans/docusaurus-plugin-content-docs/current Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,10 +72,12 @@ export const env = {
7272 } ,
7373 } ,
7474 openai : {
75- enable : Boolean ( process . env . OPENAI_API_KEY ) ,
76- baseUrl : process . env . OPENAI_BASE_URL ,
77- apiKey : process . env . OPENAI_API_KEY ,
78- modelName : process . env . OPENAI_MODEL_NAME ?? 'gpt-4o' ,
75+ // This only work on tianji internal usage, which call ai feature by tianji.
76+ // add `SHARED_` prefix to avoid exposing to other OpenAI instances.
77+ enable : Boolean ( process . env . SHARED_OPENAI_API_KEY ) ,
78+ baseUrl : process . env . SHARED_OPENAI_BASE_URL ,
79+ apiKey : process . env . SHARED_OPENAI_API_KEY ,
80+ modelName : process . env . SHARED_OPENAI_MODEL_NAME ?? 'gpt-4o' ,
7981 } ,
8082 allowRegister : checkEnvTrusty ( process . env . ALLOW_REGISTER ) ,
8183 allowOpenapi : checkEnvTrusty ( process . env . ALLOW_OPENAPI ?? 'true' ) ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ The Tianji API uses **Bearer Token** authentication. You need to include your AP
1313### HTTP Header Format
1414
1515``` http
16- Authorization: Bearer YOUR_API_KEY
16+ Authorization: Bearer < YOUR_API_KEY>
1717```
1818
1919## Obtaining API Keys
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ Test your API connection using curl:
5454
5555``` bash
5656curl -X GET " https://your-tianji-domain.com/open/global/config" \
57- -H " Authorization: Bearer YOUR_API_KEY" \
57+ -H " Authorization: Bearer < YOUR_API_KEY> " \
5858 -H " Content-Type: application/json"
5959```
6060
Original file line number Diff line number Diff line change @@ -62,9 +62,9 @@ Tianji supports various environment variables to customize its behavior. You can
6262
6363| Variable | Description | Default | Example |
6464| --- | --- | --- | --- |
65- | ` OPENAI_API_KEY ` | OpenAI API key | - | ` your-openai-api-key ` |
66- | ` OPENAI_BASE_URL ` | Custom OpenAI API URL | - | ` https://api.openai.com/v1 ` |
67- | ` OPENAI_MODEL_NAME ` | OpenAI model to use | ` gpt-4o ` | ` gpt-3.5-turbo ` |
65+ | ` SHARED_OPENAI_API_KEY ` | OpenAI API key | - | ` your-openai-api-key ` |
66+ | ` SHARED_OPENAI_BASE_URL ` | Custom OpenAI API URL | - | ` https://api.openai.com/v1 ` |
67+ | ` SHARED_OPENAI_MODEL_NAME ` | OpenAI model to use | ` gpt-4o ` | ` gpt-3.5-turbo ` |
6868| ` DEBUG_AI_FEATURE ` | Debug AI features | ` false ` | ` true ` |
6969
7070## Sandbox Configuration
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ Die Tianji-API verwendet die **Bearer-Token**-Authentifizierung. Sie müssen Ihr
1313### HTTP-Header-Format
1414
1515``` http
16- Authorization: Bearer YOUR_API_KEY
16+ Authorization: Bearer < YOUR_API_KEY>
1717```
1818
1919## Erhalt von API-Schlüsseln
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ Testen Sie Ihre API-Verbindung mit curl:
5454
5555``` bash
5656curl -X GET " https://your-tianji-domain.com/open/global/config" \
57- -H " Authorization: Bearer YOUR_API_KEY" \
57+ -H " Authorization: Bearer < YOUR_API_KEY> " \
5858 -H " Content-Type: application/json"
5959```
6060
Original file line number Diff line number Diff line change @@ -62,9 +62,9 @@ Tianji unterstützt verschiedene Umgebungsvariablen zur Anpassung des Verhaltens
6262
6363| Variable | Beschreibung | Standard | Beispiel |
6464| --- | --- | --- | --- |
65- | ` OPENAI_API_KEY ` | OpenAI API-Schlüssel | - | ` your-openai-api-key ` |
66- | ` OPENAI_BASE_URL ` | Benutzerdefinierte OpenAI API-URL | - | ` https://api.openai.com/v1 ` |
67- | ` OPENAI_MODEL_NAME ` | Zu verwendendes OpenAI-Modell | ` gpt-4o ` | ` gpt-3.5-turbo ` |
65+ | ` SHARED_OPENAI_API_KEY ` | OpenAI API-Schlüssel | - | ` your-openai-api-key ` |
66+ | ` SHARED_OPENAI_BASE_URL ` | Benutzerdefinierte OpenAI API-URL | - | ` https://api.openai.com/v1 ` |
67+ | ` SHARED_OPENAI_MODEL_NAME ` | Zu verwendendes OpenAI-Modell | ` gpt-4o ` | ` gpt-3.5-turbo ` |
6868| ` DEBUG_AI_FEATURE ` | AI-Funktionen debuggen | ` false ` | ` true ` |
6969
7070## Sandbox-Konfiguration
Original file line number Diff line number Diff line change @@ -62,9 +62,9 @@ Tianji prend en charge diverses variables d'environnement pour personnaliser son
6262
6363| Variable | Description | Défault | Exemple |
6464| --- | --- | --- | --- |
65- | ` OPENAI_API_KEY ` | Clé API OpenAI | - | ` votre-clé-api-openai ` |
66- | ` OPENAI_BASE_URL ` | URL API OpenAI personnalisée | - | ` https://api.openai.com/v1 ` |
67- | ` OPENAI_MODEL_NAME ` | Modèle OpenAI à utiliser | ` gpt-4o ` | ` gpt-3.5-turbo ` |
65+ | ` SHARED_OPENAI_API_KEY ` | Clé API OpenAI | - | ` votre-clé-api-openai ` |
66+ | ` SHARED_OPENAI_BASE_URL ` | URL API OpenAI personnalisée | - | ` https://api.openai.com/v1 ` |
67+ | ` SHARED_OPENAI_MODEL_NAME ` | Modèle OpenAI à utiliser | ` gpt-4o ` | ` gpt-3.5-turbo ` |
6868| ` DEBUG_AI_FEATURE ` | Déboguer les fonctionnalités AI | ` false ` | ` true ` |
6969
7070## Configuration du Bac à Sable
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ Tianji APIは**Bearer Token**認証を使用します。各APIリクエストの
1313### HTTPヘッダーフォーマット
1414
1515``` http
16- Authorization: Bearer YOUR_API_KEY
16+ Authorization: Bearer < YOUR_API_KEY>
1717```
1818
1919## APIキーの取得
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ curl を使用して API 接続をテストします:
5454
5555``` bash
5656curl -X GET " https://your-tianji-domain.com/open/global/config" \
57- -H " Authorization: Bearer YOUR_API_KEY" \
57+ -H " Authorization: Bearer < YOUR_API_KEY> " \
5858 -H " Content-Type: application/json"
5959```
6060
You can’t perform that action at this time.
0 commit comments