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

chore: update swot-agent to latest dependencies #1599

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

kweinmeister
Copy link
Contributor

Updated and tested dependencies. Required an API change in the use of the Google GenAI SDK.

@kweinmeister kweinmeister requested a review from a team as a code owner January 5, 2025 18:14
Copy link
Contributor

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

Hi team,

I'm currently reviewing this pull request and will provide my feedback shortly. In the meantime, here's a summary for you and other reviewers to quickly get up to speed:

This pull request, submitted by @kweinmeister, aims to update the swot-agent sample application to the latest dependencies. The description mentions that this required an API change in how the Google GenAI SDK is used.

Here's a breakdown of the changes:

  • gemini/sample-apps/swot-agent/README.md: A minor update to the README file, correcting a link to the FastAPI CLI documentation (line 56).
  • gemini/sample-apps/swot-agent/agent.py: A modification to the analyze_competition function (lines 224-227). The call to the Google GenAI SDK's generate_content_async method has been replaced with client.aio.models.generate_content. This reflects the API change mentioned in the PR description.
  • gemini/sample-apps/swot-agent/requirements.txt: Several dependencies have been updated. Specifically, google-genai has been updated to version 0.3.0, and other packages like pydantic-ai, praw, and httpx have also received updates or been modified to include optional dependencies. Some dependencies have been removed (grpcio, grpcio-status, google-cloud-aiplatform).

Summary Table:

File Change Summary Lines Changed
README.md Corrected FastAPI CLI documentation link. 56
agent.py Updated Google GenAI SDK API call in analyze_competition function. 224-227
requirements.txt Updated and modified dependencies; removed some. Multiple

I'll provide a more detailed review shortly. Thanks!

And now, a little haiku to brighten your day:

Code flows like a stream,
Updates refresh, bugs take flight,
Clean code takes the stage.

Copy link
Contributor

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

This pull request updates the SWOT agent to use the latest dependencies, including a necessary API change for the Google GenAI SDK. The changes are well-implemented and improve maintainability. The documentation updates are also appreciated.

Copy link
Contributor

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

Hi team,

I'm currently reviewing this pull request and will provide my feedback shortly. In the meantime, here's a summary for you and other reviewers to quickly get up to speed:

This pull request, submitted by @kweinmeister, aims to update the swot-agent sample application to the latest dependencies. The description mentions that this required an API change in how the Google GenAI SDK is used.

Here's a breakdown of the changes:

  • gemini/sample-apps/swot-agent/README.md: A minor update to the README file, correcting a link to the FastAPI CLI documentation (line 56).
  • gemini/sample-apps/swot-agent/agent.py: A modification to the analyze_competition function (lines 224-227). The call to the Google GenAI SDK's generate_content_async method has been updated to use the new aio.models.generate_content method. This reflects the API change mentioned in the PR description.
  • gemini/sample-apps/swot-agent/requirements.txt: The dependencies have been updated. Several packages have been updated to their latest versions, and some have been removed or added. Specifically:
    • pydantic-ai==0.0.12, praw==7.8.1, grpcio==1.67.1, grpcio-status==1.67.1, httpx==0.28.1, and google-cloud-aiplatform==1.74.0 were removed.
    • google-genai==0.3.0, httpx==0.27.2, and pydantic-ai[vertexai]==0.0.17 were added.
    • praw==7.8.1 and pytest-asyncio==0.25.1 were updated to newer versions.

Overall, this PR seems straightforward, focusing on dependency updates and a necessary API adjustment for the Google GenAI SDK. I'll be checking the functionality and testing thoroughly.


Here's a little haiku to brighten your day:

Code flows like a stream,
Updates refresh, a new dawn breaks,
Bugs flee in the night.

Copy link
Contributor

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

This pull request updates the SWOT agent to use the latest dependencies, which is good for maintainability and leveraging new features/bug fixes. The change in the google-genai library necessitates the API change, and the correction to the FastAPI CLI link is helpful. The changes are well-implemented overall. A minor suggestion would be to add version pinning to the requirements.txt file for better dependency management.

@holtskinner holtskinner merged commit 84c3590 into main Jan 6, 2025
22 checks passed
@holtskinner holtskinner deleted the swot-agent-upgrade branch January 6, 2025 16:11
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