feat: Add multi-vector API support

- Added a new `create_multi_vector` function to the Jina client
  to support creating multi-vector embeddings.
- Added a new `multi_vector_api.v` file containing the
  implementation for the multi-vector API.
- Updated the `jina.vsh` example to demonstrate the usage of the
  new multi-vector API.
This commit is contained in:
Mahmoud Emad
2025-03-12 16:16:37 +02:00
parent 5194fabe62
commit a7976c45f9
3 changed files with 115 additions and 1 deletions

View File

@@ -65,3 +65,20 @@ delete_result := jina_client.delete_classifier(classifier_id: classifiers[0].cla
panic('Error deleting classifier: ${err}')
}
println('Delete result: ${delete_result}')
// Create multi vector
multi_vector := jina_client.create_multi_vector(
input: [
jina.MultiVectorTextDoc{
text: 'Hello world'
input_type: .document
},
jina.MultiVectorTextDoc{
text: "What's up?"
input_type: .query
},
]
embedding_type: ['float']
// dimensions: 96
)!
println('Multi vector: ${multi_vector}')