siyah1 commited on
Commit
7c22527
·
verified ·
1 Parent(s): 838f68d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -46,8 +46,15 @@ class GroqLLM:
46
  print(error_msg)
47
  return error_msg
48
 
49
- def generate(self, prompt: Union[str, dict, List[Dict]]) -> str:
50
- """Add generate method to make compatible with smolagents CodeAgent"""
 
 
 
 
 
 
 
51
  return self.__call__(prompt)
52
 
53
  class DataAnalysisAgent(CodeAgent):
 
46
  print(error_msg)
47
  return error_msg
48
 
49
+ def generate(self, prompt: Union[str, dict, List[Dict]], **kwargs) -> str:
50
+ """Add generate method to make compatible with smolagents CodeAgent
51
+
52
+ Args:
53
+ prompt: The prompt to send to the model
54
+ **kwargs: Additional keyword arguments to support CodeAgent API
55
+ (stop_sequences, etc.) - these are ignored in the Groq implementation
56
+ """
57
+ # Simply ignore kwargs that aren't needed and pass through to __call__
58
  return self.__call__(prompt)
59
 
60
  class DataAnalysisAgent(CodeAgent):