26.07 Storage Modulev0.1.48 → v0.1.49
Changed in v0.1.49 (2026-04-18): artifact can be string for other Artifact filed now
→+3 −1
| v0.1.48 | v0.1.49 | ||
|---|---|---|---|
| 32 | 32 | ||
| 33 | `Storage` MUST contain the full information of artifacts. | 33 | `Storage` MUST contain the full information of artifacts. |
| 34 | 34 | ||
| 35 | When a `storage` value is provided, the `artifact` member of the `Embedding` object MAY be a `string` to reference the artifact in the storage. | 35 | When a `storage` value is provided, any member whose value is of type `Artifact` MAY be a `string`. When it is a `string`, it MUST be the `id` of an `Artifact` in `Storage` and MUST be resolved accordingly. |
| 36 | |||
| 37 | In particular, when a `storage` value is provided, the `artifact` member of the `Embedding` object MAY be a `string` to reference the artifact in `Storage`. | ||
| 36 | ```ts | 38 | ```ts |
| 37 | interface Embedding { | 39 | interface Embedding { |
| 38 | artifact: Artifact | string // REQUIRED | 40 | artifact: Artifact | string // REQUIRED |
| 39 | // ... | 41 | // ... |
| 40 | } | 42 | } |
| 41 | ``` | 43 | ``` |
| 42 | where | 44 | where |
| 43 | - The value of `artifact` MUST be either of type `Artifact` or a `string`. When it is a `string`, it MUST be the `id` of an `Artifact` in `Storage`. If `Storage` is not provided or the relevant `Artifact` is missing from `Storage`, an `Embedding` whose `artifact` is of type `string` MUST be discarded. | 45 | - The value of `artifact` MUST be either of type `Artifact` or a `string`. When it is a `string`, it MUST be the `id` of an `Artifact` in `Storage`. If `Storage` is not provided or the relevant `Artifact` is missing from `Storage`, an `Embedding` whose `artifact` is of type `string` MUST be discarded. |
| 44 | 46 | ||
| 45 | An `Embedding` whose `artifact` is of type `string` MUST always be resolved in favor of the `Artifact` in `Storage`, regardless of the `storageOverwrite` value. | 47 | An `Embedding` whose `artifact` is of type `string` MUST always be resolved in favor of the `Artifact` in `Storage`, regardless of the `storageOverwrite` value. |