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

feat(tools): switch PythonTool and CustomTool to HTTP API #195

Merged
merged 19 commits into from
Jan 10, 2025

Conversation

markstur
Copy link
Contributor

@markstur markstur commented Nov 27, 2024

Which issue(s) does this pull-request address?

Part of: #149

Description

  • Modify the existing PythonTool over gRPC to go over HTTP.
  • Add tests (written for gRPC but adapted for the new one).
  • Requires CODE_INTERPRETER_URL env var to point to exposed HTTP port (50081).

Checklist

  • I have read the contributor guide
  • Linting passes: yarn lint or yarn lint:fix
  • Formatting is applied: yarn format or yarn format:fix
  • Unit tests pass: yarn test:unit
  • E2E tests pass: yarn test:e2e
  • Tests are included
  • Documentation is changed or added
  • Commit messages and PR title follow conventional commits

@markstur markstur requested a review from a team as a code owner November 27, 2024 03:57
@markstur markstur marked this pull request as draft November 27, 2024 03:57
@markstur markstur marked this pull request as ready for review December 9, 2024 16:18
@markstur markstur changed the title feat: add python code tool over http feat!: add python code tool over http Dec 14, 2024
@markstur
Copy link
Contributor Author

Marking as draft because custom tool will also have to be updated.

@markstur markstur marked this pull request as draft December 14, 2024 07:34
@JanPokorny
Copy link
Contributor

You could probably remove some of the grpc dependencies together with this PR -- IIRC we use gRPC in a different part of the codebase, but through a different library.

@markstur markstur marked this pull request as ready for review January 9, 2025 00:33
@JanPokorny JanPokorny force-pushed the python_http branch 2 times, most recently from 0dbb546 to ca2320a Compare January 9, 2025 09:56
@JanPokorny JanPokorny changed the title feat!: add python code tool over http feat(tools): switch PythonTool and CustomTool to HTTP API Jan 9, 2025
@JanPokorny JanPokorny force-pushed the python_http branch 2 times, most recently from bec147e to bdf6c43 Compare January 9, 2025 10:23
@JanPokorny JanPokorny requested a review from Tomas2D January 9, 2025 15:24
src/tools/custom.ts Outdated Show resolved Hide resolved
tests/e2e/tools/custom.test.ts Show resolved Hide resolved
src/tools/python/python.ts Outdated Show resolved Hide resolved
src/tools/python/python.ts Outdated Show resolved Hide resolved
markstur and others added 9 commits January 10, 2025 11:21
* Keep the existing PythonTool over gRPC for now and add
a similar tool to go over HTTP when we switch.

* Add tests (written for gRPC but adapted for the new one).

* The gRPC/HTTP versions coexist for now while our consumers
  (e.g. bee-api) make the switch.

Signed-off-by: Mark Sturdevant <[email protected]>
* Modify the existing PythonTool over gRPC to go over HTTP.
* Add tests (written for gRPC but adapted for the new one).
* Requires CODE_INTERPRETER_URL env var to point to exposed HTTP port (50081).

BREAKING CHANGE: Requires exposed port and updated CODE_INTERPRETER_URL.

Signed-off-by: Mark Sturdevant <[email protected]>
* Modify the existing CustomTool over gRPC to go over HTTP.
* Add e2e tests.
* Requires CODE_INTERPRETER_URL env var to point to exposed HTTP port (50081).

BREAKING CHANGE: Requires exposed port and updated CODE_INTERPRETER_URL.

Signed-off-by: Mark Sturdevant <[email protected]>
@Tomas2D
Copy link
Contributor

Tomas2D commented Jan 10, 2025

Great work guys! 👍🏻

@Tomas2D Tomas2D merged commit d48f0a9 into i-am-bee:main Jan 10, 2025
2 checks passed
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