Imnotchis commited on
Commit
29dfd23
·
verified ·
1 Parent(s): 554a5e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -38,7 +38,7 @@ class RetryOpenAIModel(OpenAIModel):
38
 
39
  except RateLimitError as e:
40
  if attempt == max_attempts - 1:
41
- print("Groq rate limit: Maximum retries reached.")
42
  raise
43
 
44
  retry_after = None
@@ -62,7 +62,7 @@ class RetryOpenAIModel(OpenAIModel):
62
  wait_time = max(wait_time, 1)
63
 
64
  print(
65
- f"[GROQ 429] Attempt {attempt + 1}/{max_attempts}. "
66
  f"Waiting {wait_time} seconds before retry..."
67
  )
68
 
@@ -101,9 +101,9 @@ class BasicAgent:
101
 
102
  # Groq model
103
  self.model = RetryOpenAIModel(
104
- model_id="openai/gpt-oss-120b",
105
- api_base="https://api.groq.com/openai/v1",
106
- api_key=os.environ["GROQ_API_KEY"],
107
  client_kwargs={
108
  "timeout": 60.0,
109
  "max_retries": 0
 
38
 
39
  except RateLimitError as e:
40
  if attempt == max_attempts - 1:
41
+ print("Rate limit: Maximum retries reached.")
42
  raise
43
 
44
  retry_after = None
 
62
  wait_time = max(wait_time, 1)
63
 
64
  print(
65
+ f"[429] Attempt {attempt + 1}/{max_attempts}. "
66
  f"Waiting {wait_time} seconds before retry..."
67
  )
68
 
 
101
 
102
  # Groq model
103
  self.model = RetryOpenAIModel(
104
+ model_id="swiss-ai/Apertus-70B-Instruct-2509:publicai",
105
+ api_base="https://router.huggingface.co/v1",
106
+ api_key=os.environ["HF_TOKEN"],
107
  client_kwargs={
108
  "timeout": 60.0,
109
  "max_retries": 0