agent-framework-devui 1.0.0b260409__tar.gz → 1.0.0b260414__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/PKG-INFO +1 -1
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/_cli.py +201 -201
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/_openai/__init__.py +9 -9
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/models/__init__.py +94 -94
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/models/_openai_custom.py +411 -411
- agent_framework_devui-1.0.0b260414/agent_framework_devui/ui/assets/index.js +611 -0
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/pyproject.toml +1 -1
- agent_framework_devui-1.0.0b260409/agent_framework_devui/ui/assets/index.js +0 -619
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/LICENSE +0 -0
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/README.md +0 -0
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/__init__.py +0 -0
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/_conversations.py +0 -0
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/_deployment.py +0 -0
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/_discovery.py +0 -0
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/_executor.py +0 -0
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/_mapper.py +0 -0
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/_openai/_executor.py +0 -0
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/_server.py +0 -0
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/_session.py +0 -0
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/_tracing.py +0 -0
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/_utils.py +0 -0
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/models/_discovery_models.py +0 -0
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/ui/agentframework.svg +0 -0
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/ui/assets/index.css +0 -0
- {agent_framework_devui-1.0.0b260409 → agent_framework_devui-1.0.0b260414}/agent_framework_devui/ui/index.html +0 -0
|
@@ -1,201 +1,201 @@
|
|
|
1
|
-
# Copyright (c) Microsoft. All rights reserved.
|
|
2
|
-
|
|
3
|
-
"""Command line interface for Agent Framework DevUI."""
|
|
4
|
-
|
|
5
|
-
import argparse
|
|
6
|
-
import logging
|
|
7
|
-
import os
|
|
8
|
-
import sys
|
|
9
|
-
|
|
10
|
-
logger = logging.getLogger(__name__)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def setup_logging(level: str = "INFO") -> None:
|
|
14
|
-
"""Configure logging for the server."""
|
|
15
|
-
log_format = "%(asctime)s [%(levelname)s] %(name)s: %(message)s"
|
|
16
|
-
logging.basicConfig(level=getattr(logging, level.upper()), format=log_format, datefmt="%Y-%m-%d %H:%M:%S")
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def create_cli_parser() -> argparse.ArgumentParser:
|
|
20
|
-
"""Create the command line argument parser."""
|
|
21
|
-
parser = argparse.ArgumentParser(
|
|
22
|
-
prog="devui",
|
|
23
|
-
description="Launch Agent Framework DevUI - Debug interface with OpenAI compatible API",
|
|
24
|
-
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
25
|
-
epilog="""
|
|
26
|
-
Examples:
|
|
27
|
-
devui # Scan current directory
|
|
28
|
-
devui ./agents # Scan specific directory
|
|
29
|
-
devui --port 8000 # Custom port
|
|
30
|
-
devui --headless # API only, no UI
|
|
31
|
-
devui --instrumentation # Enable OpenTelemetry instrumentation
|
|
32
|
-
""",
|
|
33
|
-
)
|
|
34
|
-
|
|
35
|
-
parser.add_argument(
|
|
36
|
-
"directory", nargs="?", default=".", help="Directory to scan for entities (default: current directory)"
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
parser.add_argument("--port", "-p", type=int, default=8080, help="Port to run server on (default: 8080)")
|
|
40
|
-
|
|
41
|
-
parser.add_argument("--host", default="127.0.0.1", help="Host to bind server to (default: 127.0.0.1)")
|
|
42
|
-
|
|
43
|
-
parser.add_argument("--no-open", action="store_true", help="Don't automatically open browser")
|
|
44
|
-
|
|
45
|
-
parser.add_argument("--headless", action="store_true", help="Run without UI (API only)")
|
|
46
|
-
|
|
47
|
-
parser.add_argument(
|
|
48
|
-
"--log-level",
|
|
49
|
-
choices=["DEBUG", "INFO", "WARNING", "ERROR"],
|
|
50
|
-
default="INFO",
|
|
51
|
-
help="Logging level (default: INFO)",
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
parser.add_argument("--reload", action="store_true", help="Enable auto-reload for development")
|
|
55
|
-
|
|
56
|
-
parser.add_argument("--instrumentation", action="store_true", help="Enable OpenTelemetry instrumentation")
|
|
57
|
-
|
|
58
|
-
parser.add_argument(
|
|
59
|
-
"--mode",
|
|
60
|
-
choices=["developer", "user"],
|
|
61
|
-
default=None,
|
|
62
|
-
help="Server mode - 'developer' (full access, verbose errors) or 'user' (restricted APIs, generic errors)",
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
# Add --dev/--no-dev as a convenient alternative to --mode
|
|
66
|
-
parser.add_argument(
|
|
67
|
-
"--dev",
|
|
68
|
-
dest="dev_mode",
|
|
69
|
-
action="store_true",
|
|
70
|
-
default=None,
|
|
71
|
-
help="Enable developer mode (shorthand for --mode developer)",
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
parser.add_argument(
|
|
75
|
-
"--no-dev",
|
|
76
|
-
dest="dev_mode",
|
|
77
|
-
action="store_false",
|
|
78
|
-
help="Disable developer mode (shorthand for --mode user)",
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
parser.add_argument(
|
|
82
|
-
"--auth",
|
|
83
|
-
action="store_true",
|
|
84
|
-
help="Enable authentication via Bearer token (required for deployed environments)",
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
parser.add_argument(
|
|
88
|
-
"--auth-token",
|
|
89
|
-
type=str,
|
|
90
|
-
help="Custom authentication token (auto-generated if not provided with --auth)",
|
|
91
|
-
)
|
|
92
|
-
|
|
93
|
-
parser.add_argument("--version", action="version", version=f"Agent Framework DevUI {get_version()}")
|
|
94
|
-
|
|
95
|
-
return parser
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
def get_version() -> str:
|
|
99
|
-
"""Get the package version."""
|
|
100
|
-
try:
|
|
101
|
-
from . import __version__
|
|
102
|
-
|
|
103
|
-
return __version__
|
|
104
|
-
except ImportError:
|
|
105
|
-
return "unknown"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
def validate_directory(directory: str) -> str:
|
|
109
|
-
"""Validate and normalize the entities directory."""
|
|
110
|
-
if not directory:
|
|
111
|
-
directory = "."
|
|
112
|
-
|
|
113
|
-
abs_dir = os.path.abspath(directory)
|
|
114
|
-
|
|
115
|
-
if not os.path.exists(abs_dir):
|
|
116
|
-
print(f"Error: Directory '{directory}' does not exist", file=sys.stderr) # noqa: T201
|
|
117
|
-
sys.exit(1)
|
|
118
|
-
|
|
119
|
-
if not os.path.isdir(abs_dir):
|
|
120
|
-
print(f"Error: '{directory}' is not a directory", file=sys.stderr) # noqa: T201
|
|
121
|
-
sys.exit(1)
|
|
122
|
-
|
|
123
|
-
return abs_dir
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
def print_startup_info(
|
|
127
|
-
entities_dir: str, host: str, port: int, ui_enabled: bool, reload: bool, auth_token: str | None = None
|
|
128
|
-
) -> None:
|
|
129
|
-
"""Print startup information."""
|
|
130
|
-
print("Agent Framework DevUI") # noqa: T201
|
|
131
|
-
print("=" * 50) # noqa: T201
|
|
132
|
-
print(f"Entities directory: {entities_dir}") # noqa: T201
|
|
133
|
-
print(f"Server URL: http://{host}:{port}") # noqa: T201
|
|
134
|
-
print(f"UI enabled: {'Yes' if ui_enabled else 'No'}") # noqa: T201
|
|
135
|
-
print(f"Auto-reload: {'Yes' if reload else 'No'}") # noqa: T201
|
|
136
|
-
|
|
137
|
-
# Display auth token if authentication is enabled
|
|
138
|
-
if auth_token:
|
|
139
|
-
print("Authentication: Enabled") # noqa: T201
|
|
140
|
-
print(f"Auth token: {auth_token}") # noqa: T201
|
|
141
|
-
print("💡 Use this token in Authorization: Bearer <token> header") # noqa: T201
|
|
142
|
-
|
|
143
|
-
print("=" * 50) # noqa: T201
|
|
144
|
-
print("Scanning for entities...") # noqa: T201
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
def main() -> None:
|
|
148
|
-
"""Main CLI entry point."""
|
|
149
|
-
parser = create_cli_parser()
|
|
150
|
-
args = parser.parse_args()
|
|
151
|
-
|
|
152
|
-
# Setup logging
|
|
153
|
-
setup_logging(args.log_level)
|
|
154
|
-
|
|
155
|
-
# Validate directory
|
|
156
|
-
entities_dir = validate_directory(args.directory)
|
|
157
|
-
|
|
158
|
-
# Extract parameters directly from args
|
|
159
|
-
ui_enabled = not args.headless
|
|
160
|
-
|
|
161
|
-
# Determine mode from --mode or --dev/--no-dev flags
|
|
162
|
-
if args.dev_mode is not None:
|
|
163
|
-
# --dev or --no-dev was specified
|
|
164
|
-
mode = "developer" if args.dev_mode else "user"
|
|
165
|
-
elif args.mode is not None:
|
|
166
|
-
# --mode was specified
|
|
167
|
-
mode = args.mode
|
|
168
|
-
else:
|
|
169
|
-
# Default to developer mode
|
|
170
|
-
mode = "developer"
|
|
171
|
-
|
|
172
|
-
# Print startup info (don't show token - serve() will handle it)
|
|
173
|
-
print_startup_info(entities_dir, args.host, args.port, ui_enabled, args.reload, None)
|
|
174
|
-
|
|
175
|
-
# Import and start server
|
|
176
|
-
try:
|
|
177
|
-
from . import serve
|
|
178
|
-
|
|
179
|
-
serve(
|
|
180
|
-
entities_dir=entities_dir,
|
|
181
|
-
port=args.port,
|
|
182
|
-
host=args.host,
|
|
183
|
-
auto_open=not args.no_open,
|
|
184
|
-
ui_enabled=ui_enabled,
|
|
185
|
-
instrumentation_enabled=args.instrumentation,
|
|
186
|
-
mode=mode,
|
|
187
|
-
auth_enabled=args.auth,
|
|
188
|
-
auth_token=args.auth_token, # Pass through explicit token only
|
|
189
|
-
)
|
|
190
|
-
|
|
191
|
-
except KeyboardInterrupt:
|
|
192
|
-
print("\nShutting down Agent Framework DevUI...") # noqa: T201
|
|
193
|
-
sys.exit(0)
|
|
194
|
-
except Exception as e:
|
|
195
|
-
logger.exception("Failed to start server")
|
|
196
|
-
print(f"Error: {e}", file=sys.stderr) # noqa: T201
|
|
197
|
-
sys.exit(1)
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
if __name__ == "__main__":
|
|
201
|
-
main()
|
|
1
|
+
# Copyright (c) Microsoft. All rights reserved.
|
|
2
|
+
|
|
3
|
+
"""Command line interface for Agent Framework DevUI."""
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
import logging
|
|
7
|
+
import os
|
|
8
|
+
import sys
|
|
9
|
+
|
|
10
|
+
logger = logging.getLogger(__name__)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def setup_logging(level: str = "INFO") -> None:
|
|
14
|
+
"""Configure logging for the server."""
|
|
15
|
+
log_format = "%(asctime)s [%(levelname)s] %(name)s: %(message)s"
|
|
16
|
+
logging.basicConfig(level=getattr(logging, level.upper()), format=log_format, datefmt="%Y-%m-%d %H:%M:%S")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def create_cli_parser() -> argparse.ArgumentParser:
|
|
20
|
+
"""Create the command line argument parser."""
|
|
21
|
+
parser = argparse.ArgumentParser(
|
|
22
|
+
prog="devui",
|
|
23
|
+
description="Launch Agent Framework DevUI - Debug interface with OpenAI compatible API",
|
|
24
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
25
|
+
epilog="""
|
|
26
|
+
Examples:
|
|
27
|
+
devui # Scan current directory
|
|
28
|
+
devui ./agents # Scan specific directory
|
|
29
|
+
devui --port 8000 # Custom port
|
|
30
|
+
devui --headless # API only, no UI
|
|
31
|
+
devui --instrumentation # Enable OpenTelemetry instrumentation
|
|
32
|
+
""",
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
parser.add_argument(
|
|
36
|
+
"directory", nargs="?", default=".", help="Directory to scan for entities (default: current directory)"
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
parser.add_argument("--port", "-p", type=int, default=8080, help="Port to run server on (default: 8080)")
|
|
40
|
+
|
|
41
|
+
parser.add_argument("--host", default="127.0.0.1", help="Host to bind server to (default: 127.0.0.1)")
|
|
42
|
+
|
|
43
|
+
parser.add_argument("--no-open", action="store_true", help="Don't automatically open browser")
|
|
44
|
+
|
|
45
|
+
parser.add_argument("--headless", action="store_true", help="Run without UI (API only)")
|
|
46
|
+
|
|
47
|
+
parser.add_argument(
|
|
48
|
+
"--log-level",
|
|
49
|
+
choices=["DEBUG", "INFO", "WARNING", "ERROR"],
|
|
50
|
+
default="INFO",
|
|
51
|
+
help="Logging level (default: INFO)",
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
parser.add_argument("--reload", action="store_true", help="Enable auto-reload for development")
|
|
55
|
+
|
|
56
|
+
parser.add_argument("--instrumentation", action="store_true", help="Enable OpenTelemetry instrumentation")
|
|
57
|
+
|
|
58
|
+
parser.add_argument(
|
|
59
|
+
"--mode",
|
|
60
|
+
choices=["developer", "user"],
|
|
61
|
+
default=None,
|
|
62
|
+
help="Server mode - 'developer' (full access, verbose errors) or 'user' (restricted APIs, generic errors)",
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
# Add --dev/--no-dev as a convenient alternative to --mode
|
|
66
|
+
parser.add_argument(
|
|
67
|
+
"--dev",
|
|
68
|
+
dest="dev_mode",
|
|
69
|
+
action="store_true",
|
|
70
|
+
default=None,
|
|
71
|
+
help="Enable developer mode (shorthand for --mode developer)",
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
parser.add_argument(
|
|
75
|
+
"--no-dev",
|
|
76
|
+
dest="dev_mode",
|
|
77
|
+
action="store_false",
|
|
78
|
+
help="Disable developer mode (shorthand for --mode user)",
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
parser.add_argument(
|
|
82
|
+
"--auth",
|
|
83
|
+
action="store_true",
|
|
84
|
+
help="Enable authentication via Bearer token (required for deployed environments)",
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
parser.add_argument(
|
|
88
|
+
"--auth-token",
|
|
89
|
+
type=str,
|
|
90
|
+
help="Custom authentication token (auto-generated if not provided with --auth)",
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
parser.add_argument("--version", action="version", version=f"Agent Framework DevUI {get_version()}")
|
|
94
|
+
|
|
95
|
+
return parser
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def get_version() -> str:
|
|
99
|
+
"""Get the package version."""
|
|
100
|
+
try:
|
|
101
|
+
from . import __version__
|
|
102
|
+
|
|
103
|
+
return __version__
|
|
104
|
+
except ImportError:
|
|
105
|
+
return "unknown"
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def validate_directory(directory: str) -> str:
|
|
109
|
+
"""Validate and normalize the entities directory."""
|
|
110
|
+
if not directory:
|
|
111
|
+
directory = "."
|
|
112
|
+
|
|
113
|
+
abs_dir = os.path.abspath(directory)
|
|
114
|
+
|
|
115
|
+
if not os.path.exists(abs_dir):
|
|
116
|
+
print(f"Error: Directory '{directory}' does not exist", file=sys.stderr) # noqa: T201
|
|
117
|
+
sys.exit(1)
|
|
118
|
+
|
|
119
|
+
if not os.path.isdir(abs_dir):
|
|
120
|
+
print(f"Error: '{directory}' is not a directory", file=sys.stderr) # noqa: T201
|
|
121
|
+
sys.exit(1)
|
|
122
|
+
|
|
123
|
+
return abs_dir
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def print_startup_info(
|
|
127
|
+
entities_dir: str, host: str, port: int, ui_enabled: bool, reload: bool, auth_token: str | None = None
|
|
128
|
+
) -> None:
|
|
129
|
+
"""Print startup information."""
|
|
130
|
+
print("Agent Framework DevUI") # noqa: T201
|
|
131
|
+
print("=" * 50) # noqa: T201
|
|
132
|
+
print(f"Entities directory: {entities_dir}") # noqa: T201
|
|
133
|
+
print(f"Server URL: http://{host}:{port}") # noqa: T201
|
|
134
|
+
print(f"UI enabled: {'Yes' if ui_enabled else 'No'}") # noqa: T201
|
|
135
|
+
print(f"Auto-reload: {'Yes' if reload else 'No'}") # noqa: T201
|
|
136
|
+
|
|
137
|
+
# Display auth token if authentication is enabled
|
|
138
|
+
if auth_token:
|
|
139
|
+
print("Authentication: Enabled") # noqa: T201
|
|
140
|
+
print(f"Auth token: {auth_token}") # noqa: T201
|
|
141
|
+
print("💡 Use this token in Authorization: Bearer <token> header") # noqa: T201
|
|
142
|
+
|
|
143
|
+
print("=" * 50) # noqa: T201
|
|
144
|
+
print("Scanning for entities...") # noqa: T201
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def main() -> None:
|
|
148
|
+
"""Main CLI entry point."""
|
|
149
|
+
parser = create_cli_parser()
|
|
150
|
+
args = parser.parse_args()
|
|
151
|
+
|
|
152
|
+
# Setup logging
|
|
153
|
+
setup_logging(args.log_level)
|
|
154
|
+
|
|
155
|
+
# Validate directory
|
|
156
|
+
entities_dir = validate_directory(args.directory)
|
|
157
|
+
|
|
158
|
+
# Extract parameters directly from args
|
|
159
|
+
ui_enabled = not args.headless
|
|
160
|
+
|
|
161
|
+
# Determine mode from --mode or --dev/--no-dev flags
|
|
162
|
+
if args.dev_mode is not None:
|
|
163
|
+
# --dev or --no-dev was specified
|
|
164
|
+
mode = "developer" if args.dev_mode else "user"
|
|
165
|
+
elif args.mode is not None:
|
|
166
|
+
# --mode was specified
|
|
167
|
+
mode = args.mode
|
|
168
|
+
else:
|
|
169
|
+
# Default to developer mode
|
|
170
|
+
mode = "developer"
|
|
171
|
+
|
|
172
|
+
# Print startup info (don't show token - serve() will handle it)
|
|
173
|
+
print_startup_info(entities_dir, args.host, args.port, ui_enabled, args.reload, None)
|
|
174
|
+
|
|
175
|
+
# Import and start server
|
|
176
|
+
try:
|
|
177
|
+
from . import serve
|
|
178
|
+
|
|
179
|
+
serve(
|
|
180
|
+
entities_dir=entities_dir,
|
|
181
|
+
port=args.port,
|
|
182
|
+
host=args.host,
|
|
183
|
+
auto_open=not args.no_open,
|
|
184
|
+
ui_enabled=ui_enabled,
|
|
185
|
+
instrumentation_enabled=args.instrumentation,
|
|
186
|
+
mode=mode,
|
|
187
|
+
auth_enabled=args.auth,
|
|
188
|
+
auth_token=args.auth_token, # Pass through explicit token only
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
except KeyboardInterrupt:
|
|
192
|
+
print("\nShutting down Agent Framework DevUI...") # noqa: T201
|
|
193
|
+
sys.exit(0)
|
|
194
|
+
except Exception as e:
|
|
195
|
+
logger.exception("Failed to start server")
|
|
196
|
+
print(f"Error: {e}", file=sys.stderr) # noqa: T201
|
|
197
|
+
sys.exit(1)
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
if __name__ == "__main__":
|
|
201
|
+
main()
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# Copyright (c) Microsoft. All rights reserved.
|
|
2
|
-
|
|
3
|
-
"""OpenAI integration for DevUI - proxy support for OpenAI Responses API."""
|
|
4
|
-
|
|
5
|
-
from ._executor import OpenAIExecutor
|
|
6
|
-
|
|
7
|
-
__all__ = [
|
|
8
|
-
"OpenAIExecutor",
|
|
9
|
-
]
|
|
1
|
+
# Copyright (c) Microsoft. All rights reserved.
|
|
2
|
+
|
|
3
|
+
"""OpenAI integration for DevUI - proxy support for OpenAI Responses API."""
|
|
4
|
+
|
|
5
|
+
from ._executor import OpenAIExecutor
|
|
6
|
+
|
|
7
|
+
__all__ = [
|
|
8
|
+
"OpenAIExecutor",
|
|
9
|
+
]
|
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
# Copyright (c) Microsoft. All rights reserved.
|
|
2
|
-
|
|
3
|
-
"""Agent Framework DevUI Models - OpenAI-compatible types and custom extensions."""
|
|
4
|
-
|
|
5
|
-
# Import discovery models
|
|
6
|
-
# Import all OpenAI types directly from the openai package
|
|
7
|
-
from openai.types.conversations import Conversation, ConversationDeletedResource
|
|
8
|
-
from openai.types.conversations.conversation_item import ConversationItem
|
|
9
|
-
from openai.types.responses import (
|
|
10
|
-
Response,
|
|
11
|
-
ResponseCompletedEvent,
|
|
12
|
-
ResponseErrorEvent,
|
|
13
|
-
ResponseFunctionCallArgumentsDeltaEvent,
|
|
14
|
-
ResponseFunctionToolCall,
|
|
15
|
-
ResponseFunctionToolCallOutputItem,
|
|
16
|
-
ResponseInputParam,
|
|
17
|
-
ResponseOutputItemAddedEvent,
|
|
18
|
-
ResponseOutputItemDoneEvent,
|
|
19
|
-
ResponseOutputMessage,
|
|
20
|
-
ResponseOutputText,
|
|
21
|
-
ResponseReasoningTextDeltaEvent,
|
|
22
|
-
ResponseStreamEvent,
|
|
23
|
-
ResponseTextDeltaEvent,
|
|
24
|
-
ResponseUsage,
|
|
25
|
-
ToolParam,
|
|
26
|
-
)
|
|
27
|
-
from openai.types.responses.response_usage import InputTokensDetails, OutputTokensDetails
|
|
28
|
-
from openai.types.shared import Metadata, ResponsesModel
|
|
29
|
-
|
|
30
|
-
from ._discovery_models import Deployment, DeploymentConfig, DeploymentEvent, DiscoveryResponse, EntityInfo
|
|
31
|
-
from ._openai_custom import (
|
|
32
|
-
AgentFrameworkRequest,
|
|
33
|
-
CustomResponseOutputItemAddedEvent,
|
|
34
|
-
CustomResponseOutputItemDoneEvent,
|
|
35
|
-
ExecutorActionItem,
|
|
36
|
-
MetaResponse,
|
|
37
|
-
OpenAIError,
|
|
38
|
-
ResponseFunctionResultComplete,
|
|
39
|
-
ResponseOutputData,
|
|
40
|
-
ResponseOutputFile,
|
|
41
|
-
ResponseOutputImage,
|
|
42
|
-
ResponseTraceEvent,
|
|
43
|
-
ResponseTraceEventComplete,
|
|
44
|
-
ResponseWorkflowEventComplete,
|
|
45
|
-
)
|
|
46
|
-
|
|
47
|
-
# Type alias for compatibility
|
|
48
|
-
OpenAIResponse = Response
|
|
49
|
-
|
|
50
|
-
# Export all types for easy importing
|
|
51
|
-
__all__ = [
|
|
52
|
-
"AgentFrameworkRequest",
|
|
53
|
-
"Conversation",
|
|
54
|
-
"ConversationDeletedResource",
|
|
55
|
-
"ConversationItem",
|
|
56
|
-
"CustomResponseOutputItemAddedEvent",
|
|
57
|
-
"CustomResponseOutputItemDoneEvent",
|
|
58
|
-
"Deployment",
|
|
59
|
-
"DeploymentConfig",
|
|
60
|
-
"DeploymentEvent",
|
|
61
|
-
"DiscoveryResponse",
|
|
62
|
-
"EntityInfo",
|
|
63
|
-
"ExecutorActionItem",
|
|
64
|
-
"InputTokensDetails",
|
|
65
|
-
"MetaResponse",
|
|
66
|
-
"Metadata",
|
|
67
|
-
"OpenAIError",
|
|
68
|
-
"OpenAIResponse",
|
|
69
|
-
"OutputTokensDetails",
|
|
70
|
-
"Response",
|
|
71
|
-
"ResponseCompletedEvent",
|
|
72
|
-
"ResponseErrorEvent",
|
|
73
|
-
"ResponseFunctionCallArgumentsDeltaEvent",
|
|
74
|
-
"ResponseFunctionResultComplete",
|
|
75
|
-
"ResponseFunctionToolCall",
|
|
76
|
-
"ResponseFunctionToolCallOutputItem",
|
|
77
|
-
"ResponseInputParam",
|
|
78
|
-
"ResponseOutputData",
|
|
79
|
-
"ResponseOutputFile",
|
|
80
|
-
"ResponseOutputImage",
|
|
81
|
-
"ResponseOutputItemAddedEvent",
|
|
82
|
-
"ResponseOutputItemDoneEvent",
|
|
83
|
-
"ResponseOutputMessage",
|
|
84
|
-
"ResponseOutputText",
|
|
85
|
-
"ResponseReasoningTextDeltaEvent",
|
|
86
|
-
"ResponseStreamEvent",
|
|
87
|
-
"ResponseTextDeltaEvent",
|
|
88
|
-
"ResponseTraceEvent",
|
|
89
|
-
"ResponseTraceEventComplete",
|
|
90
|
-
"ResponseUsage",
|
|
91
|
-
"ResponseWorkflowEventComplete",
|
|
92
|
-
"ResponsesModel",
|
|
93
|
-
"ToolParam",
|
|
94
|
-
]
|
|
1
|
+
# Copyright (c) Microsoft. All rights reserved.
|
|
2
|
+
|
|
3
|
+
"""Agent Framework DevUI Models - OpenAI-compatible types and custom extensions."""
|
|
4
|
+
|
|
5
|
+
# Import discovery models
|
|
6
|
+
# Import all OpenAI types directly from the openai package
|
|
7
|
+
from openai.types.conversations import Conversation, ConversationDeletedResource
|
|
8
|
+
from openai.types.conversations.conversation_item import ConversationItem
|
|
9
|
+
from openai.types.responses import (
|
|
10
|
+
Response,
|
|
11
|
+
ResponseCompletedEvent,
|
|
12
|
+
ResponseErrorEvent,
|
|
13
|
+
ResponseFunctionCallArgumentsDeltaEvent,
|
|
14
|
+
ResponseFunctionToolCall,
|
|
15
|
+
ResponseFunctionToolCallOutputItem,
|
|
16
|
+
ResponseInputParam,
|
|
17
|
+
ResponseOutputItemAddedEvent,
|
|
18
|
+
ResponseOutputItemDoneEvent,
|
|
19
|
+
ResponseOutputMessage,
|
|
20
|
+
ResponseOutputText,
|
|
21
|
+
ResponseReasoningTextDeltaEvent,
|
|
22
|
+
ResponseStreamEvent,
|
|
23
|
+
ResponseTextDeltaEvent,
|
|
24
|
+
ResponseUsage,
|
|
25
|
+
ToolParam,
|
|
26
|
+
)
|
|
27
|
+
from openai.types.responses.response_usage import InputTokensDetails, OutputTokensDetails
|
|
28
|
+
from openai.types.shared import Metadata, ResponsesModel
|
|
29
|
+
|
|
30
|
+
from ._discovery_models import Deployment, DeploymentConfig, DeploymentEvent, DiscoveryResponse, EntityInfo
|
|
31
|
+
from ._openai_custom import (
|
|
32
|
+
AgentFrameworkRequest,
|
|
33
|
+
CustomResponseOutputItemAddedEvent,
|
|
34
|
+
CustomResponseOutputItemDoneEvent,
|
|
35
|
+
ExecutorActionItem,
|
|
36
|
+
MetaResponse,
|
|
37
|
+
OpenAIError,
|
|
38
|
+
ResponseFunctionResultComplete,
|
|
39
|
+
ResponseOutputData,
|
|
40
|
+
ResponseOutputFile,
|
|
41
|
+
ResponseOutputImage,
|
|
42
|
+
ResponseTraceEvent,
|
|
43
|
+
ResponseTraceEventComplete,
|
|
44
|
+
ResponseWorkflowEventComplete,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
# Type alias for compatibility
|
|
48
|
+
OpenAIResponse = Response
|
|
49
|
+
|
|
50
|
+
# Export all types for easy importing
|
|
51
|
+
__all__ = [
|
|
52
|
+
"AgentFrameworkRequest",
|
|
53
|
+
"Conversation",
|
|
54
|
+
"ConversationDeletedResource",
|
|
55
|
+
"ConversationItem",
|
|
56
|
+
"CustomResponseOutputItemAddedEvent",
|
|
57
|
+
"CustomResponseOutputItemDoneEvent",
|
|
58
|
+
"Deployment",
|
|
59
|
+
"DeploymentConfig",
|
|
60
|
+
"DeploymentEvent",
|
|
61
|
+
"DiscoveryResponse",
|
|
62
|
+
"EntityInfo",
|
|
63
|
+
"ExecutorActionItem",
|
|
64
|
+
"InputTokensDetails",
|
|
65
|
+
"MetaResponse",
|
|
66
|
+
"Metadata",
|
|
67
|
+
"OpenAIError",
|
|
68
|
+
"OpenAIResponse",
|
|
69
|
+
"OutputTokensDetails",
|
|
70
|
+
"Response",
|
|
71
|
+
"ResponseCompletedEvent",
|
|
72
|
+
"ResponseErrorEvent",
|
|
73
|
+
"ResponseFunctionCallArgumentsDeltaEvent",
|
|
74
|
+
"ResponseFunctionResultComplete",
|
|
75
|
+
"ResponseFunctionToolCall",
|
|
76
|
+
"ResponseFunctionToolCallOutputItem",
|
|
77
|
+
"ResponseInputParam",
|
|
78
|
+
"ResponseOutputData",
|
|
79
|
+
"ResponseOutputFile",
|
|
80
|
+
"ResponseOutputImage",
|
|
81
|
+
"ResponseOutputItemAddedEvent",
|
|
82
|
+
"ResponseOutputItemDoneEvent",
|
|
83
|
+
"ResponseOutputMessage",
|
|
84
|
+
"ResponseOutputText",
|
|
85
|
+
"ResponseReasoningTextDeltaEvent",
|
|
86
|
+
"ResponseStreamEvent",
|
|
87
|
+
"ResponseTextDeltaEvent",
|
|
88
|
+
"ResponseTraceEvent",
|
|
89
|
+
"ResponseTraceEventComplete",
|
|
90
|
+
"ResponseUsage",
|
|
91
|
+
"ResponseWorkflowEventComplete",
|
|
92
|
+
"ResponsesModel",
|
|
93
|
+
"ToolParam",
|
|
94
|
+
]
|