21
21
async_to_streamed_response_wrapper ,
22
22
)
23
23
from .._base_client import make_request_options
24
- from ..types .model_parameters import ModelParameters
24
+ from ..types .parameters import Parameters
25
25
from ..types .prompt_configuration import PromptConfiguration
26
26
from ..types .prompt_list_response import PromptListResponse
27
27
from ..types .prompt_delete_response import PromptDeleteResponse
@@ -228,12 +228,11 @@ def get_parameters(
228
228
extra_query : Query | None = None ,
229
229
extra_body : Body | None = None ,
230
230
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
231
- ) -> ModelParameters :
231
+ ) -> Parameters :
232
232
"""
233
- Fetches the configured model parameters and messages rendered with the provided
234
- variables mapped to the set LLM provider. This endpoint abstracts the need to
235
- handle mapping between different providers, while still allowing direct calls to
236
- the providers.
233
+ Fetches the model configuration parameters for a specified prompt, including
234
+ penalty settings, response format, and the model messages rendered with the
235
+ given variables mapped to the set LLM provider.
237
236
238
237
Args:
239
238
append_messages: Appended the the end of the configured prompt messages before running the
@@ -257,7 +256,7 @@ def get_parameters(
257
256
if not id :
258
257
raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
259
258
return cast (
260
- ModelParameters ,
259
+ Parameters ,
261
260
self ._post (
262
261
f"/sdk/v1/prompts/{ id } " ,
263
262
body = maybe_transform (
@@ -272,7 +271,7 @@ def get_parameters(
272
271
options = make_request_options (
273
272
extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
274
273
),
275
- cast_to = cast (Any , ModelParameters ), # Union types cannot be passed in as arguments in the type system
274
+ cast_to = cast (Any , Parameters ), # Union types cannot be passed in as arguments in the type system
276
275
),
277
276
)
278
277
@@ -476,12 +475,11 @@ async def get_parameters(
476
475
extra_query : Query | None = None ,
477
476
extra_body : Body | None = None ,
478
477
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
479
- ) -> ModelParameters :
478
+ ) -> Parameters :
480
479
"""
481
- Fetches the configured model parameters and messages rendered with the provided
482
- variables mapped to the set LLM provider. This endpoint abstracts the need to
483
- handle mapping between different providers, while still allowing direct calls to
484
- the providers.
480
+ Fetches the model configuration parameters for a specified prompt, including
481
+ penalty settings, response format, and the model messages rendered with the
482
+ given variables mapped to the set LLM provider.
485
483
486
484
Args:
487
485
append_messages: Appended the the end of the configured prompt messages before running the
@@ -505,7 +503,7 @@ async def get_parameters(
505
503
if not id :
506
504
raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
507
505
return cast (
508
- ModelParameters ,
506
+ Parameters ,
509
507
await self ._post (
510
508
f"/sdk/v1/prompts/{ id } " ,
511
509
body = await async_maybe_transform (
@@ -520,7 +518,7 @@ async def get_parameters(
520
518
options = make_request_options (
521
519
extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
522
520
),
523
- cast_to = cast (Any , ModelParameters ), # Union types cannot be passed in as arguments in the type system
521
+ cast_to = cast (Any , Parameters ), # Union types cannot be passed in as arguments in the type system
524
522
),
525
523
)
526
524
0 commit comments