mdicio commited on
Commit
263a013
·
1 Parent(s): 78d3fe1

why do i need a openai api key when i am using deepinfra

Browse files
Files changed (2) hide show
  1. agent.py +7 -3
  2. app.py +1 -1
agent.py CHANGED
@@ -28,7 +28,7 @@ from utils import extract_final_answer, replace_tool_mentions
28
 
29
 
30
  class BoomBot:
31
- def __init__(self, provider="meta"):
32
  """
33
  Initialize the BoomBot with the specified provider.
34
 
@@ -68,8 +68,12 @@ class BoomBot:
68
  min_p=0.0,
69
  )
70
  elif self.provider == "anthropic":
71
- model_id = "anthropic/claude-3-5-sonnet-latest"
72
- return LiteLLMModel(model_id=model_id, temperature=0.6, max_tokens=8192)
 
 
 
 
73
  elif self.provider == "deepinfra":
74
  deepinfra_model = "Qwen/Qwen3-235B-A22B"
75
  return OpenAIServerModel(
 
28
 
29
 
30
  class BoomBot:
31
+ def __init__(self, provider="anthropic"):
32
  """
33
  Initialize the BoomBot with the specified provider.
34
 
 
68
  min_p=0.0,
69
  )
70
  elif self.provider == "anthropic":
71
+ model_id = "anthropic/claude-3-5-haiku-latest"
72
+ return LiteLLMModel(model_id=model_id,
73
+ temperature=0.6,
74
+ max_tokens=8192,
75
+ api_key=os.getenv("ANTHROPIC_API_KEY"))
76
+
77
  elif self.provider == "deepinfra":
78
  deepinfra_model = "Qwen/Qwen3-235B-A22B"
79
  return OpenAIServerModel(
app.py CHANGED
@@ -17,7 +17,7 @@ load_dotenv()
17
  class BasicAgent:
18
  def __init__(self):
19
  print("BasicAgent initialized.")
20
- self.agent = BoomBot(provider="deepinfra")
21
 
22
  def __call__(self, question: str, task_id: str, to_download) -> str:
23
  print(f"Agent received question (first 50 chars): {question[:50]}...")
 
17
  class BasicAgent:
18
  def __init__(self):
19
  print("BasicAgent initialized.")
20
+ self.agent = BoomBot(provider="anthropic")
21
 
22
  def __call__(self, question: str, task_id: str, to_download) -> str:
23
  print(f"Agent received question (first 50 chars): {question[:50]}...")