| title | Customer Service Bot — OpenEnv |
|---|---|
| emoji | 🤖 |
| colorFrom | gray |
| colorTo | blue |
| sdk | docker |
| app_port | 8000 |
Run everything from the repository root:
PS C:\NPersonal\Projects\openenv-project>
- Python 3.11+
- uv (recommended) or
pip - Optional: Docker for container builds
- Optional: Ollama for local LLM (OpenAI-compatible API on port 11434)
cd C:\NPersonal\Projects\openenv-project
uv syncOr: python -m pip install -r requirements.txt
If a leftover empty RUNTIME\ folder exists from an older layout, close any program using it and delete the folder.
uv run uvicorn server.app:app --host 127.0.0.1 --port 8000Health check: http://127.0.0.1:8000/health
Requires the server above. From the same repo root:
$env:ENV_BASE_URL = "http://127.0.0.1:8000"
$env:API_BASE_URL = "http://127.0.0.1:11434/v1"
$env:MODEL_NAME = "llama3.2"
$env:HF_TOKEN = "ollama" # required for LLM path; no Python fallback — unset ⇒ rule-based only
uv run python inference.pyStructured logs go to stdout ([START], [STEP], [END]). Details go to stderr.
To print the full chat transcript while keeping graded stdout clean: $env:VERBOSE_CHAT = "1" before running inference.py (transcript on stderr only).
Set submission variables as required by the hackathon:
API_BASE_URL— LLM base URLMODEL_NAME— model idHF_TOKEN— API key
docker build -t openenv-runtime .
docker run --rm -p 8000:8000 openenv-runtimeThe image uses uv to lock and install dependencies (Dockerfile).
If inference runs inside Docker but Ollama runs on the host (Windows/macOS), use e.g. API_BASE_URL=http://host.docker.internal:11434/v1 for the LLM client.
uv run python tests/test_environment.py| Path | Purpose |
|---|---|
openenv.yaml |
OpenEnv metadata |
models.py |
Pydantic types |
server/app.py |
FastAPI app (/reset, /step, /state, /health) |
server/environment.py |
CustomerServiceEnv |
src/ |
Tasks, graders, simulation |
inference.py |
Baseline inference (root; required for submission) |
Dockerfile |
Production image (uv + uvicorn) |
From the repo root, pass . as the directory (last argument). Example:
openenv push --repo-id YOUR_USER/YOUR_SPACE .Log in first: huggingface-cli login (or set HF_TOKEN).
Hugging Face only accepts certain theme colors in the YAML above (e.g. gray, red, yellow, green, blue, indigo, purple, pink). If upload fails with Invalid metadata in README.md, fix those two fields—do not use custom color names or hex.
PowerShell’s default encoding can break openenv when it prints Unicode (e.g. icons). Use UTF-8 for that session, then push:
$env:PYTHONUTF8 = "1"
$env:PYTHONIOENCODING = "utf-8"
openenv push --repo-id YOUR_USER/YOUR_SPACE .Or use the helper (same env vars):
.\push-to-hf.ps1 push --repo-id YOUR_USER/YOUR_SPACE .See COMPLIANCE.md for the pre-submission checklist (HF Space, Docker build, openenv validate, inference format, infra limits).