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
Files changed (3) hide show
  1. app.py +2 -5
  2. logger/phoenix.py → config.py +2 -1
  3. 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 logging.phoenix import start_phoenix
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(APP_NAME)
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