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: Integrate e2b. #1284

Merged
merged 20 commits into from
Dec 13, 2024
Merged

feat: Integrate e2b. #1284

merged 20 commits into from
Dec 13, 2024

Conversation

willshang76
Copy link
Collaborator

Description

Integrate the e2b interpreter into camel. https://github.com/e2b-dev/

Motivation and Context

close #1245

  • I have raised an issue to propose this change (required for new features and bug fixes)

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds core functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)
  • Example (update in the folder of example)

Implemented Tasks

  • Subtask 1
  • Subtask 2
  • Subtask 3

Checklist

Go over all the following points, and put an x in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!

  • I have read the CONTRIBUTION guide. (required)
  • My change requires a change to the documentation.
  • I have updated the tests accordingly. (required for a bug fix or a new feature)
  • I have updated the documentation accordingly.

@willshang76 willshang76 self-assigned this Dec 6, 2024
@willshang76 willshang76 marked this pull request as draft December 6, 2024 00:25
@Wendong-Fan
Copy link
Member

Thanks @willshang76 , for the dependency issue, PR raised here: AgentOps-AI/agentops#556

@willshang76 willshang76 marked this pull request as ready for review December 11, 2024 00:27
@willshang76 willshang76 requested a review from AveryYay December 11, 2024 00:28
@Wendong-Fan Wendong-Fan added this to the Sprint 18 milestone Dec 11, 2024
@Wendong-Fan Wendong-Fan linked an issue Dec 11, 2024 that may be closed by this pull request
2 tasks
Copy link
Member

@Wendong-Fan Wendong-Fan left a comment

Choose a reason for hiding this comment

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

Thanks @willshang76 ! Left some comments below

camel/interpreters/e2b_interpreter.py Outdated Show resolved Hide resolved
camel/interpreters/e2b_interpreter.py Outdated Show resolved Hide resolved
camel/interpreters/e2b_interpreter.py Outdated Show resolved Hide resolved
camel/interpreters/e2b_interpreter.py Outdated Show resolved Hide resolved
Comment on lines +71 to +72
code_type (str): The type of code to execute (e.g., 'python',
'bash').
Copy link
Member

Choose a reason for hiding this comment

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

use Literal instead of str?
code_type: Literal["python", "py3", "python3", "py", "shell", "bash", "sh", "java", "javascript", "js", "r"]

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually the base class defined this abstract method as type str for this parameter. Therefore I think that we could leave it as this for this PR, we could create a separate issue to refactor this part. How do you think?

camel/interpreters/e2b_interpreter.py Outdated Show resolved Hide resolved
@lightaime
Copy link
Member

What is e2d in the poetry?

@willshang76
Copy link
Collaborator Author

What is e2d in the poetry?

e2b-code-interpreter

@lightaime
Copy link
Member

There is a e2d as well. I think it is a typo

@willshang76
Copy link
Collaborator Author

There is a e2d as well. I think it is a typo

The e2b-code-interpreter package actually depends on the e2b package. When I did poetry add e2b-code-interpreter; it also gets the e2b.

@lightaime
Copy link
Member

lightaime commented Dec 12, 2024 via email

@Wendong-Fan
Copy link
Member

Thanks @lightaime , @willshang76 , we were waiting for AgentOps to update their dependency to solve the conflict, I have updated the dependency now

@Wendong-Fan Wendong-Fan merged commit 7e20640 into master Dec 13, 2024
4 of 6 checks passed
@Wendong-Fan Wendong-Fan deleted the e2b-integration branch December 13, 2024 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

[Feature Request] integrate e2b
3 participants