Skip to content

Commit bb3ae88

Browse files
committed
feat: reasoningEffort + prefixcache
1 parent f2573e2 commit bb3ae88

File tree

5 files changed

+39
-0
lines changed

5 files changed

+39
-0
lines changed

volcenginesdkarkruntime/types/responses/response.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from typing import List, Union, Optional
1414
from typing_extensions import Literal, TypeAlias
1515

16+
from volcenginesdkarkruntime.types.shared.reasoning import Reasoning
1617
from .tool import Tool
1718
from ..._models import BaseModel
1819
from .response_error import ResponseError
@@ -117,6 +118,11 @@ class Response(BaseModel):
117118
Use this to create multi-turn conversations.
118119
"""
119120

121+
reasoning: Optional[Reasoning] = None
122+
"""
123+
**reasoning-effort model only**
124+
"""
125+
120126
thinking: Optional[Thinking] = None
121127
"""
122128
The thinking mode to use for the model.

volcenginesdkarkruntime/types/responses/response_caching_param.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
from __future__ import annotations
1414

15+
from typing import Optional
1516
from typing_extensions import Literal, Required, TypedDict
1617

1718
__all__ = ["ResponseCaching"]
@@ -20,3 +21,5 @@
2021
class ResponseCaching(TypedDict, total=False):
2122
type: Required[Literal["disabled", "enabled"]]
2223
"""The type of caching."""
24+
25+
prefix: Optional[bool]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from typing import Optional
2+
3+
from volcenginesdkarkruntime._models import BaseModel
4+
from .reasoning_effort import ReasoningEffort
5+
6+
__all__ = ["Reasoning"]
7+
8+
9+
class Reasoning(BaseModel):
10+
effort: Optional[ReasoningEffort] = None
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from __future__ import annotations
2+
3+
from typing import Optional
4+
from typing_extensions import TypedDict
5+
6+
from ..shared.reasoning_effort import ReasoningEffort
7+
8+
__all__ = ["Reasoning"]
9+
10+
11+
class Reasoning(TypedDict, total=False):
12+
effort: Optional[ReasoningEffort]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from __future__ import annotations
2+
3+
from typing import Optional
4+
from typing_extensions import Literal, TypeAlias
5+
6+
__all__ = ["ReasoningEffort"]
7+
8+
ReasoningEffort: TypeAlias = Optional[Literal["minimal", "low", "medium", "high"]]

0 commit comments

Comments
 (0)