Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ __pycache__/
# Config files with real API keys (for local testing)
*-config-with-keys*
*-with-keys*
.rocketride/
4 changes: 4 additions & 0 deletions demos/test-config-bad-provider
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Test fixture: unknown provider name should raise an error on load.
provider=opanai
openai_api_key=test-key
model=gpt-4o-mini
9 changes: 7 additions & 2 deletions demos/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@ This suite is not part of default `sbt test`.
## Files

- `tests.nlogox` - Manual test model
- `config.txt` - Local config used by the model
- `config.txt.example` - Template with placeholders for all 6 providers
- `config.txt` - Local config used by the model (gitignored, create from template)

## Prerequisites

1. Build and install the extension
2. Configure valid credentials in `config.txt` for cloud providers, or run Ollama locally
2. Create a local config from the template:
```
cp config.txt.example config.txt
```
Then edit `config.txt`, set `provider=` to your chosen provider, and replace the matching `*_api_key=REPLACE_ME` line with a real key. Or run Ollama locally for a no-key option.
3. Ensure network access for cloud providers

## How To Run
Expand Down
47 changes: 47 additions & 0 deletions demos/tests/config.txt.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# NetLogo LLM Extension — Test Configuration (Template)
#
# Copy this file to `config.txt` in the same directory and fill in
# the API key for whichever provider you want to test:
#
# cp config.txt.example config.txt
#
# `config.txt` is gitignored so your real key stays local.
#
# To switch providers: change `provider=` and `model=` below, then
# uncomment the matching api_key line. Only one provider runs at a time.

provider=openrouter
model=openai/gpt-4o-mini

temperature=0.7
max_tokens=200
timeout_seconds=60

# --- OpenRouter (https://openrouter.ai/keys) ---
openrouter_api_key=REPLACE_ME
# Sample models:
# openai/gpt-4o-mini
# anthropic/claude-3.5-haiku
# deepseek/deepseek-r1

# --- Together AI (https://api.together.ai/settings/api-keys) ---
# together_api_key=REPLACE_ME
# Sample models:
# meta-llama/Llama-3.3-70B-Instruct-Turbo
# deepseek-ai/DeepSeek-R1

# --- OpenAI ---
# openai_api_key=sk-REPLACE_ME
# model: gpt-4o-mini

# --- Anthropic (Claude) ---
# anthropic_api_key=sk-ant-REPLACE_ME
# model: claude-3-5-haiku-latest

# --- Google Gemini ---
# gemini_api_key=REPLACE_ME
# model: gemini-1.5-flash

# --- Ollama (local) ---
# ollama_base_url=http://localhost:11434
# model: llama3.2
Loading
Loading