bstraehle commited on
Commit
2d67bf9
·
verified ·
1 Parent(s): 1e5ce5b

Update agents/crew.py

Browse files
Files changed (1) hide show
  1. agents/crew.py +2 -32
agents/crew.py CHANGED
@@ -3,39 +3,9 @@
3
  # https://docs.crewai.com/introduction
4
  # https://arize.com/docs/phoenix/integrations/python/crewai/crewai-tracing
5
 
6
- import logging
7
- import os
8
- import sys
9
 
10
- # Disable CrewAI tracing completely and suppress all tracing messages
11
- os.environ["CREWAI_TRACING_ENABLED"] = "false"
12
- os.environ["CREWAI_DISABLE_TELEMETRY"] = "true"
13
-
14
- # Mark as not first execution to skip the "Tracing Preference Saved" message
15
- import json
16
- from pathlib import Path
17
-
18
- def _suppress_first_time_trace_message():
19
- """Pre-populate user data to prevent first-time tracing message."""
20
- try:
21
- # Determine the user data path (matches CrewAI's db_storage_path logic)
22
- base_path = Path.home() / ".crewai" / "data"
23
- base_path.mkdir(parents=True, exist_ok=True)
24
- user_data_file = base_path / ".crewai_user.json"
25
-
26
- # Pre-populate with tracing declined
27
- user_data = {
28
- "first_execution_done": True,
29
- "trace_consent": False
30
- }
31
-
32
- # Only write if file doesn't exist
33
- if not user_data_file.exists():
34
- user_data_file.write_text(json.dumps(user_data, indent=2))
35
- except:
36
- pass
37
-
38
- _suppress_first_time_trace_message()
39
 
40
  from agents.models.llms import (
41
  LLM_CREW_MANAGER,
 
3
  # https://docs.crewai.com/introduction
4
  # https://arize.com/docs/phoenix/integrations/python/crewai/crewai-tracing
5
 
6
+ import logging, os
 
 
7
 
8
+ os.environ["CREWAI_TRACING_ENABLED"] = "0" # Arize Phoenix
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
  from agents.models.llms import (
11
  LLM_CREW_MANAGER,