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(py): added support for the basic features of the OpenAI plugin #2160

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

Conversation

timere-nemo
Copy link
Contributor

Added basic implementation of the OpenAI Plugin

Checklist (if applicable):

@timere-nemo timere-nemo self-assigned this Feb 24, 2025
@github-actions github-actions bot added docs Improvements or additions to documentation python Python config labels Feb 24, 2025
@timere-nemo timere-nemo marked this pull request as ready for review February 24, 2025 19:58
@timere-nemo timere-nemo force-pushed the ryermilov/openai branch 2 times, most recently from 6aa3303 to fe2c101 Compare February 26, 2025 12:11
@pavelgj pavelgj changed the title feat: added support for the basic features of the OpenAI plugin feat(py): added support for the basic features of the OpenAI plugin Feb 26, 2025
@timere-nemo timere-nemo requested a review from Irillit February 26, 2025 22:12
@timere-nemo timere-nemo force-pushed the ryermilov/openai branch 2 times, most recently from cf38170 to c514312 Compare February 27, 2025 13:53
@@ -0,0 +1,3 @@
# OpenAI Plugin
Copy link
Collaborator

Choose a reason for hiding this comment

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

/cc @chrisraygill
Please hold off submitting this. This plugin needs to be "openai API plugin" to support all providers that have openai API compatible endpoints, not just openai.

Copy link
Contributor

Choose a reason for hiding this comment

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

@pavelgj
This PR is quite long (+1000 lines). Is it possible to somehow decompose it to adjust to the providers, or merge the part of it at first? It would be really hard to review in case it becomes longer than that.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Irillit I would generally agree, but looking at the PR half of the lines are licenses and other boilerplate, it's not too bad. The feedback I'm hoping from @chrisraygill is mostly about proper naming (package name, correct wording in the readme).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe I can take a first stab at the naming, and we can revisit later.... as I said, the plugin is for openai API compatible providers. Ex:

so, the package can be genkit.plugins.openai_compat (I really don't like the long openai_compatibility)?
The readme file can say OpenAI API Compatible model provider Plugin....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pavelgj
Updated README and renamed the package name

Copy link
Collaborator

Choose a reason for hiding this comment

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

latest update: please call the package compat-oai.
sorry for the churn.
@chrisraygill

@timere-nemo timere-nemo force-pushed the ryermilov/openai branch 3 times, most recently from 4fcb512 to bef6f8d Compare February 28, 2025 14:27
@timere-nemo timere-nemo requested a review from Irillit February 28, 2025 14:56
@timere-nemo timere-nemo force-pushed the ryermilov/openai branch 5 times, most recently from ea4c1dc to 6630f21 Compare March 3, 2025 21:07
@timere-nemo timere-nemo requested a review from pavelgj March 3, 2025 21:12
)
from genkit.plugins.openai_compat.models.model import OpenAIModel
from genkit.plugins.openai_compat.models.model_info import (
SUPPORTED_OPENAI_MODELS,
Copy link
Contributor

Choose a reason for hiding this comment

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

I would drop OPENAI from SUPPORTED_OPENAI_MODELS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config docs Improvements or additions to documentation python Python
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants