-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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: mesop cloudrun gemini app #1388
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,100 @@ | |||
# Cloud Run application utilizing Mesop that demonstrates working with Vertex AI Gemini API |
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.
# Cloud Run application utilizing Mesop that demonstrates working with Vertex AI Gemini API | |
# Mesop Gemini App on Cloud Run |
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.
Will revise with a different suggestion for review "Mesop application using Vertex AI Gemini API on Cloud Run"
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'd recommend changing the folder name to just mesop-cloudrun
(gemini
is redundant)
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.
This was to align with the streamlit example
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 streamlit one probably shouldn't have "gemini" either, tbh.
## Marketing events | ||
def on_change_marketing_category(e: me.RadioChangeEvent) -> None: | ||
state = me.state(State) | ||
state.marketing_product_category = e.value | ||
|
||
|
||
def on_change_marketing_target(e: me.RadioChangeEvent) -> None: | ||
state = me.state(State) | ||
state.marketing_target_audience = e.value | ||
|
||
|
||
def on_change_marketing_location(e: me.RadioChangeEvent) -> None: | ||
state = me.state(State) | ||
state.marketing_target_location = e.value | ||
|
||
|
||
def on_selection_change_marketing_goals(e: me.SelectSelectionChangeEvent) -> None: | ||
s = me.state(State) | ||
s.marketing_campaign_selected_goals = e.values | ||
print(f"selected: {s.marketing_campaign_selected_goals}") | ||
|
||
|
||
def on_change_marketing_brand_voice(e: me.RadioChangeEvent) -> None: | ||
state = me.state(State) | ||
state.marketing_brand_voice = e.value | ||
|
||
|
||
def on_change_marketing_budget(e: me.RadioChangeEvent) -> None: | ||
state = me.state(State) | ||
state.marketing_budget = e.value |
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.
Is there any way to simplify this into fewer methods?
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.
There's a lot of duplicated code in this file. Is it possible to clean it up/split into separate files/modularize?
I would also recommend moving the prompts into dedicated files. Possibly in the .prompt
format https://docs.continue.dev/customize/deep-dives/prompt-files
Please resolve linting errors as well https://github.com/GoogleCloudPlatform/generative-ai/actions/runs/11782270743/job/32816928938 |
Description
Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
CONTRIBUTING
Guide.CODEOWNERS
for the file(s).Fixes #1387 🦕