Skip to content

[Bug] openai_chatgpt_python extension OPENAI_PROXY_URL problem #292

@seven1240

Description

@seven1240

Is your feature request related to a problem? Please describe.

I built in my local computer, va.openai.azure works but camera.va.openai.azure doesn't.

I have OPENAI_PROXY_URL set to OPENAI_PROXY_URL=socks5://host.orb.internal:8888

I checked property.json, the first one using Go plugin and the camera one using Python, and looks like the python one doesn't support OPENAI_PROXY_URL or doesn't support socks proxy. I already have pysocks installed and it works and helps when I download python dependences.

so it results to connection error.

[avatar_p1jxlu] 2024-09-28 09:10:19,786 - openai_chatgpt_python - ERROR - 3559 - [openai_chatgpt_extension.py:507] - err: Traceback (most recent call last):
[avatar_p1jxlu]   File "/usr/local/lib/python3.10/dist-packages/httpx/_transports/default.py", line 72, in map_httpcore_exceptions
[avatar_p1jxlu]     yield
[avatar_p1jxlu]   File "/usr/local/lib/python3.10/dist-packages/httpx/_transports/default.py", line 236, in handle_request
[avatar_p1jxlu]     resp = self._pool.handle_request(req)
[avatar_p1jxlu]   File "/usr/local/lib/python3.10/dist-packages/httpcore/_sync/connection_pool.py", line 216, in handle_request
[avatar_p1jxlu]     raise exc from None
[avatar_p1jxlu]   File "/usr/local/lib/python3.10/dist-packages/httpcore/_sync/connection_pool.py", line 196, in handle_request
[avatar_p1jxlu]     response = connection.handle_request(
[avatar_p1jxlu]   File "/usr/local/lib/python3.10/dist-packages/httpcore/_sync/connection.py", line 99, in handle_request
[avatar_p1jxlu]     raise exc
[avatar_p1jxlu]   File "/usr/local/lib/python3.10/dist-packages/httpcore/_sync/connection.py", line 76, in handle_request
[avatar_p1jxlu]     stream = self._connect(request)
[avatar_p1jxlu]   File "/usr/local/lib/python3.10/dist-packages/httpcore/_sync/connection.py", line 122, in _connect
[avatar_p1jxlu]     stream = self._network_backend.connect_tcp(**kwargs)
[avatar_p1jxlu]   File "/usr/local/lib/python3.10/dist-packages/httpcore/_backends/sync.py", line 205, in connect_tcp
[avatar_p1jxlu]     with map_exceptions(exc_map):
[avatar_p1jxlu]   File "/usr/lib/python3.10/contextlib.py", line 153, in __exit__
[avatar_p1jxlu]     self.gen.throw(typ, value, traceback)
[avatar_p1jxlu]   File "/usr/local/lib/python3.10/dist-packages/httpcore/_exceptions.py", line 14, in map_exceptions
[avatar_p1jxlu]     raise to_exc(exc) from exc
[avatar_p1jxlu] httpcore.ConnectError: [Errno 101] Network is unreachable

I manually changed the addon property from openai_chatgpt_python to openai_chatgpt fixes it.

Describe the solution you'd like

the python plugin also support OPENAI_PROXY_URL

Describe alternatives you've considered

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeaturebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions