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

Adding experimental flows streaming client library #230

Merged
merged 9 commits into from
Jun 28, 2024
Merged

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
4 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants