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(agents-api,typespec): Fix chat/entry typespec models to include tool_calls #489

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

creatorrr
Copy link
Contributor

@creatorrr creatorrr commented Sep 4, 2024

Signed-off-by: Diwank Singh Tomer [email protected]


🚀 This description was created by Ellipsis for commit fa05cd1

Summary:

This PR updates chat and entry typespec models to include tool calls, modifying both Python and TypeScript files to handle tool call data in chat outputs.

Key points:

  • Updated MessageModel in agents-api/agents_api/autogen/Chat.py to include tool_calls.
  • Modified MultipleChatOutput and SingleChatOutput to use MessageModel.
  • Added tool_calls to TypeScript models in sdks/ts/src/api/models/Chat_MultipleChatOutput.ts and Chat_SingleChatOutput.ts.
  • Updated TypeScript schemas in sdks/ts/src/api/schemas/$Chat_MultipleChatOutput.ts and $Chat_SingleChatOutput.ts to include tool_calls.
  • Adjusted TypeSpec models in typespec/chat/models.tsp and typespec/entries/models.tsp to support optional tool_calls.
  • Removed unused import in agents-api/tests/utils.py.

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.

❌ Changes requested. Reviewed everything up to fa05cd1 in 31 seconds

More details
  • Looked at 380 lines of code in 12 files
  • Skipped 2 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. agents-api/agents_api/autogen/Chat.py:293
  • Draft comment:
    Ensure that created_at and id fields, which are optional, are properly handled throughout the codebase to avoid potential NoneType errors.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The created_at and id fields in MessageModel are marked as None in the type hint but are initialized with Field(None, ...). This is consistent, but it's important to ensure that these fields are properly handled as optional in the rest of the codebase.
2. scripts/generate_openapi_code.sh:16
  • Draft comment:
    The poetry update commands are commented out. Ensure this is intentional and consider uncommenting them if dependency updates are needed.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    In generate_openapi_code.sh, the poetry update commands are commented out. This might be intentional for testing, but it's important to ensure that dependencies are up-to-date when needed.
3. agents-api/tests/utils.py:7
  • Draft comment:
    The Choices import was removed. Ensure that Choices is not used elsewhere in the code to avoid potential import errors.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment is speculative and asks the author to ensure something, which is against the rules. It doesn't point out a definite issue in the code changes made in the diff.
    I might be overlooking the possibility that the removal of Choices could cause an issue, but the comment doesn't provide a definite issue, just a speculative one.
    The rules clearly state not to make speculative comments or ask the author to ensure something. The comment doesn't point out a definite issue.
    The comment should be removed because it is speculative and asks the author to ensure something, which is against the rules.

Workflow ID: wflow_UHOw9S5VZwrC6hqU


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

agents-api/agents_api/autogen/Chat.py Show resolved Hide resolved
@HamadaSalhab HamadaSalhab merged commit d66343d into dev-tasks Sep 4, 2024
2 of 5 checks passed
@HamadaSalhab HamadaSalhab deleted the x/fix-chat-model-tool-calls branch September 4, 2024 22:26
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