File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1515from .. import _ApiType , __version__
1616from ._api import register_commands
1717from ._utils import can_use_http2
18- from .._types import ProxiesDict
1918from ._errors import CLIError , display_error
2019from .._compat import PYDANTIC_V2 , ConfigDict , model_parse
2120from .._models import BaseModel
@@ -167,17 +166,17 @@ def _main() -> None:
167166 if args .verbosity != 0 :
168167 sys .stderr .write ("Warning: --verbosity isn't supported yet\n " )
169168
170- proxies : ProxiesDict = {}
169+ proxies : dict [ str , httpx . BaseTransport ] = {}
171170 if args .proxy is not None :
172171 for proxy in args .proxy :
173172 key = "https://" if proxy .startswith ("https" ) else "http://"
174173 if key in proxies :
175174 raise CLIError (f"Multiple { key } proxies given - only the last one would be used" )
176175
177- proxies [key ] = proxy
176+ proxies [key ] = httpx . HTTPTransport ( proxy = httpx . Proxy ( httpx . URL ( proxy )))
178177
179178 http_client = httpx .Client (
180- proxies = proxies or None ,
179+ mounts = proxies or None ,
181180 http2 = can_use_http2 (),
182181 )
183182 openai .http_client = http_client
You can’t perform that action at this time.
0 commit comments