mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Fix imports for durabletask (#3345)
This commit is contained in:
committed by
GitHub
Unverified
parent
e032133748
commit
ff839435a2
@@ -2,6 +2,8 @@
|
||||
|
||||
"""Durable Task integration for Microsoft Agent Framework."""
|
||||
|
||||
import importlib.metadata
|
||||
|
||||
from ._callbacks import AgentCallbackContext, AgentResponseCallbackProtocol
|
||||
from ._client import DurableAIAgentClient
|
||||
from ._constants import (
|
||||
@@ -49,6 +51,11 @@ from ._response_utils import ensure_response_format, load_agent_response
|
||||
from ._shim import DurableAIAgent
|
||||
from ._worker import DurableAIAgentWorker
|
||||
|
||||
try:
|
||||
__version__ = importlib.metadata.version(__name__)
|
||||
except importlib.metadata.PackageNotFoundError:
|
||||
__version__ = "0.0.0" # Fallback for development mode
|
||||
|
||||
__all__ = [
|
||||
"DEFAULT_MAX_POLL_RETRIES",
|
||||
"DEFAULT_POLL_INTERVAL_SECONDS",
|
||||
@@ -96,6 +103,7 @@ __all__ = [
|
||||
"DurableAgentThread",
|
||||
"DurableStateFields",
|
||||
"RunRequest",
|
||||
"__version__",
|
||||
"ensure_response_format",
|
||||
"load_agent_response",
|
||||
]
|
||||
|
||||
@@ -27,7 +27,7 @@ class DurableAIAgentClient(DurableAgentProvider[AgentResponse]):
|
||||
Example:
|
||||
```python
|
||||
from durabletask import TaskHubGrpcClient
|
||||
from agent_framework_durabletask import DurableAIAgentClient
|
||||
from agent_framework.azure import DurableAIAgentClient
|
||||
|
||||
# Create the underlying client
|
||||
client = TaskHubGrpcClient(host_address="localhost:4001")
|
||||
|
||||
@@ -27,7 +27,7 @@ class DurableAIAgentOrchestrationContext(DurableAgentProvider[DurableAgentTask])
|
||||
Example:
|
||||
```python
|
||||
from durabletask import Orchestration
|
||||
from agent_framework_durabletask import DurableAIAgentOrchestrationContext
|
||||
from agent_framework.azure import DurableAIAgentOrchestrationContext
|
||||
|
||||
|
||||
def my_orchestration(context: OrchestrationContext):
|
||||
|
||||
@@ -30,7 +30,7 @@ class DurableAIAgentWorker:
|
||||
```python
|
||||
from durabletask import TaskHubGrpcWorker
|
||||
from agent_framework import ChatAgent
|
||||
from agent_framework_durabletask import DurableAIAgentWorker
|
||||
from agent_framework.azure import DurableAIAgentWorker
|
||||
|
||||
# Create the underlying worker
|
||||
worker = TaskHubGrpcWorker(host_address="localhost:4001")
|
||||
|
||||
Reference in New Issue
Block a user