feat: Add classifier deletion functionality

- Added `delete_classifier` function to delete a classifier by ID.
- Added corresponding unit tests for the new function.
- Updated the client example to demonstrate classifier deletion.
- Renamed `jina_client_test.v` to `api_test.v` for better organization.
- Renamed `model_embed.v` to `embeddings_api.v` for better organization.
- Refactored the embedding API to use enums for task and truncate types,
  and added error handling for invalid inputs.
This commit is contained in:
Mahmoud Emad
2025-03-12 14:29:40 +02:00
parent cf27e7880e
commit 5194fabe62
7 changed files with 164 additions and 455 deletions

View File

@@ -56,5 +56,12 @@ classify_result := jina_client.classify(
println('Classification result: ${classify_result}')
// List classifiers
classifiers := jina_client.list_classifiers() or { panic('Error fetching classifiers: ${err}') }
println('Classifiers: ${classifiers}')
// Delete classifier
delete_result := jina_client.delete_classifier(classifier_id: classifiers[0].classifier_id) or {
panic('Error deleting classifier: ${err}')
}
println('Delete result: ${delete_result}')