33from typing import Dict , List , Union , Iterable , Optional , Callable , Iterator , AsyncIterator
44
55import httpx
6- import logging
6+ import warnings
77from typing_extensions import Literal
88
99from ..._types import Body , Query , Headers
3333
3434__all__ = ["Completions" , "AsyncCompletions" ]
3535
36- log : logging .Logger = logging .getLogger (__name__ )
37-
3836class Completions (SyncAPIResource ):
3937 @cached_property
4038 def with_raw_response (self ) -> CompletionsWithRawResponse :
@@ -59,7 +57,7 @@ def _process_messages(self, messages: Iterable[ChatCompletionMessageParam],
5957 if part ["image_url" ]["url" ].startswith ('data:' ):
6058 part ["image_url" ]["url" ] = f (part ["image_url" ]["url" ])
6159 else :
62- log . warning ("end-to-end encryption is not supported for image url, "
60+ warnings . warn ("end-to-end encryption is not supported for image url, "
6361 "please use base64 image if you want encryption" )
6462 else :
6563 raise TypeError ("end-to-end encryption is not supported for content type {}" .
@@ -197,7 +195,7 @@ def _process_messages(self, messages: Iterable[ChatCompletionMessageParam],
197195 if part ["image_url" ]["url" ].startswith ('data:' ):
198196 part ["image_url" ]["url" ] = f (part ["image_url" ]["url" ])
199197 else :
200- log . warning ("end-to-end encryption is not supported for image url, "
198+ warnings . warn ("end-to-end encryption is not supported for image url, "
201199 "please use base64 image if you want encryption" )
202200 else :
203201 raise TypeError ("end-to-end encryption is not supported for content type {}" .
0 commit comments