Code:
import weaviate, os
client = weaviate.connect_to_embedded(
version="1.24.4",
environment_variables={
"ENABLE_MODULES": "backup-filesystem,multi2vec-palm",
"BACKUP_FILESYSTEM_PATH": "/home/jovyan/work/backups",
},
headers={
"X-PALM-Api-Key": EMBEDDING_API_KEY,
}
)
client.is_ready()
Error:
Adding meerkat-watch.mp4
{"action":"requests_total","api":"rest","class_name":"Animals","error":"update vector: connection to Google PaLM failed with status: 400 error: Parameter dimension is not supported with video input.","level":"error","msg":"unexpected error","query_type":"objects","time":"2024-06-21T10:10:29Z"}
---------------------------------------------------------------------------
UnexpectedStatusCodeError Traceback (most recent call last)
Cell In[9], line 10
7 path = "./source/video/" + name
9 # insert videos one by one
---> 10 animals.data.insert({
11 "name": name,
12 "path": path,
13 "video": toBase64(path),
14 "mediaType": "video"
15 })
File ~/.local/lib/python3.11/site-packages/weaviate/collections/data.py:388, in _DataCollection.insert(self, properties, references, uuid, vector)
385 if vector is not None:
386 weaviate_obj = self.__parse_vector(weaviate_obj, vector)
--> 388 return self._insert(weaviate_obj)
File ~/.local/lib/python3.11/site-packages/weaviate/collections/data.py:82, in _Data._insert(self, weaviate_obj)
79 path = "/objects"
81 params, weaviate_obj = self.__apply_context_to_params_and_object({}, weaviate_obj)
---> 82 self._connection.post(
83 path=path,
84 weaviate_object=weaviate_obj,
85 params=params,
86 error_msg="Object was not added",
87 status_codes=_ExpectedStatusCodes(ok_in=200, error="insert object"),
88 )
89 return uuid_package.UUID(weaviate_obj["id"])
File ~/.local/lib/python3.11/site-packages/weaviate/connect/v4.py:500, in _Connection.post(self, path, weaviate_object, params, error_msg, status_codes)
492 def post(
493 self,
494 path: str,
(...)
498 status_codes: Optional[_ExpectedStatusCodes] = None,
499 ) -> Response:
--> 500 return self.__send(
501 "POST",
502 url=self.url + self._api_version_path + path,
503 weaviate_object=weaviate_object,
504 params=params,
505 error_msg=error_msg,
506 status_codes=status_codes,
507 )
File ~/.local/lib/python3.11/site-packages/weaviate/connect/v4.py:451, in _Connection.__send(self, method, url, error_msg, status_codes, weaviate_object, params)
449 res = self._client.send(req)
450 if status_codes is not None and res.status_code not in status_codes.ok:
--> 451 raise UnexpectedStatusCodeError(error_msg, response=res)
452 return cast(Response, res)
453 except RuntimeError as e:
UnexpectedStatusCodeError: Object was not added! Unexpected status code: 500, with response body: {'error': [{'message': 'update vector: connection to Google PaLM failed with status: 400 error: Parameter dimension is not supported with video input.'}]}.