mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: improved loading (#202)
* improved loading * updated openai folder imports * fixed import
This commit is contained in:
committed by
GitHub
Unverified
parent
fc999e2be8
commit
9287572b0d
@@ -1,12 +1,6 @@
|
||||
# Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
|
||||
from ._chat_client import OpenAIChatClient
|
||||
from ._shared import OpenAIHandler, OpenAIModelTypes, OpenAISettings
|
||||
|
||||
__all__ = [
|
||||
"OpenAIChatClient",
|
||||
"OpenAIHandler",
|
||||
"OpenAIModelTypes",
|
||||
"OpenAISettings",
|
||||
]
|
||||
from ._chat_client import * # noqa: F403
|
||||
from ._exceptions import * # noqa: F403
|
||||
from ._shared import * # noqa: F403
|
||||
|
||||
@@ -31,6 +31,8 @@ from .._types import (
|
||||
from ..exceptions import ServiceInitializationError, ServiceInvalidResponseError
|
||||
from ._shared import OpenAIConfigBase, OpenAIHandler, OpenAIModelTypes, OpenAISettings
|
||||
|
||||
__all__ = ["OpenAIChatClient"]
|
||||
|
||||
|
||||
# Implements agent_framework.ChatClient protocol, through ChatClientBase
|
||||
@use_tool_calling
|
||||
|
||||
+2
@@ -8,6 +8,8 @@ from openai import BadRequestError
|
||||
|
||||
from ..exceptions import ServiceContentFilterException
|
||||
|
||||
__all__ = ["ContentFilterResultSeverity", "OpenAIContentFilterException"]
|
||||
|
||||
|
||||
class ContentFilterResultSeverity(Enum):
|
||||
"""The severity of the content filter result."""
|
||||
@@ -26,7 +26,7 @@ from .._pydantic import AFBaseModel, AFBaseSettings
|
||||
from .._types import ChatOptions, SpeechToTextOptions, TextToSpeechOptions
|
||||
from ..exceptions import ServiceInitializationError, ServiceInvalidRequestError, ServiceResponseException
|
||||
from ..telemetry import APP_INFO, USER_AGENT_KEY, prepend_agent_framework_to_user_agent
|
||||
from .exceptions import OpenAIContentFilterException
|
||||
from ._exceptions import OpenAIContentFilterException
|
||||
|
||||
logger: logging.Logger = get_logger("agent_framework.openai")
|
||||
|
||||
@@ -49,6 +49,13 @@ OPTION_TYPE = Union[
|
||||
]
|
||||
|
||||
|
||||
__all__ = [
|
||||
"OpenAIHandler",
|
||||
"OpenAIModelTypes",
|
||||
"OpenAISettings",
|
||||
]
|
||||
|
||||
|
||||
class OpenAISettings(AFBaseSettings):
|
||||
"""OpenAI model settings.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user