mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-04 22:50:18 +00:00
Initial commit of eigent-main
This commit is contained in:
commit
723df5a03e
1144 changed files with 103478 additions and 0 deletions
16
backend/app/utils/toolkit/abstract_toolkit.py
Normal file
16
backend/app/utils/toolkit/abstract_toolkit.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from camel.toolkits.function_tool import FunctionTool
|
||||
from inflection import titleize
|
||||
|
||||
|
||||
class AbstractToolkit:
|
||||
api_task_id: str
|
||||
agent_name: str
|
||||
|
||||
@classmethod
|
||||
def get_can_use_tools(cls, api_task_id: str) -> list[FunctionTool]:
|
||||
"""default return all tools, subclass can override this method to filter tools"""
|
||||
return cls(api_task_id).get_tools() # type: ignore
|
||||
|
||||
@classmethod
|
||||
def toolkit_name(cls) -> str:
|
||||
return titleize(cls.__name__)
|
||||
Loading…
Add table
Add a link
Reference in a new issue