Skip to content

Weaviate python client compatible with Weaviate v1.4.x

Choose a tag to compare

@StefanBogdan StefanBogdan released this 03 Jun 08:52
· 4418 commits to main since this release

Changelog: weaviate-python-client v2.5.x

The new version is compatible with Weaviate v1.4.0.

weaviate.gql.get.GetBuilder

  • New method with_near_image(content: dict, encode: bool = True) is added for the GET query. E.g.:
    content = {
      "image": "IMAGE_PATH/image.png",
      "certainty": 0.7,
    }
    client.query.get("Article", "coverImage").with_near_image(content=content, encode=True).do()

weaviate.util

  • New function image_encoder_b64 to encode a image to base64, the argument is the image path OR the file object in "br" mode.
weaviate.util.image_encoder_b64(
    image_or_image_path: Union[str, BufferedReader]
) -> str
  • New function image_decoder_b64 to decode a image from base64 to bytes stream, the argument is the base64 encoded image string.
weaviate.util.image_decoder_b64(
    encoded_image: str
) -> bytes