DeepFabric 4.4.0__py3-none-any.whl → 4.4.1__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.
- deepfabric/llm/client.py +16 -2
- {deepfabric-4.4.0.dist-info → deepfabric-4.4.1.dist-info}/METADATA +1 -1
- {deepfabric-4.4.0.dist-info → deepfabric-4.4.1.dist-info}/RECORD +6 -6
- {deepfabric-4.4.0.dist-info → deepfabric-4.4.1.dist-info}/WHEEL +0 -0
- {deepfabric-4.4.0.dist-info → deepfabric-4.4.1.dist-info}/entry_points.txt +0 -0
- {deepfabric-4.4.0.dist-info → deepfabric-4.4.1.dist-info}/licenses/LICENSE +0 -0
deepfabric/llm/client.py
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
+
import logging
|
|
2
3
|
import os
|
|
4
|
+
import sys
|
|
3
5
|
|
|
4
6
|
from functools import lru_cache
|
|
5
7
|
from typing import Any
|
|
@@ -21,6 +23,8 @@ from .rate_limit_config import (
|
|
|
21
23
|
)
|
|
22
24
|
from .retry_handler import RetryHandler, retry_with_backoff, retry_with_backoff_async
|
|
23
25
|
|
|
26
|
+
logger = logging.getLogger(__name__)
|
|
27
|
+
|
|
24
28
|
# JSON Schema union type keys that need recursive processing
|
|
25
29
|
_UNION_KEYS = ("anyOf", "oneOf", "allOf")
|
|
26
30
|
|
|
@@ -1061,8 +1065,18 @@ def _get_cached_openai_schema(schema: type[BaseModel]) -> type[BaseModel]:
|
|
|
1061
1065
|
OpenAICompatModel.__name__ = f"{schema.__name__}OpenAICompat"
|
|
1062
1066
|
OpenAICompatModel.__doc__ = schema.__doc__
|
|
1063
1067
|
|
|
1064
|
-
# Rebuild model
|
|
1065
|
-
|
|
1068
|
+
# Rebuild model with the schema's original module namespace to resolve
|
|
1069
|
+
# forward references (e.g., PendingToolCall in AgentStep)
|
|
1070
|
+
schema_module = sys.modules.get(schema.__module__)
|
|
1071
|
+
if schema_module:
|
|
1072
|
+
OpenAICompatModel.model_rebuild(_types_namespace=vars(schema_module))
|
|
1073
|
+
else:
|
|
1074
|
+
logger.warning(
|
|
1075
|
+
"Could not find module '%s' in sys.modules. "
|
|
1076
|
+
"Forward reference resolution for dynamically created models may fail.",
|
|
1077
|
+
schema.__module__,
|
|
1078
|
+
)
|
|
1079
|
+
OpenAICompatModel.model_rebuild()
|
|
1066
1080
|
|
|
1067
1081
|
return OpenAICompatModel
|
|
1068
1082
|
|
|
@@ -48,7 +48,7 @@ deepfabric/evaluation/reporters/file_reporter.py,sha256=cRSrtFjYdrUoSwCHPLd6e5ir
|
|
|
48
48
|
deepfabric/evaluation/reporters/multi_reporter.py,sha256=Faxi_cgLIVsRzti9n6zd_fxWUToSam65Rqylp6RX97c,1621
|
|
49
49
|
deepfabric/llm/__init__.py,sha256=lfWDLLQ6VWJ4birKVRFh3ypk9zEOfG1ZtU08iD8bd3U,1038
|
|
50
50
|
deepfabric/llm/api_key_verifier.py,sha256=pxkijmXH3fq23p53xerwEARHmTaz4FnphN-FTU-i42Q,17347
|
|
51
|
-
deepfabric/llm/client.py,sha256=
|
|
51
|
+
deepfabric/llm/client.py,sha256=7__p0KsN9y8wbqpnlHnVOe92quoQs7K2qd_mrU-l2w0,46788
|
|
52
52
|
deepfabric/llm/errors.py,sha256=b25V4iJHkdAgem2ufJkPuornkesyVgQVPQHWttigB54,4293
|
|
53
53
|
deepfabric/llm/rate_limit_config.py,sha256=-skBR8PbEMzsPGeAaiYYFuHAY48AGkl7DIVklijUI-c,8339
|
|
54
54
|
deepfabric/llm/rate_limit_detector.py,sha256=hbp35snCAkn7uBsPaeq7-8XNBngFH1ecS3scRSKP_y4,9960
|
|
@@ -64,8 +64,8 @@ deepfabric/training/__init__.py,sha256=MrfbMhPUa_h4zqpTWDiIu_dXKhmlUH1tJsO5mIsm6
|
|
|
64
64
|
deepfabric/training/api_key_prompt.py,sha256=bzcdzeK6ql_8Vz0cbR2vmxxtMRNRFpzYAJx7i8GNI3U,9315
|
|
65
65
|
deepfabric/training/callback.py,sha256=d4heAO5gcBCGXmJIgA9MI9lFBBHnYtdm76rhPh6RDSA,11427
|
|
66
66
|
deepfabric/training/metrics_sender.py,sha256=Fh_qvqrK9mNpTHfG8jgU7t1oSMKbov3mmj3r6o_Q6X4,9347
|
|
67
|
-
deepfabric-4.4.
|
|
68
|
-
deepfabric-4.4.
|
|
69
|
-
deepfabric-4.4.
|
|
70
|
-
deepfabric-4.4.
|
|
71
|
-
deepfabric-4.4.
|
|
67
|
+
deepfabric-4.4.1.dist-info/METADATA,sha256=EGTNsfWuaMrduG33KLktG7mLyVF73HgYw1y3VJEKN2g,22606
|
|
68
|
+
deepfabric-4.4.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
69
|
+
deepfabric-4.4.1.dist-info/entry_points.txt,sha256=zatevils13hfs8x29_vmUyivQ6rTtq7hE2RBusZw1Fo,50
|
|
70
|
+
deepfabric-4.4.1.dist-info/licenses/LICENSE,sha256=-qRt8wmrhQ9aMf7KhmZXc2vrTETYZF-6_T1KCeUhvHY,11340
|
|
71
|
+
deepfabric-4.4.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|