File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -167,9 +167,6 @@ def _estimate_cost_in_cents(
167
167
+ Decimal (sampled_tokens ) * sampled_scale
168
168
) * Decimal ("100" )
169
169
170
- def _supports_streaming (self ) -> bool :
171
- return not self .model .startswith ("o1" )
172
-
173
170
def complete (self , messages : Sequence [Message ]) -> LLMResponse :
174
171
kwargs = {
175
172
"model" : self .model ,
@@ -246,16 +243,11 @@ def validate_api_params(self, params):
246
243
247
244
@property
248
245
def stream (self ) -> bool :
249
- return self ._supports_streaming () and self . _stream
246
+ return self ._stream
250
247
251
248
@stream .setter
252
249
def stream (self , val : bool ):
253
- if not self ._supports_streaming ():
254
- raise NotImplementedError (
255
- "Streamed responses are not supported by this model"
256
- )
257
- else :
258
- self ._stream = val
250
+ self ._stream = val
259
251
260
252
@property
261
253
def valid_models (self ) -> Iterable [str ]:
You can’t perform that action at this time.
0 commit comments