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

cl.Message() update() not working aysnchronously #3

Open
aayushxrj opened this issue Apr 15, 2024 · 0 comments
Open

cl.Message() update() not working aysnchronously #3

aayushxrj opened this issue Apr 15, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@aayushxrj
Copy link
Owner

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()
@aayushxrj aayushxrj added bug Something isn't working good first issue Good for newcomers labels Apr 24, 2024
@aayushxrj aayushxrj changed the title [Bug] cl.Message() update() not working aysnchronously cl.Message() update() not working aysnchronously Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant