Skip to content

Support a callable model #312

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

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

Conversation

liorheber
Copy link

@liorheber liorheber commented Mar 24, 2025

This update enhances the Agent class by allowing models to be specified as string, Model object, or callable.
This mirrors the flexibility already available for system prompts.

Key Features

  • Flexible Model Configuration: Models can now be dynamically set using functions, offering more adaptability.
  • Consistent Interface: Maintains backward compatibility with existing model provider interfaces.

Why This Matters
This change makes the Agent class more versatile, allowing dynamic model selection based on context, which is especially useful for complex workflows.

Assurance
All tests, linting, and type-checking pass.

Resolves #310

@liorheber liorheber mentioned this pull request Mar 24, 2025
Copy link

github-actions bot commented Apr 3, 2025

This PR is stale because it has been open for 10 days with no activity.

@github-actions github-actions bot added the stale label Apr 3, 2025
Copy link

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this Apr 25, 2025
@seratch seratch added enhancement New feature or request feature:core and removed stale labels Jun 25, 2025
@seratch seratch reopened this Jun 25, 2025
Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

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

LGTM; @rm-openai do you have any concerns to have this enhancement?

@rm-openai
Copy link
Collaborator

@liorheber so sorry this PR got missed. This looks good, but has some conflicts. If you're able to update, happy to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature:core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Callable model
3 participants