VisionFindResult vision.find-result@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- vision
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/vision/find-result.v1.json
vision.find-result@1: POST /api/v1/index and GET/POST /api/v1/find answer a scoped private search over the caller's own indexed items: `results` (item_id, result_url, score) only, no one else's rows and no public index.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
answer | object | yes |
| |
answer.results | array of object | yes |
| |
answer.results[].item_id | string | yes | ||
answer.results[].result_url | string | null |
| ||
answer.results[].score | number | yes | ||
answer.receipt | object | yes |
| |
answer.receipt.engine | enum | yes |
| |
answer.receipt.model | string | null | yes | ||
answer.receipt.cost_usd | number | yes |
| |
answer.receipt.ms | integer | yes |
| |
answer.receipt.confidence | number | null | yes | ||
answer.receipt.retention | string | yes |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: one
{
"answer": {
"results": [
{
"item_id": "media:42",
"result_url": "https://openvibe.media/m/42",
"score": 0.81
}
],
"receipt": {
"engine": "local",
"model": "CLIP ViT-B/32 q8",
"cost_usd": 0,
"ms": 12,
"confidence": 0.81,
"retention": "query not stored; indexed embeddings stored"
}
}
}Rejected: one
{
"answer": {
"results": [
{
"item_id": "x",
"result_url": "http://insecure.example/a",
"score": 0.5
}
],
"receipt": {
"engine": "local",
"model": null,
"cost_usd": 0,
"ms": 1,
"confidence": null,
"retention": "x"
}
}
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('vision.find-result@1', value); // { valid, errors: [{ path, message }] }