aayushxrj / aayushxrj/Pluto.ai
cl.Message() update() not working aysnchronously
- Ngôn ngữ chính
- Python
- Star
- 5
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I'm facing an issue where the `cl.Message().update()` method is not updating the message content asynchronously as expected in my file processing application.
Here's the relevant part of my code:
```
@cl.on_chat_start
async def start():
# ...
msg = cl.Message(content=f"Processing `{file.name}`...", disable_feedback=True)
await msg.send()
# Process the file and split into chunks
chunks = split_into_chunks(file)
msg.content = f"Creating chunks for `{file.name}`..."
await msg.update()
# Store the data in form of embeddings
vectordb = store_embeddings(chunks)
msg.content = f"Creating embeddings for `{file.name}`. . ."
await msg.update()
# ...
msg.content = f"`{file.name}` processed. You can now ask questions!"
await msg.update()
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
The issue is in the Chainlit framework's message handling. Start by examining the `cl.Message` class in the project's dependencies or source code, focusing on the `update()` method's asynchronous behavior. Look for any event loop or threading constraints. Check if there are existing tests for message updates in the test suite. 'Done' means the message content updates visibly and promptly after each await in the provided flow.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Lĩnh vực
- backend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 45/100