aidial-sdk 0.46.0.dev7__tar.gz → 0.46.0.dev9__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.
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/PKG-INFO +9 -9
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/telemetry/init.py +19 -9
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/pyproject.toml +10 -10
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/LICENSE +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/README.md +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/__init__.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/_errors.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/_pydantic/__init__.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/_pydantic/_compat.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/_pydantic/_model_config.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/application.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/chat_completion/__init__.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/chat_completion/_cache.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/chat_completion/_types.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/chat_completion/base.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/chat_completion/choice.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/chat_completion/choice_base.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/chat_completion/chunks.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/chat_completion/enums.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/chat_completion/form.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/chat_completion/function_call.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/chat_completion/function_tool_call.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/chat_completion/request.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/chat_completion/response.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/chat_completion/stage.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/deployment/__init__.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/deployment/_headers.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/deployment/configuration.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/deployment/from_request_mixin.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/deployment/rate.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/deployment/tokenize.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/deployment/truncate_prompt.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/embeddings/__init__.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/embeddings/base.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/embeddings/request.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/embeddings/response.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/exceptions.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/header_propagator.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/py.typed +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/pydantic/v2.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/pydantic_v1/__init__.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/response_headers.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/telemetry/__init__.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/telemetry/_context.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/telemetry/types.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/__init__.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/_attachment.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/_cancel_scope.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/_content_stream.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/_disconnect_middleware.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/_indexed_list.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/_json_log_formatter.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/_logging.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/_reflection.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/env.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/errors.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/json.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/log_config.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/logging.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/merge_chunks.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/pydantic.py +0 -0
- {aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/streaming.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aidial-sdk
|
|
3
|
-
Version: 0.46.0.
|
|
3
|
+
Version: 0.46.0.dev9
|
|
4
4
|
Summary: Framework to create applications and model adapters for AI DIAL
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -19,14 +19,14 @@ Requires-Dist: fastapi (>=0.51,<1.0)
|
|
|
19
19
|
Requires-Dist: httpx (>=0.25.0,<1.0) ; extra == "httpx"
|
|
20
20
|
Requires-Dist: opentelemetry-api (>=1.22.0,<2.0) ; extra == "telemetry"
|
|
21
21
|
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc (>=1.22.0,<2.0) ; extra == "telemetry"
|
|
22
|
-
Requires-Dist: opentelemetry-exporter-prometheus (>=0.
|
|
23
|
-
Requires-Dist: opentelemetry-instrumentation-aiohttp-client (>=0.
|
|
24
|
-
Requires-Dist: opentelemetry-instrumentation-fastapi (>=0.
|
|
25
|
-
Requires-Dist: opentelemetry-instrumentation-httpx (>=0.
|
|
26
|
-
Requires-Dist: opentelemetry-instrumentation-logging (>=0.
|
|
27
|
-
Requires-Dist: opentelemetry-instrumentation-requests (>=0.
|
|
28
|
-
Requires-Dist: opentelemetry-instrumentation-system-metrics (>=0.
|
|
29
|
-
Requires-Dist: opentelemetry-instrumentation-urllib (>=0.
|
|
22
|
+
Requires-Dist: opentelemetry-exporter-prometheus (>=0.64b0) ; extra == "telemetry"
|
|
23
|
+
Requires-Dist: opentelemetry-instrumentation-aiohttp-client (>=0.64b0) ; extra == "telemetry"
|
|
24
|
+
Requires-Dist: opentelemetry-instrumentation-fastapi (>=0.64b0) ; extra == "telemetry"
|
|
25
|
+
Requires-Dist: opentelemetry-instrumentation-httpx (>=0.64b0) ; extra == "telemetry"
|
|
26
|
+
Requires-Dist: opentelemetry-instrumentation-logging (>=0.64b0) ; extra == "telemetry"
|
|
27
|
+
Requires-Dist: opentelemetry-instrumentation-requests (>=0.64b0) ; extra == "telemetry"
|
|
28
|
+
Requires-Dist: opentelemetry-instrumentation-system-metrics (>=0.64b0) ; extra == "telemetry"
|
|
29
|
+
Requires-Dist: opentelemetry-instrumentation-urllib (>=0.64b0) ; extra == "telemetry"
|
|
30
30
|
Requires-Dist: opentelemetry-sdk (>=1.22.0,<2.0) ; extra == "telemetry"
|
|
31
31
|
Requires-Dist: prometheus-client (>=0.17.1,<1.0) ; extra == "telemetry"
|
|
32
32
|
Requires-Dist: pydantic (>=1.10.17,<3)
|
|
@@ -18,7 +18,7 @@ from opentelemetry.instrumentation.system_metrics import (
|
|
|
18
18
|
)
|
|
19
19
|
from opentelemetry.instrumentation.urllib import URLLibInstrumentor
|
|
20
20
|
from opentelemetry.metrics import set_meter_provider
|
|
21
|
-
from opentelemetry.sdk._logs import LoggerProvider
|
|
21
|
+
from opentelemetry.sdk._logs import LoggerProvider
|
|
22
22
|
from opentelemetry.sdk._logs.export import (
|
|
23
23
|
BatchLogRecordProcessor,
|
|
24
24
|
ConsoleLogRecordExporter,
|
|
@@ -86,13 +86,6 @@ def init_telemetry(app: FastAPI | None, config: TelemetryConfig):
|
|
|
86
86
|
except ImportError:
|
|
87
87
|
pass
|
|
88
88
|
|
|
89
|
-
set_logging_format = config.tracing.logging
|
|
90
|
-
if set_logging_format:
|
|
91
|
-
# Remove any competing handlers to avoid duplicate logging
|
|
92
|
-
remove_stream_handlers(logging.getLogger(), sys.stderr)
|
|
93
|
-
|
|
94
|
-
LoggingInstrumentor().instrument(set_logging_format=set_logging_format)
|
|
95
|
-
|
|
96
89
|
if config.logs is not None:
|
|
97
90
|
# Adding a handler to the root logger which exports the logs to OTLP or to the console as JSON.
|
|
98
91
|
provider = LoggerProvider(resource=resource)
|
|
@@ -120,7 +113,24 @@ def init_telemetry(app: FastAPI | None, config: TelemetryConfig):
|
|
|
120
113
|
)
|
|
121
114
|
|
|
122
115
|
set_logger_provider(provider)
|
|
123
|
-
|
|
116
|
+
|
|
117
|
+
if config.tracing is not None or config.logs is not None:
|
|
118
|
+
# OTel's text format writes to stderr, which `console_export` takes over.
|
|
119
|
+
set_logging_format = (
|
|
120
|
+
config.tracing is not None
|
|
121
|
+
and config.tracing.logging
|
|
122
|
+
and not (config.logs is not None and config.logs.console_export)
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
if set_logging_format:
|
|
126
|
+
# Remove any competing handlers to avoid duplicate logging
|
|
127
|
+
remove_stream_handlers(logging.getLogger(), sys.stderr)
|
|
128
|
+
|
|
129
|
+
LoggingInstrumentor().instrument(
|
|
130
|
+
set_logging_format=set_logging_format,
|
|
131
|
+
inject_trace_context=config.tracing is not None,
|
|
132
|
+
enable_log_auto_instrumentation=config.logs is not None,
|
|
133
|
+
)
|
|
124
134
|
|
|
125
135
|
if config.metrics is not None:
|
|
126
136
|
metric_readers = []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "aidial-sdk"
|
|
3
|
-
version = "0.46.0.
|
|
3
|
+
version = "0.46.0.dev9"
|
|
4
4
|
description = "Framework to create applications and model adapters for AI DIAL"
|
|
5
5
|
authors = [{ name = "EPAM RAIL", email = "SpecialEPM-DIALDevTeam@epam.com" }]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -23,14 +23,14 @@ telemetry = [
|
|
|
23
23
|
"opentelemetry-sdk (>=1.22.0,<2.0)",
|
|
24
24
|
"opentelemetry-api (>=1.22.0,<2.0)",
|
|
25
25
|
"opentelemetry-exporter-otlp-proto-grpc (>=1.22.0,<2.0)",
|
|
26
|
-
"opentelemetry-instrumentation-aiohttp-client (>=0.
|
|
27
|
-
"opentelemetry-instrumentation-fastapi (>=0.
|
|
28
|
-
"opentelemetry-instrumentation-httpx (>=0.
|
|
29
|
-
"opentelemetry-instrumentation-logging (>=0.
|
|
30
|
-
"opentelemetry-instrumentation-requests (>=0.
|
|
31
|
-
"opentelemetry-instrumentation-system-metrics (>=0.
|
|
32
|
-
"opentelemetry-instrumentation-urllib (>=0.
|
|
33
|
-
"opentelemetry-exporter-prometheus (>=0.
|
|
26
|
+
"opentelemetry-instrumentation-aiohttp-client (>=0.64b0)",
|
|
27
|
+
"opentelemetry-instrumentation-fastapi (>=0.64b0)",
|
|
28
|
+
"opentelemetry-instrumentation-httpx (>=0.64b0)",
|
|
29
|
+
"opentelemetry-instrumentation-logging (>=0.64b0)",
|
|
30
|
+
"opentelemetry-instrumentation-requests (>=0.64b0)",
|
|
31
|
+
"opentelemetry-instrumentation-system-metrics (>=0.64b0)",
|
|
32
|
+
"opentelemetry-instrumentation-urllib (>=0.64b0)",
|
|
33
|
+
"opentelemetry-exporter-prometheus (>=0.64b0)",
|
|
34
34
|
"prometheus-client (>=0.17.1,<1.0)",
|
|
35
35
|
]
|
|
36
36
|
httpx = ["httpx (>=0.25.0,<1.0)"]
|
|
@@ -46,7 +46,7 @@ aiohttp = "^3.14.4"
|
|
|
46
46
|
aiointercept = "^0.1.7"
|
|
47
47
|
requests = "^2.33"
|
|
48
48
|
responses = "^0.25.3"
|
|
49
|
-
httpx2 = "^2.12.0"
|
|
49
|
+
httpx2 = "^2.12.0" # required for Starlette.TestClient
|
|
50
50
|
openai = "^2.46.0" # third-party logger for log-takeover tests
|
|
51
51
|
|
|
52
52
|
[tool.poetry.group.lint.dependencies]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/chat_completion/function_call.py
RENAMED
|
File without changes
|
{aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/chat_completion/function_tool_call.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/deployment/from_request_mixin.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_sdk-0.46.0.dev7 → aidial_sdk-0.46.0.dev9}/aidial_sdk/utils/_disconnect_middleware.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|