airia 0.1.34__py3-none-any.whl → 0.1.36__py3-none-any.whl
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.
- airia/__init__.py +15 -2
- airia/client/_request_handler/async_request_handler.py +2 -2
- airia/client/_request_handler/base_request_handler.py +2 -3
- airia/client/_request_handler/sync_request_handler.py +2 -2
- airia/client/async_client.py +5 -6
- airia/client/base_client.py +2 -3
- airia/client/sync_client.py +5 -6
- airia/logs.py +178 -48
- airia/types/api/pipelines_config/__init__.py +30 -14
- airia/types/api/pipelines_config/export_pipeline_definition.py +581 -70
- {airia-0.1.34.dist-info → airia-0.1.36.dist-info}/METADATA +10 -4
- {airia-0.1.34.dist-info → airia-0.1.36.dist-info}/RECORD +15 -15
- {airia-0.1.34.dist-info → airia-0.1.36.dist-info}/WHEEL +0 -0
- {airia-0.1.34.dist-info → airia-0.1.36.dist-info}/licenses/LICENSE +0 -0
- {airia-0.1.34.dist-info → airia-0.1.36.dist-info}/top_level.txt +0 -0
airia/__init__.py
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
from .logs import
|
|
1
|
+
from .logs import (
|
|
2
|
+
configure_logging,
|
|
3
|
+
set_correlation_id,
|
|
4
|
+
get_correlation_id,
|
|
5
|
+
clear_correlation_id,
|
|
6
|
+
)
|
|
2
7
|
from .client import AiriaClient, AiriaAsyncClient
|
|
3
8
|
from .exceptions import AiriaAPIError
|
|
4
9
|
|
|
5
10
|
__version__ = "0.1.0"
|
|
6
|
-
__all__ = [
|
|
11
|
+
__all__ = [
|
|
12
|
+
"AiriaClient",
|
|
13
|
+
"AiriaAsyncClient",
|
|
14
|
+
"AiriaAPIError",
|
|
15
|
+
"configure_logging",
|
|
16
|
+
"set_correlation_id",
|
|
17
|
+
"get_correlation_id",
|
|
18
|
+
"clear_correlation_id",
|
|
19
|
+
]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
+
import logging
|
|
2
3
|
import weakref
|
|
3
4
|
from typing import Any, AsyncIterator, Dict, Optional
|
|
4
5
|
|
|
5
6
|
import aiohttp
|
|
6
|
-
import loguru
|
|
7
7
|
|
|
8
8
|
from ...exceptions import AiriaAPIError
|
|
9
9
|
from ...types._request_data import RequestData
|
|
@@ -14,7 +14,7 @@ from .base_request_handler import BaseRequestHandler
|
|
|
14
14
|
class AsyncRequestHandler(BaseRequestHandler):
|
|
15
15
|
def __init__(
|
|
16
16
|
self,
|
|
17
|
-
logger:
|
|
17
|
+
logger: logging.Logger,
|
|
18
18
|
timeout: float,
|
|
19
19
|
base_url: str,
|
|
20
20
|
api_key: Optional[str] = None,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import json
|
|
2
|
+
import logging
|
|
2
3
|
from typing import Any, Dict, Optional
|
|
3
4
|
|
|
4
|
-
import loguru
|
|
5
|
-
|
|
6
5
|
from ...logs import set_correlation_id
|
|
7
6
|
from ...types._request_data import RequestData
|
|
8
7
|
|
|
@@ -10,7 +9,7 @@ from ...types._request_data import RequestData
|
|
|
10
9
|
class BaseRequestHandler:
|
|
11
10
|
def __init__(
|
|
12
11
|
self,
|
|
13
|
-
logger:
|
|
12
|
+
logger: logging.Logger,
|
|
14
13
|
timeout: float,
|
|
15
14
|
base_url: str,
|
|
16
15
|
api_key: Optional[str] = None,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import logging
|
|
1
2
|
import weakref
|
|
2
3
|
from typing import Any, Dict, Optional
|
|
3
4
|
|
|
4
|
-
import loguru
|
|
5
5
|
import requests
|
|
6
6
|
|
|
7
7
|
from ...exceptions import AiriaAPIError
|
|
@@ -13,7 +13,7 @@ from .base_request_handler import BaseRequestHandler
|
|
|
13
13
|
class RequestHandler(BaseRequestHandler):
|
|
14
14
|
def __init__(
|
|
15
15
|
self,
|
|
16
|
-
logger:
|
|
16
|
+
logger: logging.Logger,
|
|
17
17
|
timeout: float,
|
|
18
18
|
base_url: str,
|
|
19
19
|
api_key: Optional[str] = None,
|
airia/client/async_client.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import logging
|
|
1
2
|
from typing import Optional
|
|
2
3
|
|
|
3
|
-
import loguru
|
|
4
|
-
|
|
5
4
|
from ..constants import (
|
|
6
5
|
DEFAULT_ANTHROPIC_GATEWAY_URL,
|
|
7
6
|
DEFAULT_BASE_URL,
|
|
@@ -34,7 +33,7 @@ class AiriaAsyncClient(AiriaBaseClient):
|
|
|
34
33
|
bearer_token: Optional[str] = None,
|
|
35
34
|
timeout: float = DEFAULT_TIMEOUT,
|
|
36
35
|
log_requests: bool = False,
|
|
37
|
-
custom_logger: Optional[
|
|
36
|
+
custom_logger: Optional[logging.Logger] = None,
|
|
38
37
|
):
|
|
39
38
|
"""
|
|
40
39
|
Initialize the asynchronous Airia API client.
|
|
@@ -85,7 +84,7 @@ class AiriaAsyncClient(AiriaBaseClient):
|
|
|
85
84
|
api_key: Optional[str] = None,
|
|
86
85
|
timeout: float = DEFAULT_TIMEOUT,
|
|
87
86
|
log_requests: bool = False,
|
|
88
|
-
custom_logger: Optional[
|
|
87
|
+
custom_logger: Optional[logging.Logger] = None,
|
|
89
88
|
**kwargs,
|
|
90
89
|
):
|
|
91
90
|
"""
|
|
@@ -125,7 +124,7 @@ class AiriaAsyncClient(AiriaBaseClient):
|
|
|
125
124
|
api_key: Optional[str] = None,
|
|
126
125
|
timeout: float = DEFAULT_TIMEOUT,
|
|
127
126
|
log_requests: bool = False,
|
|
128
|
-
custom_logger: Optional[
|
|
127
|
+
custom_logger: Optional[logging.Logger] = None,
|
|
129
128
|
**kwargs,
|
|
130
129
|
):
|
|
131
130
|
"""
|
|
@@ -164,7 +163,7 @@ class AiriaAsyncClient(AiriaBaseClient):
|
|
|
164
163
|
base_url: str = DEFAULT_BASE_URL,
|
|
165
164
|
timeout: float = DEFAULT_TIMEOUT,
|
|
166
165
|
log_requests: bool = False,
|
|
167
|
-
custom_logger: Optional[
|
|
166
|
+
custom_logger: Optional[logging.Logger] = None,
|
|
168
167
|
):
|
|
169
168
|
"""
|
|
170
169
|
Initialize the asynchronous Airia API client with bearer token authentication.
|
airia/client/base_client.py
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import logging
|
|
1
2
|
import os
|
|
2
3
|
from typing import Optional
|
|
3
4
|
|
|
4
|
-
import loguru
|
|
5
|
-
|
|
6
5
|
from ..constants import DEFAULT_BASE_URL, DEFAULT_TIMEOUT
|
|
7
6
|
from ..logs import configure_logging
|
|
8
7
|
|
|
@@ -20,7 +19,7 @@ class AiriaBaseClient:
|
|
|
20
19
|
bearer_token: Optional[str] = None,
|
|
21
20
|
timeout: float = DEFAULT_TIMEOUT,
|
|
22
21
|
log_requests: bool = False,
|
|
23
|
-
custom_logger: Optional[
|
|
22
|
+
custom_logger: Optional[logging.Logger] = None,
|
|
24
23
|
):
|
|
25
24
|
"""
|
|
26
25
|
Initialize the Airia API client base class.
|
airia/client/sync_client.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import logging
|
|
1
2
|
from typing import Optional
|
|
2
3
|
|
|
3
|
-
import loguru
|
|
4
|
-
|
|
5
4
|
from ..constants import (
|
|
6
5
|
DEFAULT_ANTHROPIC_GATEWAY_URL,
|
|
7
6
|
DEFAULT_BASE_URL,
|
|
@@ -34,7 +33,7 @@ class AiriaClient(AiriaBaseClient):
|
|
|
34
33
|
bearer_token: Optional[str] = None,
|
|
35
34
|
timeout: float = DEFAULT_TIMEOUT,
|
|
36
35
|
log_requests: bool = False,
|
|
37
|
-
custom_logger: Optional[
|
|
36
|
+
custom_logger: Optional[logging.Logger] = None,
|
|
38
37
|
):
|
|
39
38
|
"""
|
|
40
39
|
Initialize the synchronous Airia API client.
|
|
@@ -85,7 +84,7 @@ class AiriaClient(AiriaBaseClient):
|
|
|
85
84
|
api_key: Optional[str] = None,
|
|
86
85
|
timeout: float = DEFAULT_TIMEOUT,
|
|
87
86
|
log_requests: bool = False,
|
|
88
|
-
custom_logger: Optional[
|
|
87
|
+
custom_logger: Optional[logging.Logger] = None,
|
|
89
88
|
**kwargs,
|
|
90
89
|
):
|
|
91
90
|
"""
|
|
@@ -125,7 +124,7 @@ class AiriaClient(AiriaBaseClient):
|
|
|
125
124
|
api_key: Optional[str] = None,
|
|
126
125
|
timeout: float = DEFAULT_TIMEOUT,
|
|
127
126
|
log_requests: bool = False,
|
|
128
|
-
custom_logger: Optional[
|
|
127
|
+
custom_logger: Optional[logging.Logger] = None,
|
|
129
128
|
**kwargs,
|
|
130
129
|
):
|
|
131
130
|
"""
|
|
@@ -164,7 +163,7 @@ class AiriaClient(AiriaBaseClient):
|
|
|
164
163
|
base_url: str = DEFAULT_BASE_URL,
|
|
165
164
|
timeout: float = DEFAULT_TIMEOUT,
|
|
166
165
|
log_requests: bool = False,
|
|
167
|
-
custom_logger: Optional[
|
|
166
|
+
custom_logger: Optional[logging.Logger] = None,
|
|
168
167
|
):
|
|
169
168
|
"""
|
|
170
169
|
Initialize the synchronous Airia API client with bearer token authentication.
|
airia/logs.py
CHANGED
|
@@ -1,15 +1,42 @@
|
|
|
1
|
+
import logging
|
|
1
2
|
import os
|
|
2
3
|
import sys
|
|
3
4
|
import uuid
|
|
4
5
|
from contextvars import ContextVar
|
|
5
6
|
from typing import BinaryIO, Optional, TextIO, Union
|
|
6
7
|
|
|
7
|
-
import loguru
|
|
8
|
-
from loguru import logger
|
|
9
|
-
|
|
10
8
|
# Create a context variable to store correlation ID
|
|
11
9
|
correlation_id_context: ContextVar[str] = ContextVar("correlation_id", default="")
|
|
12
10
|
|
|
11
|
+
# ANSI color codes
|
|
12
|
+
RESET = "\033[0m"
|
|
13
|
+
COLORS = {
|
|
14
|
+
"DEBUG": "\033[36m", # Cyan
|
|
15
|
+
"INFO": "\033[32m", # Green
|
|
16
|
+
"WARNING": "\033[33m", # Yellow
|
|
17
|
+
"ERROR": "\033[31m", # Red
|
|
18
|
+
"CRITICAL": "\033[35m", # Magenta
|
|
19
|
+
}
|
|
20
|
+
GREY = "\033[90m" # Grey for metadata
|
|
21
|
+
MAGENTA = "\033[35m" # Magenta for correlation ID
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _enable_windows_ansi_support():
|
|
25
|
+
"""Enable ANSI color support on Windows."""
|
|
26
|
+
if sys.platform == "win32":
|
|
27
|
+
try:
|
|
28
|
+
import ctypes
|
|
29
|
+
|
|
30
|
+
kernel32 = ctypes.windll.kernel32
|
|
31
|
+
kernel32.SetConsoleMode(kernel32.GetStdHandle(-11), 7)
|
|
32
|
+
except Exception:
|
|
33
|
+
# If it fails, colors just won't work on Windows
|
|
34
|
+
pass
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# Enable Windows ANSI support at module load
|
|
38
|
+
_enable_windows_ansi_support()
|
|
39
|
+
|
|
13
40
|
|
|
14
41
|
def get_correlation_id() -> str:
|
|
15
42
|
"""
|
|
@@ -42,71 +69,175 @@ def clear_correlation_id() -> None:
|
|
|
42
69
|
correlation_id_context.set("")
|
|
43
70
|
|
|
44
71
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
72
|
+
class CorrelationIdFilter(logging.Filter):
|
|
73
|
+
"""Filter to inject correlation_id into log records."""
|
|
74
|
+
|
|
75
|
+
def filter(self, record):
|
|
76
|
+
"""Add correlation_id to the log record."""
|
|
77
|
+
record.correlation_id = get_correlation_id() or "no-correlation-id"
|
|
78
|
+
return True
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class ColoredFormatter(logging.Formatter):
|
|
82
|
+
"""Custom formatter that adds colors to log output using ANSI codes."""
|
|
83
|
+
|
|
84
|
+
def __init__(self, fmt: Optional[str] = None, use_colors: bool = True):
|
|
85
|
+
"""
|
|
86
|
+
Initialize the colored formatter.
|
|
87
|
+
|
|
88
|
+
Args:
|
|
89
|
+
fmt: The format string for log messages
|
|
90
|
+
use_colors: Whether to use ANSI color codes
|
|
91
|
+
"""
|
|
92
|
+
super().__init__(fmt)
|
|
93
|
+
self.use_colors = use_colors
|
|
94
|
+
|
|
95
|
+
def format(self, record: logging.LogRecord) -> str:
|
|
96
|
+
"""Format the log record with colors."""
|
|
97
|
+
if not self.use_colors:
|
|
98
|
+
return super().format(record)
|
|
99
|
+
|
|
100
|
+
# Get the color for this log level
|
|
101
|
+
level_color = COLORS.get(record.levelname, "")
|
|
102
|
+
|
|
103
|
+
# Save the original values
|
|
104
|
+
orig_levelname = record.levelname
|
|
105
|
+
orig_msg = record.msg
|
|
106
|
+
|
|
107
|
+
# Color the level name
|
|
108
|
+
record.levelname = f"{level_color}{record.levelname}{RESET}"
|
|
109
|
+
|
|
110
|
+
# Format the message
|
|
111
|
+
formatted = super().format(record)
|
|
112
|
+
|
|
113
|
+
# Restore original values
|
|
114
|
+
record.levelname = orig_levelname
|
|
115
|
+
record.msg = orig_msg
|
|
116
|
+
|
|
117
|
+
# Add colors to specific parts of the formatted message
|
|
118
|
+
# Color the correlation ID if present
|
|
119
|
+
if hasattr(record, "correlation_id"):
|
|
120
|
+
formatted = formatted.replace(
|
|
121
|
+
f"[{record.correlation_id}]",
|
|
122
|
+
f"{MAGENTA}[{record.correlation_id}]{RESET}",
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
# Color the timestamp (first part before |)
|
|
126
|
+
parts = formatted.split("|", 1)
|
|
127
|
+
if len(parts) > 1:
|
|
128
|
+
timestamp_part = parts[0].split("]", 1)
|
|
129
|
+
if len(timestamp_part) > 1:
|
|
130
|
+
# Has correlation ID
|
|
131
|
+
formatted = (
|
|
132
|
+
timestamp_part[0]
|
|
133
|
+
+ "]"
|
|
134
|
+
+ f"{GREY}{timestamp_part[1]}{RESET}|"
|
|
135
|
+
+ parts[1]
|
|
136
|
+
)
|
|
137
|
+
else:
|
|
138
|
+
# No correlation ID
|
|
139
|
+
formatted = f"{GREY}{parts[0]}{RESET}|{parts[1]}"
|
|
140
|
+
|
|
141
|
+
return formatted
|
|
49
142
|
|
|
50
143
|
|
|
51
144
|
def configure_logging(
|
|
52
|
-
format_string: str =
|
|
145
|
+
format_string: Optional[str] = None,
|
|
53
146
|
level: str = "INFO",
|
|
54
147
|
sink: Union[os.PathLike[str], TextIO, BinaryIO] = sys.stderr,
|
|
55
|
-
rotation: Optional[str] = None,
|
|
56
|
-
retention: Optional[str] = None,
|
|
57
148
|
include_correlation_id: bool = True,
|
|
58
|
-
|
|
149
|
+
use_colors: bool = True,
|
|
150
|
+
) -> logging.Logger:
|
|
59
151
|
"""
|
|
60
|
-
Configure the
|
|
61
|
-
Check [Loguru Documentation](https://loguru.readthedocs.io/en/stable/api/logger.html) for more details.
|
|
152
|
+
Configure the logger with custom settings using Python's standard logging module.
|
|
62
153
|
|
|
63
154
|
Args:
|
|
64
|
-
format_string (str): The format string for log messages.
|
|
155
|
+
format_string (Optional[str]): The format string for log messages.
|
|
156
|
+
If None, a default format will be used.
|
|
65
157
|
level (str): The minimum logging level. Default: "INFO"
|
|
66
158
|
sink: Where to send the log. Default: sys.stderr
|
|
67
|
-
|
|
68
|
-
Example: "10 MB", "1 day"
|
|
69
|
-
Only used when sink is a file path.
|
|
70
|
-
retention (str, optional): How long to keep log files.
|
|
71
|
-
Example: "1 week", "10 days"
|
|
72
|
-
Only used when sink is a file path.
|
|
159
|
+
Can be a file path, TextIO, or BinaryIO.
|
|
73
160
|
include_correlation_id (bool): Whether to include correlation ID in log messages.
|
|
74
161
|
Default: True
|
|
162
|
+
use_colors (bool): Whether to use colored output for console logging.
|
|
163
|
+
Automatically disabled for file output. Default: True
|
|
75
164
|
|
|
76
165
|
Returns:
|
|
77
|
-
The configured logger object
|
|
166
|
+
logging.Logger: The configured logger object
|
|
167
|
+
|
|
168
|
+
Example:
|
|
169
|
+
```python
|
|
170
|
+
from airia import configure_logging
|
|
171
|
+
|
|
172
|
+
# Basic configuration with colors
|
|
173
|
+
logger = configure_logging()
|
|
174
|
+
|
|
175
|
+
# Disable colors
|
|
176
|
+
logger = configure_logging(use_colors=False)
|
|
177
|
+
|
|
178
|
+
# File-based logging (colors automatically disabled)
|
|
179
|
+
file_logger = configure_logging(
|
|
180
|
+
level="DEBUG",
|
|
181
|
+
sink="app.log",
|
|
182
|
+
include_correlation_id=True
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
# Console output
|
|
186
|
+
console_logger = configure_logging(
|
|
187
|
+
level="INFO",
|
|
188
|
+
sink=sys.stdout
|
|
189
|
+
)
|
|
190
|
+
```
|
|
78
191
|
"""
|
|
79
|
-
|
|
80
|
-
logger.
|
|
192
|
+
logger = logging.getLogger("airia")
|
|
193
|
+
logger.handlers.clear()
|
|
194
|
+
logger.setLevel(getattr(logging, level.upper(), logging.INFO))
|
|
81
195
|
|
|
82
|
-
#
|
|
83
|
-
|
|
84
|
-
|
|
196
|
+
# Determine if this is file or console output
|
|
197
|
+
is_file_output = isinstance(sink, (str, os.PathLike))
|
|
198
|
+
|
|
199
|
+
# Create handler based on sink type
|
|
200
|
+
if is_file_output:
|
|
201
|
+
handler = logging.FileHandler(str(sink))
|
|
202
|
+
# Disable colors for file output
|
|
203
|
+
use_colors = False
|
|
204
|
+
elif hasattr(sink, "write"):
|
|
205
|
+
handler = logging.StreamHandler(sink) # type: ignore
|
|
206
|
+
else:
|
|
207
|
+
handler = logging.StreamHandler(sys.stderr)
|
|
208
|
+
|
|
209
|
+
# Create formatter
|
|
210
|
+
if format_string is None:
|
|
211
|
+
if include_correlation_id:
|
|
212
|
+
format_string = "[%(correlation_id)s] %(asctime)s | %(levelname)-8s | %(name)s:%(funcName)s:%(lineno)d - %(message)s"
|
|
213
|
+
else:
|
|
214
|
+
format_string = "%(asctime)s | %(levelname)-8s | %(name)s:%(funcName)s:%(lineno)d - %(message)s"
|
|
85
215
|
|
|
86
|
-
#
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
216
|
+
# Use ColoredFormatter for console, regular Formatter for files
|
|
217
|
+
if use_colors and not is_file_output:
|
|
218
|
+
formatter = ColoredFormatter(format_string, use_colors=True)
|
|
219
|
+
else:
|
|
220
|
+
formatter = logging.Formatter(format_string)
|
|
92
221
|
|
|
93
|
-
|
|
94
|
-
if rotation is not None:
|
|
95
|
-
kwargs["rotation"] = rotation
|
|
96
|
-
if retention is not None:
|
|
97
|
-
kwargs["retention"] = retention
|
|
222
|
+
handler.setFormatter(formatter)
|
|
98
223
|
|
|
99
|
-
# Add
|
|
100
|
-
|
|
224
|
+
# Add correlation ID filter if enabled
|
|
225
|
+
if include_correlation_id:
|
|
226
|
+
handler.addFilter(CorrelationIdFilter())
|
|
227
|
+
|
|
228
|
+
logger.addHandler(handler)
|
|
101
229
|
|
|
102
230
|
return logger
|
|
103
231
|
|
|
104
232
|
|
|
105
233
|
# Example usage:
|
|
106
234
|
if __name__ == "__main__":
|
|
107
|
-
# Basic configuration (uses sys.stderr)
|
|
235
|
+
# Basic configuration (uses sys.stderr with colors)
|
|
108
236
|
log = configure_logging()
|
|
237
|
+
log.debug("Debug message")
|
|
109
238
|
log.info("Basic logging configured successfully")
|
|
239
|
+
log.warning("This is a warning")
|
|
240
|
+
log.error("This is an error")
|
|
110
241
|
|
|
111
242
|
# Set a correlation ID
|
|
112
243
|
set_correlation_id("request-123")
|
|
@@ -120,18 +251,17 @@ if __name__ == "__main__":
|
|
|
120
251
|
set_correlation_id()
|
|
121
252
|
log.info("This log has an auto-generated correlation ID")
|
|
122
253
|
|
|
123
|
-
# File-based logging
|
|
254
|
+
# File-based logging (colors automatically disabled)
|
|
124
255
|
file_log = configure_logging(
|
|
125
|
-
format_string="[{time:YYYY-MM-DD HH:mm:ss}] [{level}] {message}",
|
|
126
256
|
level="DEBUG",
|
|
127
257
|
sink="app.log",
|
|
128
|
-
rotation="10 MB",
|
|
129
|
-
retention="1 week",
|
|
130
258
|
)
|
|
131
259
|
file_log.debug("File logging configured successfully")
|
|
132
260
|
|
|
133
|
-
# Stream-based logging
|
|
134
|
-
stream_log = configure_logging(
|
|
135
|
-
format_string="[{time:HH:mm:ss}] {message}", level="INFO", sink=sys.stdout
|
|
136
|
-
)
|
|
261
|
+
# Stream-based logging with colors
|
|
262
|
+
stream_log = configure_logging(level="INFO", sink=sys.stdout)
|
|
137
263
|
stream_log.info("Stream logging configured successfully")
|
|
264
|
+
|
|
265
|
+
# Disable colors explicitly
|
|
266
|
+
no_color_log = configure_logging(use_colors=False)
|
|
267
|
+
no_color_log.info("Logging without colors")
|
|
@@ -24,13 +24,17 @@ from .export_pipeline_definition import (
|
|
|
24
24
|
AgentDetailItemDefinition,
|
|
25
25
|
ExportPipelineDefinitionResponse,
|
|
26
26
|
ExportChunkingConfig,
|
|
27
|
+
ExportConditionalBranchConfigDefinition,
|
|
27
28
|
ExportCredentialDataList,
|
|
28
29
|
ExportCredentials,
|
|
30
|
+
ExportCustomCredentials,
|
|
29
31
|
ExportDataSource,
|
|
30
32
|
ExportDataSourceFile,
|
|
31
33
|
ExportDependency,
|
|
32
34
|
ExportDeployment,
|
|
33
35
|
ExportHandle,
|
|
36
|
+
ExportJsonFormatterStepConfiguration,
|
|
37
|
+
ExportLoopStepConfiguration,
|
|
34
38
|
ExportMemory,
|
|
35
39
|
ExportMetadata,
|
|
36
40
|
ExportModel,
|
|
@@ -38,56 +42,68 @@ from .export_pipeline_definition import (
|
|
|
38
42
|
ExportPipelineStep,
|
|
39
43
|
ExportPosition,
|
|
40
44
|
ExportPrompt,
|
|
41
|
-
ExportPromptMessageList,
|
|
42
45
|
ExportPythonCodeBlock,
|
|
46
|
+
ExportRetryConfiguration,
|
|
43
47
|
ExportRouter,
|
|
44
48
|
ExportRouterConfig,
|
|
49
|
+
ExportSDKStepCredentialReference,
|
|
50
|
+
ExportSDKStepDefinition,
|
|
45
51
|
ExportTool,
|
|
46
52
|
ExportToolHeaders,
|
|
47
53
|
ExportToolParameters,
|
|
48
54
|
ExportUserPrompt,
|
|
55
|
+
ExportVectorStore,
|
|
56
|
+
ExportWebhookApprovalRequest,
|
|
49
57
|
)
|
|
50
58
|
|
|
51
59
|
__all__ = [
|
|
52
60
|
"AboutDeploymentMetadata",
|
|
53
61
|
"AgentDetailsEntry",
|
|
62
|
+
"AgentDetailItemDefinition",
|
|
54
63
|
"AgentTrigger",
|
|
55
64
|
"Deployment",
|
|
56
65
|
"DeploymentAssignment",
|
|
57
66
|
"DeploymentUserPrompt",
|
|
58
|
-
"ExportPipelineDefinitionResponse",
|
|
59
|
-
"GetPipelinesConfigResponse",
|
|
60
|
-
"Pipeline",
|
|
61
|
-
"PipelineConfigItem",
|
|
62
|
-
"PipelineConfigResponse",
|
|
63
|
-
"PipelineExecutionStats",
|
|
64
|
-
"PipelineStep",
|
|
65
|
-
"PipelineStepDependency",
|
|
66
|
-
"PipelineStepHandle",
|
|
67
|
-
"PipelineStepPosition",
|
|
68
|
-
"PipelineVersion",
|
|
69
|
-
"AgentDetailItemDefinition",
|
|
70
67
|
"ExportChunkingConfig",
|
|
68
|
+
"ExportConditionalBranchConfigDefinition",
|
|
71
69
|
"ExportCredentialDataList",
|
|
72
70
|
"ExportCredentials",
|
|
71
|
+
"ExportCustomCredentials",
|
|
73
72
|
"ExportDataSource",
|
|
74
73
|
"ExportDataSourceFile",
|
|
75
74
|
"ExportDependency",
|
|
76
75
|
"ExportDeployment",
|
|
77
76
|
"ExportHandle",
|
|
77
|
+
"ExportJsonFormatterStepConfiguration",
|
|
78
|
+
"ExportLoopStepConfiguration",
|
|
78
79
|
"ExportMemory",
|
|
79
80
|
"ExportMetadata",
|
|
80
81
|
"ExportModel",
|
|
81
82
|
"ExportPipeline",
|
|
83
|
+
"ExportPipelineDefinitionResponse",
|
|
82
84
|
"ExportPipelineStep",
|
|
83
85
|
"ExportPosition",
|
|
84
86
|
"ExportPrompt",
|
|
85
|
-
"ExportPromptMessageList",
|
|
86
87
|
"ExportPythonCodeBlock",
|
|
88
|
+
"ExportRetryConfiguration",
|
|
87
89
|
"ExportRouter",
|
|
88
90
|
"ExportRouterConfig",
|
|
91
|
+
"ExportSDKStepCredentialReference",
|
|
92
|
+
"ExportSDKStepDefinition",
|
|
89
93
|
"ExportTool",
|
|
90
94
|
"ExportToolHeaders",
|
|
91
95
|
"ExportToolParameters",
|
|
92
96
|
"ExportUserPrompt",
|
|
97
|
+
"ExportVectorStore",
|
|
98
|
+
"ExportWebhookApprovalRequest",
|
|
99
|
+
"GetPipelinesConfigResponse",
|
|
100
|
+
"Pipeline",
|
|
101
|
+
"PipelineConfigItem",
|
|
102
|
+
"PipelineConfigResponse",
|
|
103
|
+
"PipelineExecutionStats",
|
|
104
|
+
"PipelineStep",
|
|
105
|
+
"PipelineStepDependency",
|
|
106
|
+
"PipelineStepHandle",
|
|
107
|
+
"PipelineStepPosition",
|
|
108
|
+
"PipelineVersion",
|
|
93
109
|
]
|