-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.env
More file actions
80 lines (64 loc) · 3.67 KB
/
example.env
File metadata and controls
80 lines (64 loc) · 3.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Example environment configuration for OpenAI API Test Scripts
# Копируйте этот файл и переименуйте в свой .env файл (например, openrouter.env, openai.env)
# Затем заполните реальными значениями
# ============================================================
# ОБЯЗАТЕЛЬНЫЕ ПАРАМЕТРЫ
# ============================================================
# API ключ для аутентификации (ОБЯЗАТЕЛЬНО)
# Для OpenRouter: получите ключ на https://openrouter.ai/keys
# Для OpenAI: получите ключ на https://platform.openai.com/api-keys
export OPENAI_API_KEY="your-api-key-here"
# ============================================================
# ОПЦИОНАЛЬНЫЕ ПАРАМЕТРЫ
# ============================================================
# Базовый URL API (по умолчанию: https://api.openai.com/v1)
# Для OpenRouter используйте: https://openrouter.ai/api/v1
export OPENAI_BASE_URL="https://api.openai.com/v1"
# Модель для использования (по умолчанию: gpt-5)
# Примеры моделей:
# OpenAI: gpt-4, gpt-3.5-turbo
# OpenRouter: openai/gpt-4o-2024-11-20, anthropic/claude-3.5-sonnet, google/gemini-pro
export OPENAI_MODEL="gpt-5"
# Максимальное количество токенов в ответе (по умолчанию: 1000)
# Увеличьте для более длинных ответов
# Задайте -1, чтобы не передавать max_tokens в запросы API
export OPENAI_API_MAX_TOKENS=1000
# Включить streaming режим для Chat Completions API (по умолчанию: false)
# В streaming режиме ответ выводится в реальном времени по мере генерации
export OPENAI_API_STREAMING=false
# Переопределить формат запросов для Responses API ("openai" или "openrouter")
export RESPONSES_API_TYPE="openai"
# ============================================================
# ПРИМЕРЫ КОНФИГУРАЦИЙ ДЛЯ РАЗНЫХ ПРОВАЙДЕРОВ
# ============================================================
# --- OpenRouter (рекомендуется для тестирования) ---
# export OPENAI_API_KEY="sk-or-v1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# export OPENAI_BASE_URL="https://openrouter.ai/api/v1"
# export OPENAI_MODEL="openai/gpt-4o-2024-11-20"
# export OPENAI_API_MAX_TOKENS=1000
# --- OpenAI ---
# export OPENAI_API_KEY="sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# export OPENAI_BASE_URL="https://api.openai.com/v1"
# export OPENAI_MODEL="gpt-4"
# export OPENAI_API_MAX_TOKENS=1000
# --- Anthropic Claude (через OpenRouter) ---
# export OPENAI_API_KEY="sk-or-v1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# export OPENAI_BASE_URL="https://openrouter.ai/api/v1"
# export OPENAI_MODEL="anthropic/claude-3.5-sonnet"
# export OPENAI_API_MAX_TOKENS=2000
# --- Google Gemini (через OpenRouter) ---
# export OPENAI_API_KEY="sk-or-v1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# export OPENAI_BASE_URL="https://openrouter.ai/api/v1"
# export OPENAI_MODEL="google/gemini-pro"
# export OPENAI_API_MAX_TOKENS=1000
# --- MiniMax ---
# export OPENAI_API_KEY="your-minimax-api-key"
# export OPENAI_BASE_URL="https://api.minimax.io/v1"
# export OPENAI_MODEL="MiniMax-M2"
# export OPENAI_API_MAX_TOKENS=-1
# export OPENAI_API_STREAMING=false
# --- Кастомный провайдер ---
# export OPENAI_API_KEY="your-custom-api-key"
# export OPENAI_BASE_URL="https://your-provider.com/v1"
# export OPENAI_MODEL="custom-model-name"
# export OPENAI_API_MAX_TOKENS=1000