File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 11# pylint: disable=protected-access
22from __future__ import annotations
33
4+ from typing import Any
5+
46import pytest
57
68from yandex_cloud_ml_sdk import AsyncYCloudML
@@ -34,6 +36,8 @@ async def test_assistant_common(async_sdk: AsyncYCloudML, tool):
3436 assistant = await async_sdk .assistants .create ('yandexgpt' )
3537 assistants = [assistant ]
3638
39+ value : Any
40+
3741 for field , value in (
3842 ('name' , 'name' ),
3943 ('description' , 'description' ),
@@ -44,7 +48,7 @@ async def test_assistant_common(async_sdk: AsyncYCloudML, tool):
4448 assert getattr (assistant , field ) is None
4549
4650 new_assistant = await assistant .update (
47- ** {field : value }
51+ ** {field : value } # type: ignore[arg-type]
4852 )
4953 assert new_assistant is assistant
5054
@@ -93,7 +97,7 @@ async def test_assistant_common(async_sdk: AsyncYCloudML, tool):
9397 assert assistant .model .config .max_tokens is None
9498
9599 await assistant .update (max_tokens = 50 )
96- assert assistant .model .config .temperature == 0 .5
100+ assert assistant .model .config .temperature == 1 .5
97101 assert assistant .model .config .max_tokens == 50
98102
99103 model = model .configure (max_tokens = 100 , temperature = 1 )
Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ async def test_custom_run_options(async_sdk: AsyncYCloudML):
139139 assert run .custom_temperature == 0.0
140140 assert run .custom_max_tokens == 100
141141 assert run .custom_max_prompt_tokens == 200
142+ assert run .custom_prompt_truncation_options
142143 assert run .custom_prompt_truncation_options .strategy == AutoPromptTruncationStrategy ()
143144
144145 result = await run
@@ -152,6 +153,7 @@ async def test_custom_run_options(async_sdk: AsyncYCloudML):
152153 assert run .custom_temperature == 0.0
153154 assert run .custom_max_tokens is None
154155 assert run .custom_max_prompt_tokens is None
156+ assert run .custom_prompt_truncation_options
155157 assert run .custom_prompt_truncation_options .strategy == LastMessagesPromptTruncationStrategy (num_messages = 10 )
156158
157159 result = await run
You can’t perform that action at this time.
0 commit comments