Hi I am trying to import custom vectors as shown in the tutorial, i am getting this error:
import requests
url = ‘https://raw.githubusercontent.com/weaviate-tutorials/quickstart/main/data/jeopardy_tiny+vectors.json’
resp = requests.get(url)
data = json.loads(resp.text)
Configure batch process
client.batch.configure(batch_size=100)
Configure a batch process
with client.batch as batch:
# Batch import all Questions
for i, d in enumerate(data):
print(f"importing document no: {i+1}")
properties = {
"answer": d["Answer"],
"question": d["Question"],
"category": d["Category"],
}
custom_vector = d["Vector"]
#print ("custom_vector", custom_vector)
#print ("len(custom_vector)", len(custom_vector))
client.batch.add_data_object(
properties,
"Ragdocs",
vector=[custom_vector]
)
Error: UnexpectedStatusCodeException: batch response! Unexpected status code: 400, with response body: {‘code’: 400, ‘message’: ‘parsing body body from “” failed, because json: cannot unmarshal array into Go struct field Object.objects.vector of type float32’}.