feat: Enhance Jina client with additional embedding parameters
- Add `type_`, `truncate`, and `late_chunking` parameters to the `create_embeddings` function for finer control over embedding generation. This allows users to specify embedding type, truncation method, and whether to apply late chunking. - Rename model parameter to `model` for clarity and consistency. - Improve model enum naming for better readability and API consistency. - Add unit tests for the `create_embeddings` function to ensure correct functionality and handle potential errors.
This commit is contained in:
@@ -6,7 +6,7 @@ mut jina_client := jina.get()!
|
||||
|
||||
embeddings := jina_client.create_embeddings(
|
||||
input: ['Hello', 'World']
|
||||
model: .embeddings_v3
|
||||
model: .jina_embeddings_v3
|
||||
task: 'separation'
|
||||
) or { panic('Error while creating embeddings: ${err}') }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user