Skip to content

Langchain AgentExecutor astream_events() calls only returns a single chunk of streaming with the full response #31

@jriveroDT

Description

@jriveroDT

Agent Executor is not working as expected in streaming responses.

To be able to receive a streaming response, we need to convert an engine model to a langchain chat model using the to_langchain_chat_model() method and then initialize an agent using this model.

When calling the LLM using the agent executor astream_events() method, agent sends ‘on_chain_stream’ events when its supposed to send ‘on_chat_model_stream’ events.

This results in a not valid streaming response because its not sending chunks of streaming while being executed, instead, it returns a single chunk of data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions