petrov826 commited on
Commit
3a781f3
·
verified ·
1 Parent(s): b14357b

fix variable name

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -27,7 +27,7 @@ class LiteLLMModelWithRateLimit(LiteLLMModel):
27
  """API呼び出し前にレート制限をチェックするLiteLLMModelのラッパー"""
28
  def run(self, **kwargs) -> dict:
29
  # APIを呼び出す直前に待機処理を挟む
30
- limiter.wait_if_needed()
31
  # 元のrunメソッドを呼び出してAPIアクセスを実行
32
  return super().run(**kwargs)
33
 
@@ -50,6 +50,7 @@ class BasicAgent:
50
  model=model,
51
  )
52
  print("BasicAgent initialized.")
 
53
  def __call__(self, question: str) -> str:
54
  print(f"Agent received question (first 50 chars): {question[:50]}...")
55
  answer = self.agent.run(question)
 
27
  """API呼び出し前にレート制限をチェックするLiteLLMModelのラッパー"""
28
  def run(self, **kwargs) -> dict:
29
  # APIを呼び出す直前に待機処理を挟む
30
+ rate_limiter.wait_if_needed()
31
  # 元のrunメソッドを呼び出してAPIアクセスを実行
32
  return super().run(**kwargs)
33
 
 
50
  model=model,
51
  )
52
  print("BasicAgent initialized.")
53
+
54
  def __call__(self, question: str) -> str:
55
  print(f"Agent received question (first 50 chars): {question[:50]}...")
56
  answer = self.agent.run(question)