Skip to content

Conversation

@cpsievert
Copy link
Collaborator

No description provided.

@cpsievert cpsievert force-pushed the feat/register-tool-name branch from fa0f87e to c96eb84 Compare August 28, 2025 23:27
@cpsievert cpsievert force-pushed the feat/register-tool-name branch from 3a8f62d to 545b434 Compare August 28, 2025 23:37
@cpsievert cpsievert requested a review from Copilot August 28, 2025 23:37
@cpsievert cpsievert marked this pull request as ready for review August 28, 2025 23:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a name parameter to the .register_tool() method, allowing users to specify a custom name for registered tools instead of relying on the function name.

  • Adds optional name parameter to Tool.from_func() and Chat.register_tool() methods
  • Updates parameter precedence to use custom name over model/function names
  • Adds comprehensive test coverage for the new functionality

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
chatlas/_tools.py Adds name parameter to Tool.from_func() method with updated precedence logic
chatlas/_chat.py Adds name parameter to register_tool() method and passes it to Tool.from_func()
tests/test_tools_enhanced.py Adds test class for verifying custom tool name functionality
CHANGELOG.md Documents the new feature in the unreleased section

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@cpsievert cpsievert merged commit 9aeb392 into main Aug 28, 2025
6 of 14 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.

2 participants