mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: [BREAKING] changed AIFunction to FunctionTool and @ai_function to @tool (#3413)
* changed AIFunction to FunctionTool and @ai_function to @tool * test and mypy fixes * mypy fix * switch function tool to always_require * fix noop * fix github copilot imports * test fixes * fix ollama test * fixes for tests * fix tests * reverted change to always_require and extended timeout * fix test
This commit is contained in:
committed by
GitHub
Unverified
parent
15b43f2abe
commit
a7d924a7d2
@@ -92,7 +92,7 @@ The package follows a flat import structure:
|
||||
|
||||
- **Core**: Import directly from `agent_framework`
|
||||
```python
|
||||
from agent_framework import ChatAgent, ai_function
|
||||
from agent_framework import ChatAgent, tool
|
||||
```
|
||||
|
||||
- **Components**: Import from `agent_framework.<component>`
|
||||
@@ -336,7 +336,7 @@ Think about caching where appropriate. Cache the results of expensive operations
|
||||
|
||||
```python
|
||||
# ✅ Preferred - cache expensive computations
|
||||
class AIFunction:
|
||||
class FunctionTool:
|
||||
def __init__(self, ...):
|
||||
self._cached_parameters: dict[str, Any] | None = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user