This notebook needs to be updated. The cell, where the data is imported, is doing it manually, now it is possible to do it with the client. This cell:
## doing this manually until the client is updated
import requests
def import_posts_with_vectors(posts, vectors):
if len(posts) != len(vectors):
raise Exception("len of posts ({}) and vectors ({}) does not match".format(len(posts), len(vectors)))
for i, post in enumerate(posts):
r = requests.post('http://localhost:8080/v1/objects', json={
"class": "Post",
"vector": vectors[i].tolist(),
"properties": {
"content": post,
}
})
if r.status_code > 399:
print(res)
This notebook needs to be updated. The cell, where the data is imported, is doing it manually, now it is possible to do it with the client. This cell: