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

Add request_response_flow concept to provide easy blocking access to call other defined flows #36

Closed
wants to merge 30 commits into from

Conversation

efunneko
Copy link
Collaborator

This change allows a component to send a message to another flow and receive an iterator back that can be looped over to receive pieces of the response until it is complete. The iterator will simply block until the response is ready, allowing the code to be very straightforward to use.

@efunneko efunneko self-assigned this Sep 16, 2024
Copy link

gitstream-cm bot commented Sep 16, 2024

Please mark whether you used Copilot to assist coding in this PR

  • Copilot Assisted

Copy link

@cyrus2281 cyrus2281 left a comment

Choose a reason for hiding this comment

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

But this wouldn't work across multiple instance of Solace AI connector? Should we document this as well?

"component_config": {
"invoke_handler": test_invoke_handler,
},
"request_response_flow_controllers": [

Choose a reason for hiding this comment

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

Should we have an example in the example directory as well?

Copy link
Collaborator

@gregmeldrum gregmeldrum left a comment

Choose a reason for hiding this comment

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

Look good! I like how testable the components are.

efunneko and others added 7 commits September 21, 2024 14:50
* feat: Added a request_response_flow example and fixed a few issues along the way

* feat: Reworked the broker_request_response built-in ability of components to be simpler. Instead of having to have a defined flow and then name that flow, it will automatically create a flow with a single broker_request_response component in it. Now there is a straightforward interating function call to allow components to issue a request and get streaming or non-streaming responses from that flow.

* chore: fix the request_response example and remove the old one
Copy link

@efunneko efunneko closed this Sep 22, 2024
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