zrb 1.6.7__py3-none-any.whl → 1.6.8__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.
zrb/llm_config.py
CHANGED
@@ -68,7 +68,9 @@ class LLMConfig:
|
|
68
68
|
default_history_summarization_threshold: int | None = None,
|
69
69
|
default_enrich_context: bool | None = None,
|
70
70
|
default_context_enrichment_threshold: int | None = None,
|
71
|
+
default_model: Model | None = None,
|
71
72
|
default_model_settings: ModelSettings | None = None,
|
73
|
+
default_model_provider: Provider | None = None,
|
72
74
|
):
|
73
75
|
self._default_model_name = default_model_name
|
74
76
|
self._default_model_base_url = default_base_url
|
@@ -87,8 +89,8 @@ class LLMConfig:
|
|
87
89
|
default_context_enrichment_threshold
|
88
90
|
)
|
89
91
|
self._default_model_settings = default_model_settings
|
90
|
-
self.
|
91
|
-
self._default_model =
|
92
|
+
self._default_model_provider = default_model_provider
|
93
|
+
self._default_model = default_model
|
92
94
|
|
93
95
|
@property
|
94
96
|
def default_model_name(self) -> str | None:
|
@@ -121,8 +123,8 @@ class LLMConfig:
|
|
121
123
|
|
122
124
|
@property
|
123
125
|
def default_model_provider(self) -> Provider | str:
|
124
|
-
if self.
|
125
|
-
return self.
|
126
|
+
if self._default_model_provider is not None:
|
127
|
+
return self._default_model_provider
|
126
128
|
if self.default_model_base_url is None and self.default_model_api_key is None:
|
127
129
|
return "openai"
|
128
130
|
from pydantic_ai.providers.openai import OpenAIProvider
|
@@ -233,8 +235,8 @@ class LLMConfig:
|
|
233
235
|
def set_default_model_base_url(self, model_base_url: str):
|
234
236
|
self._default_model_base_url = model_base_url
|
235
237
|
|
236
|
-
def
|
237
|
-
self.
|
238
|
+
def set_default_model_provider(self, provider: Provider | str):
|
239
|
+
self._default_model_provider = provider
|
238
240
|
|
239
241
|
def set_default_model(self, model: Model | str):
|
240
242
|
self._default_model = model
|
zrb/task/llm/config.py
CHANGED
@@ -85,7 +85,7 @@ def get_model(
|
|
85
85
|
if model_base_url is None and model_api_key is None:
|
86
86
|
default_model_provider = llm_config.default_model_provider
|
87
87
|
if default_model_provider is not None:
|
88
|
-
new_llm_config.
|
88
|
+
new_llm_config.set_default_model_provider(default_model_provider)
|
89
89
|
return new_llm_config.default_model
|
90
90
|
# If it's already a Model instance, return it directly
|
91
91
|
if isinstance(model, Model):
|
@@ -245,7 +245,7 @@ zrb/input/option_input.py,sha256=TQB82ko5odgzkULEizBZi0e9TIHEbIgvdP0AR3RhA74,213
|
|
245
245
|
zrb/input/password_input.py,sha256=szBojWxSP9QJecgsgA87OIYwQrY2AQ3USIKdDZY6snU,1465
|
246
246
|
zrb/input/str_input.py,sha256=NevZHX9rf1g8eMatPyy-kUX3DglrVAQpzvVpKAzf7bA,81
|
247
247
|
zrb/input/text_input.py,sha256=6T3MngWdUs0u0ZVs5Dl11w5KS7nN1RkgrIR_zKumzPM,3695
|
248
|
-
zrb/llm_config.py,sha256=
|
248
|
+
zrb/llm_config.py,sha256=Twe7-32OxvzCSPFOY-cV3SQGPSqCcjO1ZmiYvSjNpCk,10443
|
249
249
|
zrb/runner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
250
250
|
zrb/runner/cli.py,sha256=2xy4cPGqDZOm4EBGcP4WtKBXWjk74O2whDS3XarX0XQ,6925
|
251
251
|
zrb/runner/common_util.py,sha256=JDMcwvQ8cxnv9kQrAoKVLA40Q1omfv-u5_d5MvvwHeE,1373
|
@@ -318,7 +318,7 @@ zrb/task/cmd_task.py,sha256=3JFkWZEhyrQAwbQJs2pgICBmkohUR9T-hjXw82JyNtA,10720
|
|
318
318
|
zrb/task/http_check.py,sha256=Gf5rOB2Se2EdizuN9rp65HpGmfZkGc-clIAlHmPVehs,2565
|
319
319
|
zrb/task/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
320
320
|
zrb/task/llm/agent.py,sha256=6wGSsw03GdY_fj12CsJh7wxB6BnE13N8RYXaWfbiUsk,5451
|
321
|
-
zrb/task/llm/config.py,sha256=
|
321
|
+
zrb/task/llm/config.py,sha256=oGxHYMdIvhASnKwNuMPwcdeJiFfS0tNskzGHakpfpQU,3458
|
322
322
|
zrb/task/llm/context.py,sha256=U9a8lxa2ikz6my0Sd5vpO763legHrMHyvBjbrqNmv0Y,3838
|
323
323
|
zrb/task/llm/context_enrichment.py,sha256=BKiWTorUrwDCMxghFXua3d-CHA3faUaCc3am7I3YGCg,6446
|
324
324
|
zrb/task/llm/error.py,sha256=27DQXSG8SH1-XuvXFdZQKzP39wZDWmd_YnSTz6DJKKI,3690
|
@@ -369,7 +369,7 @@ zrb/util/string/name.py,sha256=SXEfxJ1-tDOzHqmSV8kvepRVyMqs2XdV_vyoh_9XUu0,1584
|
|
369
369
|
zrb/util/todo.py,sha256=VGISej2KQZERpornK-8X7bysp4JydMrMUTnG8B0-liI,20708
|
370
370
|
zrb/xcom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
371
371
|
zrb/xcom/xcom.py,sha256=o79rxR9wphnShrcIushA0Qt71d_p3ZTxjNf7x9hJB78,1571
|
372
|
-
zrb-1.6.
|
373
|
-
zrb-1.6.
|
374
|
-
zrb-1.6.
|
375
|
-
zrb-1.6.
|
372
|
+
zrb-1.6.8.dist-info/METADATA,sha256=-DMAZAILCbphje8LYMrIIbFRFbMDF7MNsK8MMOBehM0,8385
|
373
|
+
zrb-1.6.8.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
374
|
+
zrb-1.6.8.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
|
375
|
+
zrb-1.6.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|