bwilkie commited on
Commit
8e30455
·
verified ·
1 Parent(s): ac7d965

Update multiagents.py

Browse files
Files changed (1) hide show
  1. multiagents.py +9 -2
multiagents.py CHANGED
@@ -45,12 +45,19 @@ dotenv.load_dotenv()
45
  class GrokApiAgent:
46
  def __init__(self):
47
  pass # No setup needed for API-based agent
48
-
49
  def __call__(self, prompt):
50
- return GrokApi(
 
 
 
 
51
  system_prompt="You are a helpful assistant.",
52
  user_input=prompt
53
  )
 
 
 
54
 
55
  # Pick your agent here (just change one line to test different ones)
56
  # My_Agent = BasicAgent
 
45
  class GrokApiAgent:
46
  def __init__(self):
47
  pass # No setup needed for API-based agent
48
+
49
  def __call__(self, prompt):
50
+ # You could keep this for backward compatibility if needed
51
+ return self.generate(prompt)
52
+
53
+ def generate(self, prompt):
54
+ response = GrokApi(
55
  system_prompt="You are a helpful assistant.",
56
  user_input=prompt
57
  )
58
+ # Assuming GrokApi returns a string or has a property with the answer text
59
+ # Adjust this depending on the actual return type of GrokApi
60
+ return str(response)
61
 
62
  # Pick your agent here (just change one line to test different ones)
63
  # My_Agent = BasicAgent