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

fix: rename python tool to ipython for better tooluse format adherence #361

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ErikBjare
Copy link
Owner

@ErikBjare ErikBjare commented Dec 22, 2024

Attempt at improving #327

No idea if it actually performs better.


Important

Renames the 'python' tool to 'ipython' for better tool use format adherence, updating initialization and tests accordingly.

  • Behavior:
    • Renames tool from python to ipython in gptme/tools/__init__.py and gptme/tools/python.py.
    • Updates tool initialization logic in init_tools() to sort by ipython.
  • Tests:
    • Updates test_tools_info() in test_util_cli.py to check for ipython instead of python.

This description was created by Ellipsis for 113fa58. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 955afab in 13 seconds

More details
  • Looked at 44 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. gptme/tools/__init__.py:79
  • Draft comment:
    The import statement should be updated to reflect the tool name change from 'python' to 'ipython'.
  • Reason this comment was not posted:
    Comment was not on a valid diff hunk.

Workflow ID: wflow_s6YCea8pKD6G18RS


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@codecov-commenter
Copy link

codecov-commenter commented Dec 22, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
148 1 147 3
View the top 1 failed tests by shortest run time
tests.test_cli::test_subagent
Stack Traces | 0.021s run time
args = ['--name', 'test-3593-test_subagent', '--tools', 'python,subagent', 'We are in a test. Use the subagent tool to compute `fib(15)`, where `fib(1) = 1` and `fib(2) = 1`.', '-', ...]
runner = <click.testing.CliRunner object at 0x7fc23b179ed0>

    @pytest.mark.slow
    @pytest.mark.flaky(retries=2, delay=5)
    @pytest.mark.skipif(
        os.environ.get("MODEL") == "openai/gpt-4o-mini", reason="unreliable for gpt-4o-mini"
    )
    def test_subagent(args: list[str], runner: CliRunner):
        # f14: 377
        # f15: 610
        # f16: 987
        args.extend(["--tools", "python,subagent"])
        args.extend(
            [
                "We are in a test. Use the subagent tool to compute `fib(15)`, where `fib(1) = 1` and `fib(2) = 1`.",
                "-",
                "Answer with the value.",
            ]
        )
        print(f"running: gptme {' '.join(args)}")
        result = runner.invoke(gptme.cli.main, args)
        print(result.output)
    
        # apparently this is not obviously 610
        accepteds = ["377", "610"]
>       assert any(
            [accepted in result.output for accepted in accepteds]
        ), f"Accepteds '{accepteds}' not in output: {result.output}"
E       AssertionError: Accepteds '['377', '610']' not in output: 
E       assert False
E        +  where False = any([False, False])

.../gptme/tests/test_cli.py:343: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@ErikBjare ErikBjare force-pushed the dev/rename-python-tool-to-ipython branch from 955afab to 113fa58 Compare December 22, 2024 13:59
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 113fa58 in 19 seconds

More details
  • Looked at 52 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_v7TPTFwBBZoHjjRW


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

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.

2 participants