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

fix: Correct Google GenAI extension import #11048

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

brkagithub
Copy link
Contributor

Description

Fixes wrong import in Google Response Synthesizers. Issue was identified by using this notebook:
https://github.com/run-llama/llama_index/blob/main/docs/examples/managed/GoogleDemo.ipynb

Fixes # (issue)

Type of Change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

Running GoogleDemo.ipynb gives error 'AttributeError: module 'llama_index.vector_stores.google' has no attribute 'build_generative_service''. I identified that the correct import is import llama_index.vector_stores.google.genai_extension which fixes the issue.

  • I stared at the code and made sure it makes sense

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
nunogois Nuno Góis
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Feb 20, 2024
@@ -137,7 +137,7 @@ def get_response(
A `SynthesizedResponse` object.
"""
try:
import llama_index.vector_stores.google as genaix
import llama_index.vector_stores.google.genai_extension as genaix
Copy link
Collaborator

Choose a reason for hiding this comment

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

both of these imports worked for me, but sure, more specific is fine

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 20, 2024
@logan-markewich logan-markewich enabled auto-merge (squash) February 20, 2024 21:15
@logan-markewich logan-markewich merged commit 63c27d5 into run-llama:main Feb 20, 2024
8 checks passed
Dominastorm pushed a commit to uptrain-ai/llama_index that referenced this pull request Feb 28, 2024
anoopshrma pushed a commit to anoopshrma/llama_index that referenced this pull request Mar 2, 2024
Izukimat pushed a commit to Izukimat/llama_index that referenced this pull request Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants