Skip to content

Commit 7edda6f

Browse files
committed
chore: update config settings
1 parent 886744d commit 7edda6f

File tree

8 files changed

+1481
-737
lines changed

8 files changed

+1481
-737
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ Thumbs.db
1919
# Logs
2020
*.log
2121
samples/*.json
22+
23+
# Configuration files (may contain sensitive API keys)
24+
config/providers.toml
25+
config/*.toml
26+
!config/*.toml.example

README.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,24 +122,37 @@ Options:
122122
## 🔧 Configuration
123123

124124
### Provider Configuration (Optional)
125-
Create `config/providers.toml` file:
125+
126+
**Step 1: Create your configuration file**
127+
```bash
128+
# Copy the example configuration file
129+
cp config/providers.toml.example config/providers.toml
130+
131+
# Edit with your settings
132+
nano config/providers.toml # or use your preferred editor
133+
```
134+
135+
**Step 2: Configuration file format**
126136
```toml
127-
[ppinfra]
137+
# config/providers.toml
138+
[providers.ppinfra]
128139
api_url = "https://api.ppinfra.com/openai/v1/models"
129140
rate_limit = 10
130141
timeout = 30
131142

132-
[openrouter]
143+
[providers.openrouter]
133144
api_url = "https://openrouter.ai/api/v1/models"
134-
api_key_env = "OPENROUTER_API_KEY"
135145
rate_limit = 5
136146

137-
[openai]
138-
api_url = "https://api.openai.com/v1/models"
139-
api_key_env = "OPENAI_API_KEY" # OpenAI requires API key
140-
rate_limit = 20
147+
[providers.gemini]
148+
api_url = "https://generativelanguage.googleapis.com/v1beta/openai/models"
149+
api_key_env = "GEMINI_API_KEY" # or use api_key = "your-key"
150+
rate_limit = 10
151+
timeout = 60
141152
```
142153

154+
**🔒 Security Note**: The actual `config/providers.toml` file is ignored by git to prevent accidental API key commits. Always use the example file as a template.
155+
143156
### API Key Configuration
144157

145158
The tool supports flexible API key configuration with multiple methods and clear priority ordering:
@@ -154,8 +167,13 @@ export GEMINI_API_KEY="your-key-here"
154167
```
155168

156169
**Method 2: Configuration File**
170+
```bash
171+
# First, copy the example configuration
172+
cp config/providers.toml.example config/providers.toml
173+
```
174+
157175
```toml
158-
# config/providers.toml
176+
# config/providers.toml (ignored by git for security)
159177
[providers.gemini]
160178
api_url = "https://generativelanguage.googleapis.com/v1beta/openai/models"
161179
# Option A: Use default environment variable
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
# PublicProviderConf Configuration File
1+
# PublicProviderConf Configuration File Example
2+
#
3+
# SECURITY WARNING: This is an example file!
4+
# 1. Copy this file to 'providers.toml' in the same directory
5+
# 2. Edit 'providers.toml' with your actual settings and API keys
6+
# 3. The actual 'providers.toml' file is ignored by git to prevent API key leaks
7+
#
8+
# Usage: cp config/providers.toml.example config/providers.toml
9+
#
210
# This file allows you to customize provider settings and API keys
311

412
[providers.ppinfra]

dist/all.json

Lines changed: 883 additions & 531 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)