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 ModelGarden plugin #2568

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

Conversation

zarinn3pal
Copy link
Contributor

Description here... Help the reviewer by:

  • Added Model garden to vertexAI and implemented openai_compatibility support

Checklist (if applicable):

@github-actions github-actions bot added docs Improvements or additions to documentation feature New feature or request python Python config labels Mar 31, 2025
from .model_garden import SUPPORTED_OPENAI_FORMAT_MODELS, ModelGarden


class CommonPluginOptions(BaseModel):
Copy link
Contributor

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
Copy link
Contributor

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):
Copy link
Contributor

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 (
Copy link
Contributor

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
Copy link
Contributor

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 (
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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())
Copy link
Contributor

Choose a reason for hiding this comment

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

ai.run_main(main())

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 feature New feature or request python Python
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants