-
Notifications
You must be signed in to change notification settings - Fork 209
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 ModelGarden plugin #2568
base: main
Are you sure you want to change the base?
Conversation
py/plugins/vertex-ai/src/genkit/plugins/vertex_ai/model_garden/openai_compatibility.py
Show resolved
Hide resolved
from .model_garden import SUPPORTED_OPENAI_FORMAT_MODELS, ModelGarden | ||
|
||
|
||
class CommonPluginOptions(BaseModel): |
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.
nit: docs throughout
@@ -0,0 +1,69 @@ | |||
# Copyright 2025 Google LLC |
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.
we've switched to the long form license header. please remove this and use bin/fmt
to re-add it throughout.
) | ||
|
||
|
||
class ChatMessage(BaseModel): |
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.
nit: docs
from enum import StrEnum | ||
|
||
from genkit.ai.registry import GenkitRegistry | ||
from genkit.core.typing import ( |
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.
from genkit.types
|
||
from pydantic import BaseModel, ConfigDict | ||
|
||
from genkit.ai.plugin import 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.
from genkit.ai import Plugin, GenkitRegistry
from pydantic import BaseModel, ConfigDict | ||
|
||
from genkit.core.action import ActionRunContext | ||
from genkit.core.typing import ( |
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.
from genkit.types import
from openai import OpenAI as OpenAIClient | ||
from pydantic import BaseModel, ConfigDict | ||
|
||
from genkit.core.action import ActionRunContext |
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.
from genkit.types import ActionRunContext
from openai import OpenAI | ||
|
||
from genkit.ai.veneer import Genkit | ||
from genkit.core.typing import Message, Role, TextPart |
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.
from genkit.types import
from google.auth import default | ||
from openai import OpenAI | ||
|
||
from genkit.ai.veneer import Genkit |
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.
from genkit.ai import Genkit
|
||
|
||
if __name__ == '__main__': | ||
asyncio.run(main()) |
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.
ai.run_main(main())
Description here... Help the reviewer by:
Checklist (if applicable):