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(agents-api): Allow single instructions str for agents #297

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

creatorrr
Copy link
Contributor

@creatorrr creatorrr commented Apr 26, 2024


🚀 This description was created by Ellipsis for commit 7e7ed4b

Summary:

This PR allows single instruction strings for agents by updating the relevant functions in the agents-api and the Python and TypeScript SDKs, and also updates the corresponding tests.

Key points:

  • Updated create_agent, update_agent, and patch_agent in agents_api/routers/agents/routers.py to convert single instruction string into a list
  • Changed instructions field in mock_agent in tests/fixtures.py from a list to a string
  • Updated instructions field in create function in src/managers/agent.ts to accept either a string or a list of strings
  • Updated tests for Python and TypeScript SDKs to reflect these changes

Generated with ❤️ by ellipsis.dev

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 the entire pull request up to 7e7ed4b
  • Looked at 171 lines of code in 7 files
  • Took 1 minute and 7 seconds to review
More info
  • Skipped 0 files when reviewing.
  • Skipped posting 1 additional comments because they didn't meet confidence threshold of 50%.
1. sdks/python/tests/fixtures.py:21:
  • Assessed confidence : 66%
  • Grade: 0%
  • Comment:
    Consider maintaining the original list format for instructions in mock_agent and creating a separate test case or mock object for testing the single string input scenario. This ensures that both formats are properly tested and supported.
  • Reasoning:
    The PR introduces the ability to accept a single string for agent instructions in the API and SDKs, which is then converted to a list. This is a useful feature for simplifying the API usage when only one instruction is needed. However, the implementation in the Python SDK test (sdks/python/tests/fixtures.py) directly modifies the mock_agent dictionary to use a string for instructions, which might not reflect all use cases, especially those expecting a list. This could potentially lead to issues in tests that rely on the original list format of instructions.

Workflow ID: wflow_AnlqrwYuvggVJPRr


Not what you expected? You can customize the content of the reviews using rules. Learn more here.

@creatorrr creatorrr merged commit aaee882 into dev Apr 26, 2024
9 checks passed
@creatorrr creatorrr deleted the f/single-instructions branch April 26, 2024 08:15
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.

1 participant