Skip to content

feat: added Project Livewire #2017

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

Merged
merged 5 commits into from
May 30, 2025

Conversation

heiko-hotz
Copy link
Contributor

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:

  • Follow the CONTRIBUTING Guide.
  • You are listed as the author in your notebook or README file.
    • Your account is listed in CODEOWNERS for the file(s).
  • Make your Pull Request title in the https://www.conventionalcommits.org/ specification.
  • Ensure the tests and linter pass (Run nox -s format from the repository root to format).
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@heiko-hotz heiko-hotz requested a review from a team as a code owner May 2, 2025 15:52
Copy link

Warning

Gemini is unable to generate a summary due to a potential policy violation.

@holtskinner holtskinner changed the title added Project Livewire feat: added Project Livewire May 2, 2025
Copy link
Collaborator

@holtskinner holtskinner left a comment

Choose a reason for hiding this comment

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

Initial comments, will do more in depth later

This commit updates the project configuration across various files to replace instances of PROJECT_ID with GOOGLE_CLOUD_PROJECT. Changes include updates to README files, cloudbuild.yaml configurations, and environment variable settings to ensure consistency and clarity in project setup and deployment instructions.
Copy link
Collaborator

@holtskinner holtskinner left a comment

Choose a reason for hiding this comment

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

Overall, would it be possible to reduce duplication and simplify to make this easier to understand?

The biggest thing would be to use the Gen AI SDK for the JavaScript sections.

Also be sure to fix the remaining lint errors.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This file isn't needed because there is one for the full repo


* Python 3.8+
* API Keys:
* Google Gemini API Key ([Get one here](https://makersuite.google.com/app/apikey))
Copy link
Collaborator

Choose a reason for hiding this comment

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

This can be removed if you are expecting people to use Vertex AI


1. **Clone the repo:**
```bash
git clone https://github.com/heiko-hotz/project-livewire.git
Copy link
Collaborator

Choose a reason for hiding this comment

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

Change the repo link

nano .env # Edit with your API keys & Function URLs
# --> See server/README.md for detailed .env options <--
```
* *Minimum required in `.env`:* `GOOGLE_API_KEY` (if not using Vertex/ADC), `WEATHER_FUNCTION_URL`, etc.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* *Minimum required in `.env`:* `GOOGLE_API_KEY` (if not using Vertex/ADC), `WEATHER_FUNCTION_URL`, etc.
* *Minimum required in `.env`:* `GOOGLE_API_KEY` (if not using Vertex AI/ADC), `WEATHER_FUNCTION_URL`, etc.


## Project Structure

```
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
```
```sh


# Model configuration
if api_config.use_vertex:
MODEL = os.getenv("MODEL_GOOGLE_GENAI_USE_VERTEXAI", "gemini-2.0-flash-exp")
Copy link
Collaborator

Choose a reason for hiding this comment

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

There should be an updated model ID to use

Comment on lines +128 to +151
CONFIG = {
"generation_config": {"response_modalities": ["AUDIO"], "speech_config": VOICE},
"tools": [
{
"function_declarations": [
{
"name": "get_weather",
"description": "Get weather information for a location",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "The city or location to get weather for",
}
},
"required": ["city"],
},
},
]
}
],
"system_instruction": SYSTEM_INSTRUCTIONS,
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you use the Gen AI SDK classes for these?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this the only prompt that's in a separate file? If you want to use a separate file, can you put it in a standard .prompt file format if suitable?
https://humanloop.com/docs/v5/reference/prompt-file-format

google-auth==2.37.0
certifi==2024.12.14
requests==2.32.3
google-genai==1.3.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Update to the latest version

Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks similar to another handler in one of the JS files. Do we need both of them?

@holtskinner holtskinner merged commit 0a3eb4a into GoogleCloudPlatform:main May 30, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants