bstraehle commited on
Commit
27f2401
·
verified ·
1 Parent(s): 90c9483

Update crew.py

Browse files
Files changed (1) hide show
  1. crew.py +11 -9
crew.py CHANGED
@@ -14,10 +14,12 @@ from openinference.instrumentation.crewai import CrewAIInstrumentor
14
  from phoenix.otel import register
15
  from util import get_final_answer
16
 
17
- MANAGER_MODEL = "gpt-4.1"
18
- AGENT_MODEL = "gpt-4.1"
19
- STT_MODEL = "whisper-1"
20
- FINAL_ANSWER_MODEL = ""
 
 
21
 
22
  PHOENIX_API_KEY = os.environ["PHOENIX_API_KEY"]
23
 
@@ -35,7 +37,7 @@ def run_crew(question, file_path):
35
  # Tools
36
 
37
  @tool("Audio Analysis Tool")
38
- def audio_analysis_tool(question: str, file_name: str) -> str:
39
  """Transcribe audio file using OpenAI's Whisper model.
40
 
41
  Args:
@@ -159,11 +161,11 @@ def run_crew(question, file_path):
159
 
160
  # Processing
161
 
162
- if file_name:
163
- question = f"{question} File name: data/{file_name}."
164
 
165
- if file_name.endswith(".py"):
166
- with open(f"data/{file_name}", "r") as file:
167
  question = f"{question} File data:\n{file.read()}"
168
 
169
  initial_answer = crew.kickoff(inputs={"question": question})
 
14
  from phoenix.otel import register
15
  from util import get_final_answer
16
 
17
+ MANAGER_MODEL = "gpt-4.1"
18
+ AGENT_MODEL = "gpt-4.1"
19
+ STT_MODEL = "whisper-1"
20
+ FINAL_ANSWER_MODEL = "gpt-4.5-preview"
21
+
22
+ # LLM evaluation
23
 
24
  PHOENIX_API_KEY = os.environ["PHOENIX_API_KEY"]
25
 
 
37
  # Tools
38
 
39
  @tool("Audio Analysis Tool")
40
+ def audio_analysis_tool(question: str, file_path: str) -> str:
41
  """Transcribe audio file using OpenAI's Whisper model.
42
 
43
  Args:
 
161
 
162
  # Processing
163
 
164
+ if file_path:
165
+ question = f"{question} File path: {file_path}."
166
 
167
+ if file_path.endswith(".py"):
168
+ with open(f"{file_path}", "r") as file:
169
  question = f"{question} File data:\n{file.read()}"
170
 
171
  initial_answer = crew.kickoff(inputs={"question": question})