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

Switch PythonTool to use HTTP API instead of gRPC #149

Open
JanPokorny opened this issue Nov 6, 2024 · 8 comments
Open

Switch PythonTool to use HTTP API instead of gRPC #149

JanPokorny opened this issue Nov 6, 2024 · 8 comments
Assignees

Comments

@JanPokorny
Copy link
Contributor

We can switch to https://github.com/i-am-bee/bee-code-interpreter/blob/main/src/code_interpreter/services/http_server.py to simplify our communication pattern.

This would allow us to say bye-bye to bee-proto entirely.

@mmurad2
Copy link
Member

mmurad2 commented Nov 18, 2024

This introduces a breaking change, need to discuss how to rollout

@markstur
Copy link
Contributor

markstur commented Nov 27, 2024

This will require changes in at least 4 repos. So the initial adds in this list need to land first. Then consumers like bee-api and starter can each update to the new framework/tool/port.

@Tomas2D
Copy link
Contributor

Tomas2D commented Nov 28, 2024

Please validate @JanPokorny

@JanPokorny
Copy link
Contributor Author

@markstur Is it necessary to add a new tool for HTTP and let it coexist with the gRPC tool? Why can't we make the switch in the framework and then update the bee-api, bee-ui etc. with the new framework version + new Code Interpreter URL?

Switching would be a breaking change for users that set a custom Code Interpreter URL either way -- and we're on version 0.0.* so this is covered.

@markstur
Copy link
Contributor

markstur commented Dec 2, 2024

@JanPokorny my initial work was to change the framework tool first, but after trying to test it and thinking about how to make the switch I felt like:

1 - just exposing both in bee-stack is an obvious first step PR
2 - having coexisting tools will ease the switch so that bee-api, starter, custom... can each switch to the new tool whenever each separate repo has its PR merged (plus custom code wherever/whenever).

I'd like to flip them all ASAP, but it's not all code in one repo so I'd prefer not to have everything broken on our repos main branches for long. Custom code could continue to work the old way with a pinned framework and can easily move forward if we have coexisting support with just the URL setting.

Perhaps I also choose to pursue this way because I was already seeing main bee-api incompatible with main bee-framework and it makes it hard to test the whole thing. I feel like the order proposed is safest/simplest until all the places are happy with the new way.

But I'm open to shaping those PRs to the maintainers preference.

@JanPokorny
Copy link
Contributor Author

@markstur bee-api uses a specific version of bee-agent-framework, and the incompatibilities are accounted for together with updating the framework version. Publishing a change in bee-agent-framework does not "break" the other repos -- they all reference specific versions of the framework, newer changes don't take effect until the framework is explicitly updated. So the optimal course is to just make a breaking change in the framework, release a new version, and then adjust the other repos together with updating to the new version.

@markstur
Copy link
Contributor

Understood, but bee-api was already incompatible with main for unrelated reasons so doing this in pieces would've been more mergeable at the time. We can now focus on just getting this all done instead. That'd be great. I've updated so only HTTP is used for the one and only PythonTool.

@markstur
Copy link
Contributor

I got a CustomTool working w/ some e2e tests (not mocks yet), but got interrupted by the holidays and probably won't get that cleaned up for the PR until next week (year!). FYI and darn! and happy new year y'all!

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

No branches or pull requests

4 participants