-
Notifications
You must be signed in to change notification settings - Fork 279
feat(py/genkit): added the resolve_method for openai compatible plugin #3055
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
base: main
Are you sure you want to change the base?
feat(py/genkit): added the resolve_method for openai compatible plugin #3055
Conversation
py/plugins/compat-oai/src/genkit/plugins/compat_oai/openai_plugin.py
Outdated
Show resolved
Hide resolved
config_schema=OpenAIConfig, | ||
metadata={ | ||
'model': { | ||
'label': f"OpenAI - {name}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's define the default supports for this metadata field.
}, | ||
) | ||
|
||
def resolve_action( # noqa: B027 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is duplicated.
@@ -69,6 +73,80 @@ def initialize(self, ai: GenkitRegistry) -> None: | |||
}, | |||
) | |||
|
|||
def resolve_action( # noqa: B027 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's also remove the # noqa: B027 comment
Let's check if it is required to keep using the handler. I think the model generate method is enough, and the handler is only a wrapper to determine which models are valid based on the supported models variable. We are going to deprecate those validations, so maybe the handler is not required. |
Description:
This PR introduces the concrete implementation of the resolve_method for the OpenAI compat plugin.