- Update `jina.vsh` example to showcase the new classification API
with support for both text and image inputs. This improves
the flexibility and usability of the client.
- Introduce new structs `TextDoc`, `ImageDoc`, `ClassificationInput`,
`ClassificationOutput`, `ClassificationResult`, and `LabelScore`
to represent data structures for classification requests and
responses. This enhances code clarity and maintainability.
- Implement the `classify` function in `jina_client.v` to handle
classification requests with support for text and image inputs,
model selection, and label specification. This adds a crucial
feature to the Jina client.
- Add comprehensive unit tests in `jina_client_test.v` to cover
the new `classify` function's functionality. This ensures the
correctness and robustness of the implemented feature.
- Remove redundant code related to old classification API and data
structures from `model_embed.v`, `model_rank.v`, and
`jina_client.v`. This streamlines the codebase and removes
obsolete elements.
- Added a new `rerank` function to the Jina client for reranking documents.
- Added a new `RerankParams` struct to define parameters for reranking.
- Added unit tests for the new `rerank` function.
- Updated the example script to demonstrate reranking.
- Improved error handling and added more comprehensive logging.
- 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.