6
6
from commonbase .exceptions import CommonbaseApiException , CommonbaseException
7
7
from commonbase .chat_context import ChatContext
8
8
from commonbase .provider_config import ProviderConfig
9
- from commonbase .truncation_config import TruncationConfig
10
9
from importlib .metadata import version , PackageNotFoundError
11
10
12
11
@@ -24,7 +23,6 @@ def _format_body(
24
23
variables : Optional [dict [str , str ]] = None ,
25
24
chat_context : Optional [ChatContext ] = None ,
26
25
user_id : Optional [str ] = None ,
27
- truncate_variable : Optional [TruncationConfig ] = None ,
28
26
provider_config : Optional [ProviderConfig ] = None ,
29
27
stream : bool = False ,
30
28
):
@@ -34,9 +32,6 @@ def _format_body(
34
32
"variables" : variables ,
35
33
"context" : chat_context ._as_json () if chat_context is not None else None ,
36
34
"userId" : user_id ,
37
- "truncateVariable" : truncate_variable ._as_json ()
38
- if truncate_variable is not None
39
- else None ,
40
35
"providerConfig" : provider_config ._as_json ()
41
36
if provider_config is not None
42
37
else None ,
@@ -52,7 +47,6 @@ def _send_completion_request(
52
47
variables : Optional [dict [str , str ]],
53
48
chat_context : Optional [ChatContext ],
54
49
user_id : Optional [str ],
55
- truncate_variable : Optional [TruncationConfig ],
56
50
provider_api_key : Optional [str ],
57
51
provider_config : Optional [ProviderConfig ],
58
52
stream : bool ,
@@ -68,7 +62,6 @@ def _send_completion_request(
68
62
variables = variables ,
69
63
chat_context = chat_context ,
70
64
user_id = user_id ,
71
- truncate_variable = truncate_variable ,
72
65
provider_config = provider_config ,
73
66
stream = stream ,
74
67
)
@@ -103,7 +96,6 @@ def create(
103
96
variables : Optional [dict [str , str ]] = None ,
104
97
chat_context : Optional [ChatContext ] = None ,
105
98
user_id : Optional [str ] = None ,
106
- truncate_variable : Optional [TruncationConfig ] = None ,
107
99
provider_api_key : Optional [str ] = None ,
108
100
provider_config : Optional [ProviderConfig ] = None ,
109
101
) -> CompletionResponse :
@@ -123,8 +115,6 @@ def create(
123
115
The list of chat messages in a conversation
124
116
user_id : str, optional
125
117
The User ID that will be logged for the invocation.
126
- truncate_variable : TruncationConfig, optional
127
- Configures variable truncation.
128
118
provider_api_key : str, optional
129
119
The API Key used to authenticate with a provider.
130
120
provider_config : ProviderConfig, optional
@@ -145,7 +135,6 @@ def create(
145
135
variables = variables ,
146
136
chat_context = chat_context ,
147
137
user_id = user_id ,
148
- truncate_variable = truncate_variable ,
149
138
provider_api_key = provider_api_key ,
150
139
provider_config = provider_config ,
151
140
stream = False ,
@@ -167,7 +156,6 @@ def stream(
167
156
variables : Optional [dict [str , str ]] = None ,
168
157
chat_context : Optional [ChatContext ] = None ,
169
158
user_id : Optional [str ] = None ,
170
- truncate_variable : Optional [TruncationConfig ] = None ,
171
159
provider_api_key : Optional [str ] = None ,
172
160
provider_config : Optional [ProviderConfig ] = None ,
173
161
) -> Generator [CompletionResponse , None , None ]:
@@ -183,7 +171,6 @@ def stream(
183
171
variables = variables ,
184
172
chat_context = chat_context ,
185
173
user_id = user_id ,
186
- truncate_variable = truncate_variable ,
187
174
provider_api_key = provider_api_key ,
188
175
provider_config = provider_config ,
189
176
stream = True ,
0 commit comments