Closed jebberwocky closed 3 months ago
it worked well when removing the "def init(self, OPENAI_API_KEY: str): self.chat_model = ChatOpenAI(openai_api_key=OPENAI_API_KEY)"
guess the example is incomplete or something missed. not a bug. closing the issue
description:
modified the example code from https://github.com/poe-platform/server-bot-quick-start/blob/main/langchain_openai.py and tried to use the openai.
my bot code:
setup code
error message:
Error processing pending attachment requests Error processing pending attachment requests Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/fastapi_poe/base.py", line 407, in handle_query await self._process_pending_attachment_requests(request.message_id) File "/usr/local/lib/python3.11/site-packages/fastapi_poe/base.py", line 299, in _process_pending_attachment_requests *self._pending_file_attachment_tasks.pop(message_id, []) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'HttpRequestBot' object has no attribute '_pending_file_attachment_tasks' POST / -> 200 OK (duration: 9.98 s, execution: 5.89 s)
my questions: why AttributeError: 'HttpRequestBot' object has no attribute '_pending_file_attachment_tasks' occurs? Is there anything missed from the example code?
thanks