|
|
|
@ -19,7 +19,7 @@ class ToolDefinition:
|
|
|
|
|
callable: Optional[Callable] = None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def extract_type_hints(func: Callable) -> dict:
|
|
|
|
|
def extract_type_hints(func: Callable) -> Dict[str, Any]:
|
|
|
|
|
"""Extract parameter types from function type hints."""
|
|
|
|
|
return typing.get_type_hints(func)
|
|
|
|
|
|
|
|
|
@ -111,6 +111,9 @@ class ExecutionContext:
|
|
|
|
|
history: List[Dict[str, Any]] = field(default_factory=list)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def func():
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
hints = get_type_hints(func)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -417,4 +420,4 @@ agent = ToolAgent(
|
|
|
|
|
|
|
|
|
|
result = agent.run(
|
|
|
|
|
"Calculate returns for $10000 invested at 7% for 10 years"
|
|
|
|
|
)
|
|
|
|
|
)
|