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

my agents get stuck after a few minutes. #84

Open
ravsau opened this issue Jul 3, 2023 · 2 comments
Open

my agents get stuck after a few minutes. #84

ravsau opened this issue Jul 3, 2023 · 2 comments

Comments

@ravsau
Copy link

ravsau commented Jul 3, 2023

Anyone facing this issue?

error trace for reference

Exception ignored in: <coroutine object ChatOpenAI._agenerate at 0x12e499340>
Traceback (most recent call last):
  File "/path_to_your_env/lib/python3.11/site-packages/langchain/chat_models/openai.py", line 318, in _agenerate
    response = await acompletion_with_retry(
  File "/path_to_your_env/lib/python3.11/site-packages/langchain/chat_models/openai.py", line 63, in acompletion_with_retry
    return await _completion_with_retry(**kwargs)
  File "/path_to_your_env/lib/python3.11/site-packages/tenacity/_asyncio.py", line 88, in async_wrapped
    return await fn(*args, **kwargs)
  File "/path_to_your_env/lib/python3.11/site-packages/tenacity/_asyncio.py", line 47, in __call__
    do = self.iter(retry_state=retry_state)
  File "/path_to_your_env/lib/python3.11/site-packages/tenacity/__init__.py", line 314, in iter
    return fut.result()
  File "/path_to_python_installation/lib/python3.11/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
  File "/path_to_python_installation/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/path_to_your_env/lib/python3.11/site-packages/tenacity/_asyncio.py", line 50, in __call__
    result = await fn(*args, **kwargs)
  File "/path_to_your_env/lib/python3.11/site-packages/langchain/chat_models/openai.py", line 61, in _completion_with_retry
    return await llm.client.acreate(**kwargs)
  File "/path_to_your_env/lib/python3.11/site-packages/openai/api_resources/chat_completion.py", line 45, in acreate
    return await super().acreate(*args, **kwargs)
  File "/path_to_your_env/lib/python3.11/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 217, in acreate
    response, _, api_key = await requestor.arequest(
RuntimeError: coroutine ignored GeneratorExit

@danilotrix86
Copy link

same here.

@ravsau
Copy link
Author

ravsau commented Jul 5, 2023

could be an issue with a version of langchain according to the error trace and this discussion: langchain-ai/langchain#4643

Updating might help. I'll report back if I resolve after updating langchain

Update: upgrading langchain did not resolve the issue

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

2 participants