-
Notifications
You must be signed in to change notification settings - Fork 167
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
base: main
Are you sure you want to change the base?
Conversation
py/plugins/openai/src/genkit/plugins/openai/models/model_info.py
Outdated
Show resolved
Hide resolved
6aa3303
to
fe2c101
Compare
fe2c101
to
95b4b14
Compare
cf38170
to
c514312
Compare
py/plugins/openai/README.md
Outdated
@@ -0,0 +1,3 @@ | |||
# OpenAI Plugin |
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.
/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.
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.
@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.
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.
@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).
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.
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:
- https://ai.google.dev/gemini-api/docs/openai
- https://ollama.com/blog/openai-compatibility -- (would we even need an ollama plugin anymore???? or maybe we do, but it can be a thin wrapper of this plugin?... 🤔 @chrisraygill )
- https://api-docs.deepseek.com/
- openai itself...
- there are others....
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
....
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.
@pavelgj
Updated README and renamed the package 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.
latest update: please call the package compat-oai
.
sorry for the churn.
@chrisraygill
4fcb512
to
bef6f8d
Compare
ea4c1dc
to
6630f21
Compare
6630f21
to
8a158c4
Compare
) | ||
from genkit.plugins.openai_compat.models.model import OpenAIModel | ||
from genkit.plugins.openai_compat.models.model_info import ( | ||
SUPPORTED_OPENAI_MODELS, |
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.
I would drop OPENAI from SUPPORTED_OPENAI_MODELS.
Added basic implementation of the OpenAI Plugin
Checklist (if applicable):