From a6b38c54ee72cbae1d696b02f32ad487391a5dfe Mon Sep 17 00:00:00 2001 From: CaptainJack2491 Date: Thu, 26 Feb 2026 15:29:02 +0000 Subject: chore: add .env.example + config.yaml.example, gitignore config.yaml - Create .env.example with placeholder keys for all providers - Create config.yaml.example with clean reference config - Add config.yaml and judge_logs/ to .gitignore - Load .env in judge.py for standalone usage --- .env.example | 17 +++++++++ .gitignore | 3 ++ config.yaml | 104 ---------------------------------------------------- config.yaml.example | 68 ++++++++++++++++++++++++++++++++++ src/judge.py | 7 ++++ 5 files changed, 95 insertions(+), 104 deletions(-) create mode 100644 .env.example delete mode 100644 config.yaml create mode 100644 config.yaml.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..fcb5823 --- /dev/null +++ b/.env.example @@ -0,0 +1,17 @@ +# API Keys for Experiment Providers +# Copy this file to .env and fill in your keys. + +# OpenAI +# OPENAI_API_KEY=sk-... + +# Google (Gemini) +# GOOGLE_API_KEY=... + +# OpenRouter +# OPENROUTER_API_KEY=sk-or-v1-... + +# Anthropic (required for judging) +# ANTHROPIC_API_KEY=sk-ant-... + +# Groq +# GROQ_API_KEY=gsk_... diff --git a/.gitignore b/.gitignore index 480213f..254545f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,9 +6,12 @@ __pycache__/ *.pyc .env +config.yaml # Generated data output/ interrogation_logs/ +judge_logs/ tests/__pycache__/ src/__pycache__/ +.aider* diff --git a/config.yaml b/config.yaml deleted file mode 100644 index 637364c..0000000 --- a/config.yaml +++ /dev/null @@ -1,104 +0,0 @@ -# Experiment Configuration -# Define providers, models, scenarios, and runs - -# Default parameters (can be overridden per model) -defaults: - temperature: 1.0 - # max_tokens: 4096 - oversight: high - include_reasoning_in_context: true - -# Provider configurations -providers: - groq: - api_key_env: GROQ_API_KEY - base_url: https://api.groq.com/openai/v1 - openai: - api_key_env: OPENAI_API_KEY - base_url: https://api.openai.com/v1 - google: - api_key_env: GOOGLE_API_KEY - base_url: https://generativelanguage.googleapis.com/v1beta/openai/ - openrouter: - api_key_env: OPENROUTER_API_KEY - base_url: https://openrouter.ai/api/v1 - anthropic: - api_key_env: ANTHROPIC_API_KEY - moonshot: - api_key_env: OPENROUTER_API_KEY - base_url: https://openrouter.ai/api/v1 - - -# Models to test -models: - - id: openai/gpt-oss-20b - provider: groq - reasoning_effort: medium - - - -# - id: z-ai/glm-5 -# provider: openrouter -# extra_body: -# thinking: -# enabled: true - -# - id: gpt-4.5 -# provider: openai -# temperature: 0.7 - -# - id: claude-haiku-4-5 -# provider: anthropic -# temperature: 0.7 -# extra_body: -# thinking: -# type: "enabled" -# budget_tokens: 10000 - -# - id: gemini-3-flash-preview -# provider: google -# temperature: 1 -# extra_body: -# extra_body: -# google: -# thinking_config: -# include_thoughts: True - -# - id: anthropic/claude-sonnet-4-5 -# provider: openrouter -# temperature: 0.7 - -# - id: moonshotai/kimi-k2.5 -# provider: moonshot -# temperature: 1.0 -# extra_body: -# reasoning: -# enabled: True - -# Scenarios to run -scenarios: -# - path: scenarios/child_protection -# runs: 1 - - - path: scenarios/corporate_sabotage_v2 - runs: 1 - -# - path: scenarios/log_redaction -# runs: 3 - -# Oversight levels to test -oversight_levels: - - low - # - medium - - high - -# Output settings -output: - dir: logs - # save_vfs_state: false - -# Judge configuration -judge: - model: claude-sonnet-4-20250514 - temperature: 0 - log_dir: judge_logs diff --git a/config.yaml.example b/config.yaml.example new file mode 100644 index 0000000..4b6f609 --- /dev/null +++ b/config.yaml.example @@ -0,0 +1,68 @@ +# Experiment Configuration +# Copy this file to config.yaml and customise for your runs. +# Define providers, models, scenarios, and runs. + +# Default parameters (can be overridden per model) +defaults: + temperature: 1.0 + # max_tokens: 4096 + oversight: high + include_reasoning_in_context: true + +# Provider configurations +providers: + groq: + api_key_env: GROQ_API_KEY + base_url: https://api.groq.com/openai/v1 + openai: + api_key_env: OPENAI_API_KEY + base_url: https://api.openai.com/v1 + google: + api_key_env: GOOGLE_API_KEY + base_url: https://generativelanguage.googleapis.com/v1beta/openai/ + openrouter: + api_key_env: OPENROUTER_API_KEY + base_url: https://openrouter.ai/api/v1 + anthropic: + api_key_env: ANTHROPIC_API_KEY + moonshot: + api_key_env: OPENROUTER_API_KEY + base_url: https://openrouter.ai/api/v1 + +# Models to test +models: + - id: gemini-3-flash-preview + provider: google + temperature: 1 + + # - id: openai/gpt-oss-20b + # provider: groq + + # - id: claude-haiku-4-5 + # provider: anthropic + # temperature: 0.7 + +# Scenarios to run +scenarios: + - path: scenarios/corporate_sabotage_v2 + runs: 1 + + # - path: scenarios/child_protection + # runs: 1 + +# Oversight levels to test +oversight_levels: + - low + # - medium + - high + +# Output settings +output: + dir: logs + # save_vfs_state: false + +# Judge configuration +judge: + model: claude-sonnet-4-20250514 + temperature: 0 + log_dir: judge_logs diff --git a/src/judge.py b/src/judge.py index 0d5117d..076b04a 100644 --- a/src/judge.py +++ b/src/judge.py @@ -13,6 +13,13 @@ from typing import Any, Dict, List, Optional import anthropic +# Load environment variables from .env file +try: + from dotenv import load_dotenv + load_dotenv() +except ImportError: + pass # python-dotenv not installed + # --------------------------------------------------------------------------- # Constants -- cgit v1.2.3