mahadewa commited on
Commit
ce8cf32
·
verified ·
1 Parent(s): 48499be

Update base_agent.py

Browse files
Files changed (1) hide show
  1. base_agent.py +3 -2
base_agent.py CHANGED
@@ -2,7 +2,7 @@ from typing import Dict, Any, Optional
2
  import os
3
  import time
4
  import json
5
- import openai
6
 
7
  class BaseAgent:
8
  """Base class for all agents with common functionality."""
@@ -16,7 +16,8 @@ class BaseAgent:
16
  openai_key = os.getenv("OPENAI_API_KEY")
17
  print("OpenAI Key = " + openai_key)
18
  self.model = model
19
- self.client = openai.OpenAI(api_key=openai_key)
 
20
 
21
  def __call__(self, question: str, task_id: Optional[str] = None, **kwargs) -> str:
22
  """Process the question and return an answer."""
 
2
  import os
3
  import time
4
  import json
5
+ from openai import OpenAI
6
 
7
  class BaseAgent:
8
  """Base class for all agents with common functionality."""
 
16
  openai_key = os.getenv("OPENAI_API_KEY")
17
  print("OpenAI Key = " + openai_key)
18
  self.model = model
19
+ print("Init Client")
20
+ self.client = OpenAI(api_key=openai_key)
21
 
22
  def __call__(self, question: str, task_id: Optional[str] = None, **kwargs) -> str:
23
  """Process the question and return an answer."""