Closed yamazakikakuyo closed 4 months ago
Hi @yamazakikakuyo, thanks for reporting! I ran the gemini/intro-grounding-gemini.ipynb
notebook with a search data store, and the retrieval and responses are working as expected. Can you give more details on:
google-cloud-aiplatform
Hi, thank you for replying. Here's the detail:
google-cloud-aiplatform
: 1.48.0I have run it again recently and somehow it run smoothly without any error. Thanks a lot for your help.
Regarding the code, here's the snippet code that i used.
import vertexai
from vertexai.generative_models import GenerativeModel, Tool
from vertexai.preview import generative_models as preview_generative_models
from google.cloud import discoveryengine
vertexai.init(project=PROJECT_ID, location='us-central1')
client_discoveryengine= discoveryengine.DataStoreServiceClient()
path = client_discoveryengine.collection_path(project=PROJECT_ID, location='global', collection='default_collection')
vertex_search_tool = Tool.from_retrieval(
retrieval=preview_generative_models.grounding.Retrieval(
source=preview_generative_models.grounding.VertexAISearch(datastore=path+f'dataStores/{DATASTORE_ID}'),
)
)
model = GenerativeModel(
"gemini-1.0-pro",
generation_config={"temperature": 0},
tools=[
vertex_search_tool,
],
)
chat = model.start_chat()
response = chat.send_message("I want to know what kind of shipping mode available right now")
response = response.candidates[0].content.parts[0]
print(response._raw_part.text)
@yamazakikakuyo, that's great news! Thanks for letting us know that things are working again, and thanks 2x for the sample code that you used as inputs.
File Name
gemini/grounding/intro-grounding-gemini.ipynb
What happened?
Hello,
I have problem when connecting Data Store from Vertex Search and Conversation (known as Agent Builder now) to Gemini Model. Here's the error message
I have followed the instruction regarding how to connect Data Store as Grounding for Gemini model in this link (https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/grounding) and also tutorial in this repository (https://github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/grounding/intro-grounding-gemini.ipynb). But I still got the same error as above, etiher I use Vertex Data Store or Web Search one.
I hope there's a way to solve this error. Thanks a lot beforehand!
Relevant log output
No response
Code of Conduct