Spaces:
Runtime error
Runtime error
abtsousa commited on
Commit ·
c8325a7
1
Parent(s): 7cdcb1a
Refactor Phoenix tracing setup: move constants to config.py and simplify start_phoenix call; remove unused logger module.
Browse files- app.py +2 -5
- logger/phoenix.py → config.py +2 -1
- logger/__init__.py +0 -0
app.py
CHANGED
|
@@ -11,16 +11,13 @@ from typing import cast
|
|
| 11 |
|
| 12 |
from agent.agent import OracleBot
|
| 13 |
from agent.config import create_agent_config
|
| 14 |
-
from
|
| 15 |
|
| 16 |
load_dotenv()
|
| 17 |
|
| 18 |
# --- Constants ---
|
| 19 |
-
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 20 |
-
APP_NAME = "OracleBot"
|
| 21 |
-
|
| 22 |
# Initialize Phoenix (you can comment this out if you don't want tracing)
|
| 23 |
-
start_phoenix(
|
| 24 |
|
| 25 |
# --- Basic Agent Definition ---
|
| 26 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
|
|
|
| 11 |
|
| 12 |
from agent.agent import OracleBot
|
| 13 |
from agent.config import create_agent_config
|
| 14 |
+
from config import start_phoenix, APP_NAME, DEFAULT_API_URL
|
| 15 |
|
| 16 |
load_dotenv()
|
| 17 |
|
| 18 |
# --- Constants ---
|
|
|
|
|
|
|
|
|
|
| 19 |
# Initialize Phoenix (you can comment this out if you don't want tracing)
|
| 20 |
+
start_phoenix()
|
| 21 |
|
| 22 |
# --- Basic Agent Definition ---
|
| 23 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
logger/phoenix.py → config.py
RENAMED
|
@@ -2,8 +2,9 @@
|
|
| 2 |
|
| 3 |
import logging
|
| 4 |
from phoenix.otel import register
|
| 5 |
-
from app import APP_NAME
|
| 6 |
|
|
|
|
|
|
|
| 7 |
|
| 8 |
def start_phoenix(project_name: str = APP_NAME) -> None:
|
| 9 |
"""Setup Phoenix tracing for the agent.
|
|
|
|
| 2 |
|
| 3 |
import logging
|
| 4 |
from phoenix.otel import register
|
|
|
|
| 5 |
|
| 6 |
+
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 7 |
+
APP_NAME = "OracleBot"
|
| 8 |
|
| 9 |
def start_phoenix(project_name: str = APP_NAME) -> None:
|
| 10 |
"""Setup Phoenix tracing for the agent.
|
logger/__init__.py
DELETED
|
File without changes
|