Skip to content

Langchain streaming #314

@tomlynchRNA

Description

@tomlynchRNA

Hello,

I'd like to use astream_events from langchain so that I can receive a stream of events as the crew runs, howeverr it's a bit tricky because crewAI isn't async.

As a workaround, I open a thread instead to run astream_events, and then push the accumulated result to a shared queue inside Agent.execute_task but it's a bit of a hack and not sure its PR worthy.

Is there a plan to implement streaming support i.e a way to pass a calback that gets the stream events, or do you have a preferred way to do this? Happy to write code+PR as I really need this in crewAI.

Cheers.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions