Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Could not find field "%24alt" in the type "google.cloud.aiplatform.v1beta1.FindNeighborsRequest".

Hello! Here goes my first post here!

I am new to Vertex AI and I am going through the tutorial: " Generative AI Knowledge Base".

This is a jumpstart and step by step tutorial that leads to Collab notebook on the tutorial "Upload documents for Generative AI Knowledge Base". https://cloud.google.com/architecture/ai-ml/generative-ai-knowledge-base

The notebook code run then fails with: 

Could not find field "%24alt" in the type "google.cloud.aiplatform.v1beta1.FindNeighborsRequest".

This is coming from the code that uses the VERTEX API, to find the closest embeddings to a given embedding from the Vector Search index endpoint.

I have run the update of the !pip install google-cloud-aiplatform --upgrade and restarted the kernel without luck.

Any advice please ?

 
---------------------------------------------------------------------------
BadRequest                                Traceback (most recent call last)
<ipython-input-32-3eacc1c8e77d> in <cell line: 0>()
     22 
     23 # Query the Vector Search index for the most relevant page.
---> 24 (filename, page_number) = find_document(question, index_endpoint_id, deployed_index_id)
     25 print(f"{filename=} {page_number=}")


5 frames
<ipython-input-32-3eacc1c8e77d> in find_document(question, index_endpoint_id, deployed_index_id)
     11     print(f"Endpoint: {endpoint}")
     12 
---> 13     point = endpoint.find_neighbors(     14         deployed_index_id=deployed_index_id,
     15         queries=[embedding],

/usr/local/lib/python3.11/dist-packages/google/cloud/aiplatform/matching_engine/matching_engine_inde... in find_neighbors(self, deployed_index_id, queries, num_neighbors, filter, per_crowding_attribute_neighbor_count, approx_num_neighbors, fraction_leaf_nodes_to_search_override, return_full_datapoint, numeric_filter, embedding_ids, signed_jwt, psc_network)
   1698             find_neighbors_request.queries.append(find_neighbors_query)
   1699 
-> 1700         response = self._public_match_client.find_neighbors(find_neighbors_request)
   1701 
   1702         # Wrap the results in MatchNeighbor objects and return

/usr/local/lib/python3.11/dist-packages/google/cloud/aiplatform_v1beta1/services/match_service/clien... in find_neighbors(self, request, retry, timeout, metadata)
    797 
    798         # Send the request.
--> 799         response = rpc(    800             request,
    801             retry=retry,

/usr/local/lib/python3.11/dist-packages/google/api_core/gapic_v1/method.py in __call__(self, timeout, retry, compression, *args, **kwargs)
    129             kwargs["compression"] = compression
    130 
--> 131         return wrapped_func(*args, **kwargs)
    132 
    133 

/usr/local/lib/python3.11/dist-packages/google/api_core/grpc_helpers.py in error_remapped_callable(*args, **kwargs)
     74     def error_remapped_callable(*args, **kwargs):
     75         try:
---> 76             return callable_(*args, **kwargs)
     77         except grpc.RpcError as exc:
     78             raise exceptions.from_grpc_error(exc) from exc

/usr/local/lib/python3.11/dist-packages/google/cloud/aiplatform_v1beta1/services/match_service/trans... in __call__(self, request, retry, timeout, metadata)
    601             # subclass.
    602             if response.status_code >= 400:
--> 603                 raise core_exceptions.from_http_response(response)
    604 
    605             # Return the response

BadRequest: 400 POST https://924703878.us-central1-391476908846.vdb.vertexai.goog/v1beta1/projects/391476908846/locations...: Could not find field "%24alt" in the type "google.cloud.aiplatform.v1beta1.FindNeighborsRequest".

 

Thank you

1 3 511
3 REPLIES 3