Sync game_agent.py from GitHub project
Browse files- game_agent.py +4 -0
game_agent.py
CHANGED
|
@@ -6,13 +6,17 @@ arguments. Tools validate with Pydantic and render deterministic p5.js games.
|
|
| 6 |
from __future__ import annotations
|
| 7 |
|
| 8 |
import os
|
|
|
|
| 9 |
from typing import Any
|
| 10 |
|
|
|
|
| 11 |
from pydantic import ValidationError
|
| 12 |
from smolagents import InferenceClientModel, LiteLLMModel, ToolCallingAgent, tool
|
| 13 |
|
| 14 |
from game_engine import GameEngine, GameSpec, render_spec_html
|
| 15 |
|
|
|
|
|
|
|
| 16 |
_engine: GameEngine | None = None
|
| 17 |
|
| 18 |
|
|
|
|
| 6 |
from __future__ import annotations
|
| 7 |
|
| 8 |
import os
|
| 9 |
+
from pathlib import Path
|
| 10 |
from typing import Any
|
| 11 |
|
| 12 |
+
from dotenv import load_dotenv
|
| 13 |
from pydantic import ValidationError
|
| 14 |
from smolagents import InferenceClientModel, LiteLLMModel, ToolCallingAgent, tool
|
| 15 |
|
| 16 |
from game_engine import GameEngine, GameSpec, render_spec_html
|
| 17 |
|
| 18 |
+
load_dotenv(dotenv_path=Path(__file__).with_name(".env"))
|
| 19 |
+
|
| 20 |
_engine: GameEngine | None = None
|
| 21 |
|
| 22 |
|