Description
I am using a 14-day free trial Weaviate cluster using Python. I created a collection using the following:
client.collections.create(
"OpenAIEmbeddings",
vectorizer_config=[
Configure.NamedVectors.text2vec_openai(
name="name",
#source_properties=["name"],
model='text-embedding-3-small',
dimensions=1536,
vectorize_collection_name=False
)
],
properties=[
Property(
name="name",
data_type=DataType.TEXT,
vectorize_property_name=False, # Use "title" as part of the value to vectorize,
skip_vectorization=False,
),
Property(
name="number",
data_type=DataType.TEXT,
skip_vectorization=True, # Don't vectorize this property
vectorize_property_name=False
),
]
# Additional parameters not shown
)
this is what I used to upload all my objects. I made sure that my array is a proper list of tuples
collection = client.collections.get("OpenAIEmbeddings")
with collection.batch.dynamic() as batch:
for text in texts:
weaviate_obj = {
"name": text[0],
"number": str(text[1]),
}
#print(text)
# The model provider integration will automatically vectorize the object
batch.add_object(
properties=weaviate_obj,
# vector=vector # Optionally provide a pre-obtained vector
)
I uploaded the objects but not able to see the corresponding embeddings for it. I tried this to print the vector:
collection = client.collections.get("OpenAIEmbeddings")
response = collection.query.fetch_objects()
for o in response.objects:
print(o.properties)
print(o.metadata.distance) # Inspect metadata
print(o.uuid) # Inspect UUID (returned by default)
print(o.properties) # Inspect returned objects
print('Vector:', o.vector)
I am able to see o.uuid and properties. Even neartext works. It’s just the vector which I am not able to see.
How do I see the embedding vector?
Also how is near-text working if there is no vector? Does it work based on keyword search then?