lionagi 0.12.8__py3-none-any.whl → 0.13.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.
- lionagi/_errors.py +4 -0
- lionagi/libs/schema/load_pydantic_model_from_schema.py +0 -9
- lionagi/models/field_model.py +645 -174
- lionagi/models/model_params.py +17 -8
- lionagi/models/operable_model.py +4 -2
- lionagi/protocols/operatives/operative.py +205 -36
- lionagi/protocols/operatives/step.py +2 -1
- lionagi/service/connections/endpoint_config.py +7 -3
- lionagi/service/connections/providers/claude_code_.py +186 -81
- lionagi/service/connections/providers/oai_.py +1 -13
- lionagi/service/imodel.py +9 -4
- lionagi/service/third_party/anthropic_models.py +1 -1
- lionagi/service/token_calculator.py +1 -1
- lionagi/traits/__init__.py +58 -0
- lionagi/traits/base.py +216 -0
- lionagi/traits/composer.py +343 -0
- lionagi/traits/protocols.py +495 -0
- lionagi/traits/registry.py +1071 -0
- lionagi/version.py +1 -1
- {lionagi-0.12.8.dist-info → lionagi-0.13.1.dist-info}/METADATA +8 -4
- {lionagi-0.12.8.dist-info → lionagi-0.13.1.dist-info}/RECORD +23 -18
- {lionagi-0.12.8.dist-info → lionagi-0.13.1.dist-info}/WHEEL +0 -0
- {lionagi-0.12.8.dist-info → lionagi-0.13.1.dist-info}/licenses/LICENSE +0 -0
lionagi/_errors.py
CHANGED
@@ -151,9 +151,6 @@ def load_pydantic_model_from_schema(
|
|
151
151
|
base_class="pydantic.BaseModel",
|
152
152
|
)
|
153
153
|
except Exception as e:
|
154
|
-
# Optional: Print generated code on failure for debugging
|
155
|
-
# if output_file.exists():
|
156
|
-
# print(f"--- Generated Code (Error) ---\n{output_file.read_text()}\n--------------------------")
|
157
154
|
error_msg = "Failed to generate model code"
|
158
155
|
raise RuntimeError(error_msg) from e
|
159
156
|
|
@@ -175,15 +172,9 @@ def load_pydantic_model_from_schema(
|
|
175
172
|
# --- 3. Import the Generated Module Dynamically ---
|
176
173
|
try:
|
177
174
|
spec, generated_module = get_modules()
|
178
|
-
# Important: Make pydantic available within the executed module's globals
|
179
|
-
# if it's not explicitly imported by the generated code for some reason.
|
180
|
-
# Usually, datamodel-code-generator handles imports well.
|
181
|
-
# generated_module.__dict__['BaseModel'] = BaseModel
|
182
175
|
spec.loader.exec_module(generated_module)
|
183
176
|
|
184
177
|
except Exception as e:
|
185
|
-
# Optional: Print generated code on failure for debugging
|
186
|
-
# print(f"--- Generated Code (Import Error) ---\n{output_file.read_text()}\n--------------------------")
|
187
178
|
error_msg = f"Failed to load generated module ({output_file})"
|
188
179
|
raise RuntimeError(error_msg) from e
|
189
180
|
|