mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: Added Copilot Studio Agent (#722)
* Small fix in dotnet conformance tests * Added CopilotStudioAgent implementation * Added examples * Updated package README * Small fixes * Small improvements * Fixed dotnet tests * Add unit tests * Updated tests * Small updates * Small test fixes * Revert "Small test fixes" This reverts commit983ac44a70. * Small fixes in documentation * Updated test configuration * Revert "Updated test configuration" This reverts commit2a16fea815. * Small fix * Reverted TODO item * Small suppressions * More fixes * Small fixes * Fixed tests * Removed disallow_any_unimported rule in all packages * Fixes
This commit is contained in:
committed by
GitHub
Unverified
parent
74879489a4
commit
e7cd03b32e
@@ -0,0 +1,24 @@
|
||||
# Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
import importlib
|
||||
from typing import Any
|
||||
|
||||
PACKAGE_NAME = "agent_framework_copilotstudio"
|
||||
PACKAGE_EXTRA = "copilotstudio"
|
||||
_IMPORTS = ["CopilotStudioAgent", "__version__", "acquire_token"]
|
||||
|
||||
|
||||
def __getattr__(name: str) -> Any:
|
||||
if name in _IMPORTS:
|
||||
try:
|
||||
return getattr(importlib.import_module(PACKAGE_NAME), name)
|
||||
except ModuleNotFoundError as exc:
|
||||
raise ModuleNotFoundError(
|
||||
f"The '{PACKAGE_EXTRA}' extra is not installed, "
|
||||
f"please do `pip install agent-framework[{PACKAGE_EXTRA}]`"
|
||||
) from exc
|
||||
raise AttributeError(f"Module {PACKAGE_NAME} has no attribute {name}.")
|
||||
|
||||
|
||||
def __dir__() -> list[str]:
|
||||
return _IMPORTS
|
||||
@@ -0,0 +1,5 @@
|
||||
# Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
from agent_framework_copilotstudio import CopilotStudioAgent, __version__, acquire_token
|
||||
|
||||
__all__ = ["CopilotStudioAgent", "__version__", "acquire_token"]
|
||||
Reference in New Issue
Block a user