mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: added generic types to ChatOptions and ChatResponse/AgentResponse for Response Format (#3305)
* added generic types to ChatOptions and ChatResponse/AgentResponse for response format * fix typevar import * fix for older python versions * fix missing import * fixed imports * fixed mypy * mypy fix
This commit is contained in:
committed by
GitHub
Unverified
parent
1f8463f9bb
commit
1226828ec2
@@ -3,7 +3,7 @@
|
||||
import sys
|
||||
from collections.abc import MutableSequence, Sequence
|
||||
from contextlib import AbstractAsyncContextManager
|
||||
from typing import Any, TypedDict
|
||||
from typing import Any
|
||||
|
||||
from agent_framework import ChatMessage, Context, ContextProvider
|
||||
from agent_framework.exceptions import ServiceInitializationError
|
||||
@@ -15,9 +15,9 @@ else:
|
||||
from typing_extensions import override # type: ignore[import] # pragma: no cover
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
from typing import NotRequired, Self # pragma: no cover
|
||||
from typing import NotRequired, Self, TypedDict # pragma: no cover
|
||||
else:
|
||||
from typing_extensions import NotRequired, Self # pragma: no cover
|
||||
from typing_extensions import NotRequired, Self, TypedDict # pragma: no cover
|
||||
|
||||
|
||||
# Type aliases for Mem0 search response formats (v1.1 and v2; v1 is deprecated, but matches the type definition for v2)
|
||||
|
||||
Reference in New Issue
Block a user