HotDrify / freeAI

this is a python package to use the completely free chatGPT and more models.
Apache License 2.0
20 stars 2 forks source link

'Cannot connect to host' error #4

Open matheeshapathirana opened 11 months ago

matheeshapathirana commented 11 months ago
@matheeshapathirana ➜ /workspaces/freeAI (main) $ python main.py 
Traceback (most recent call last):
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/aiohttp/connector.py", line 1173, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/aiohttp/connector.py", line 884, in _resolve_host
    addrs = await self._resolver.resolve(host, port, family=self._family)
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/aiohttp/resolver.py", line 33, in resolve
    infos = await self._loop.getaddrinfo(
  File "/usr/local/python/3.10.13/lib/python3.10/asyncio/base_events.py", line 863, in getaddrinfo
    return await self.run_in_executor(
  File "/usr/local/python/3.10.13/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/python/3.10.13/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/workspaces/freeAI/main.py", line 9, in <module>
    loop.run_until_complete(main())
  File "/usr/local/python/3.10.13/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/workspaces/freeAI/main.py", line 5, in main
    result = await alpaca7b.Running.main("Hello! what language model are you?")
  File "/workspaces/freeAI/freeAI/avagpt/__init__.py", line 22, in acreate
    async with session.post(
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/aiohttp/client.py", line 1187, in __aenter__
    self._resp = await self._coro
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/aiohttp/client.py", line 574, in _request
    conn = await self._connector.connect(
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/aiohttp/connector.py", line 544, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/aiohttp/connector.py", line 911, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/aiohttp/connector.py", line 1187, in _create_direct_connection
    raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host ava-alpha-api.codelink.io:443 ssl:default [Name or service not known]

Im getting the above error please help me to fix it.