Skip to content

Conversation

@pavelgj
Copy link
Collaborator

@pavelgj pavelgj commented May 23, 2024

For example in your client web app (angular, etc) you can do this:

import { streamFlow } from '@genkit-ai/flow/client';

const response = streamFlow({
  url: 'https://my-flow-deployed-url',
  input: 'foo',
});
for await (const chunk of response.stream()) {
  console.log(chunk);
}
console.log(await response.output());
@pavelgj pavelgj requested review from MichaelDoyle and tagboola May 23, 2024 17:35
@pavelgj pavelgj marked this pull request as ready for review May 23, 2024 17:36
Copy link
Contributor

@tagboola tagboola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@pavelgj pavelgj marked this pull request as draft May 24, 2024 20:05
@pavelgj pavelgj marked this pull request as ready for review June 28, 2024 19:25
@pavelgj pavelgj merged commit 8cf20f3 into main Jun 28, 2024
@pavelgj pavelgj deleted the pavelj/flowClient branch June 28, 2024 19:48
@lazakrisz
Copy link

super cool! 🔥 thank you Pavel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants