code: def test_update_vectors():
      POINT_ID = 1000
  
      # Put empty vector first
      response = request_with_validation(
          api="/collections/{collection_name}/points",
          method="PUT",
          path_params={"collection_name": collection_name},
          query_params={"wait": "true"},
          body={
              "points": [
                  {
                      "id": POINT_ID,
                      "vector": {},
                      "payload": {"city": "Berlin"},
                  }
              ]
          },
      )
      assert response.ok
  
      response = request_with_validation(
          api="/collections/{collection_name}/points/{id}",
          method="GET",
          path_params={
              "collection_name": collection_name,
              "id": POINT_ID,
          },
      )
      assert response.ok
      result = response.json()["result"]
      assert result["vector"].get("text") is None
  
      text_vector = [
          0.34035879,
          0.344099,
          0.3478392,
          0.35157941,
          0.35531961,
          0.35905982,
          0.36280003,
          0.36654023,
      ]
      response = request_with_validation(
          api="/collections/{collection_name}/points/vectors",
          method="PUT",
          path_params={"collection_name": collection_name},
          query_params={"wait": "true"},
          body={
              "points": [
                  {
                      "id": POINT_ID,
                      "vector": {
                          "text": text_vector,
                      },
                  }
              ]
          },
      )
      assert response.ok
  
      response = request_with_validation(
          api="/collections/{collection_name}/points/{id}",
          method="GET",
          path_params={
              "collection_name": collection_name,
              "id": POINT_ID,
          },
      )
      assert response.ok
      result = response.json()["result"]
      assert compare_vectors(result["vector"]["text"], text_vector)
      assert result["payload"]["city"] == "Berlin"
  
      text_vector = [
          0.07902951,
          0.22391693,
          0.36880436,
          0.51369179,
          0.59272129,
          0.07902951,
          0.22391693,
          0.36880436,
      ]
      image_vector = [0.19, 0.28, 0.37, 0.46]
      response = request_with_validation(
          api="/collections/{collection_name}/points/vectors",
          method="PUT",
          path_params={"collection_name": collection_name},
          query_params={"wait": "true"},
          body={
              "points": [
                  {
                      "id": POINT_ID,
                      "vector": {
                          "text": text_vector,
                          "image": image_vector,
                      },
                  }
              ]
          },
      )
      assert response.ok
  
      response = request_with_validation(
          api="/collections/{collection_name}/points/{id}",
          method="GET",
          path_params={
              "collection_name": collection_name,
              "id": POINT_ID,
          },
      )
      assert response.ok
      result = response.json()["result"]
      assert compare_vectors(result["vector"]["image"], image_vector)
      assert compare_vectors(result["vector"]["text"], text_vector)
  
      image_vector = [0.00, 0.01, 0.00, 0.01]
      response = request_with_validation(
          api="/collections/{collection_name}/points/vectors",
          method="PUT",
          path_params={"collection_name": collection_name},
          query_params={"wait": "true"},
          body={
              "points": [
                  {
                      "id": POINT_ID,
                      "vector": {
                          "image": image_vector,
                      },
                  }
              ]
          },
      )
      assert response.ok
  
      response = request_with_validation(
          api="/collections/{collection_name}/points/{id}",
          method="GET",
          path_params={
              "collection_name": collection_name,
              "id": POINT_ID,
          },
      )
      assert response.ok
      result = response.json()["result"]
      assert compare_vectors(result["vector"]["image"], image_vector)
      assert compare_vectors(result["vector"]["text"], text_vector)
  
file_path: qdrant/openapi/tests/openapi_integration/test_optional_vectors.py
imports: import pytest
  from .helpers.collection_setup import drop_collection, multivec_collection_setup
  from .helpers.helpers import request_with_validation
label_desc: Use image node_id 6 for calling a global function with example usage: test_update_vectors() without return types