Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimeoutError: answer_question_using_context timed out, took more than 60s #1

Open
Sameera2001Perera opened this issue May 12, 2024 · 0 comments

Comments

@Sameera2001Perera
Copy link

Any reasons why Im getting this error when running below code.

from h2ogpte import H2OGPTE

API_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
REMOTE_ADDRESS = "https://h2ogpte.genai.h2o.ai"

client = H2OGPTE(address=REMOTE_ADDRESS, api_key=API_KEY)

llm = "mistralai/Mixtral-8x7B-Instruct-v0.1"

answer = client.answer_question(question="Who are you?", llm=llm).content
print(f"{llm}: {answer}", flush=True)

Error:

Traceback (most recent call last):
  File "E:\TechLabs\SyntheticData_2\test2.py", line 10, in <module>
    answer = client.answer_question(question="Who are you?", llm=llm).content
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\TechLabs\SyntheticData_2\venv\Lib\site-packages\h2ogpte\h2ogpte.py", line 335, in answer_question
    ret = self._lang(
          ^^^^^^^^^^^
  File "E:\TechLabs\SyntheticData_2\venv\Lib\site-packages\h2ogpte\h2ogpte.py", line 209, in _lang
    res = self._post("/rpc/lang", marshal(dict(method=method, params=kwargs)))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\TechLabs\SyntheticData_2\venv\Lib\site-packages\h2ogpte\h2ogpte.py", line 179, in _post
    self._raise_error_if_any(res)
  File "E:\TechLabs\SyntheticData_2\venv\Lib\site-packages\h2ogpte\h2ogpte.py", line 197, in _raise_error_if_any
    raise InternalServerError(error)
h2ogpte.errors.InternalServerError: InternalServerError: Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "src/h2ogpte_core/server.py", line 413, in __call__
  File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "src/h2ogpte_core/server.py", line 409, in app
  File "src/h2ogpte_core/server.py", line 405, in rpc
  File "src/h2ogpte_core/server.py", line 112, in redis_async_wrapper
TimeoutError: answer_question_using_context timed out, took more than 60s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant