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

please support langchain AgentExecutor stream function #1791

Open
qingtian1771 opened this issue Jun 2, 2024 · 2 comments
Open

please support langchain AgentExecutor stream function #1791

qingtian1771 opened this issue Jun 2, 2024 · 2 comments
Labels
ai/core enhancement New feature or request

Comments

@qingtian1771
Copy link

Feature Description

At present, it can only support langchain LLM model stream, for example following code:

const stream = await model.stream(
    messages.map(message =>
      message.role == 'user'
        ? new HumanMessage(message.content)
        : new AIMessage(message.content),
    ),
  );

  return new StreamingTextResponse(LangChainAdapter.toAIStream(stream));

but If I want to use agent and I want to call AgentExecutor to stream the output, it will not work

const agentExecutor = new AgentExecutor({
  agent,
  tools,
});
const stream = await agentExecutor.stream({
  input: "hi!",
});

please support this function, thanks!

Use Case

No response

Additional context

No response

@lgrammel lgrammel added enhancement New feature or request ai/core labels Jun 3, 2024
@matthias
Copy link

matthias commented Jun 4, 2024

👍 🙏

@hiddengearz
Copy link

+1 would be very helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai/core enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants