Move API credentials to .env and set gpt-5.6-luna model
- Load OPENAI_API_KEY and OPENAI_BASE_URL from gitignored .env (repo-root, CWD-independent) - Fix command explanation to use the configured model instead of hardcoded gpt-4o-mini - Update default model and fallbacks to gpt-5.6-luna - Document .env-based configuration in READMEs
This commit is contained in:
@@ -19,7 +19,7 @@ Arguments:
|
||||
--theme <theme> : Set syntax highlighting theme (e.g., monokai, github-dark)
|
||||
|
||||
Current configuration per edison.yaml:
|
||||
* Model : gpt-4o-mini
|
||||
* Model : gpt-5.6-luna
|
||||
* Temperature : 0
|
||||
* Max. Tokens : 500
|
||||
* Safety : on
|
||||
@@ -64,13 +64,27 @@ cd command-assistant
|
||||
.\install_edison.bat
|
||||
```
|
||||
|
||||
## OpenAI API Key Configuration
|
||||
## API Configuration
|
||||
|
||||
Configure your OpenAI API key using one of these methods:
|
||||
Edison needs an API key (and, when using a proxy, a base URL) to talk to your model backend. The recommended way is a `.env` file in the repository root, which is gitignored and therefore never checked in:
|
||||
|
||||
- Environment variable: `export OPENAI_API_KEY=<yourkey>` (Linux/macOS) or `$env:OPENAI_API_KEY="<yourkey>"` (Windows)
|
||||
- Create a file at `~/.openai.apikey` with just the key
|
||||
- Add the key to the `edison.yaml` configuration file
|
||||
```bash
|
||||
# .env (do not commit this file)
|
||||
OPENAI_API_KEY="your-api-key"
|
||||
OPENAI_BASE_URL="https://api.openai.com/v1"
|
||||
```
|
||||
|
||||
Copy `.env.example` to get started:
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
You can also provide the key using any of these methods (in order of precedence):
|
||||
|
||||
- `OPENAI_API_KEY` / `OPENAI_BASE_URL` environment variables (or in `.env`)
|
||||
- A file at `~/.openai.apikey` containing just the key
|
||||
- The `openai_api_key` / `base_url` entries in `edison.yaml`
|
||||
|
||||
## Usage Examples
|
||||
|
||||
|
||||
Reference in New Issue
Block a user