Annotation Type Resource
Resource-annotated methods return raw configurations, schemas, or instructional assets (such as system guidelines or validation layouts) mapped to one or more URIs. The generative-AI provider uses these declarations to dynamically load context documents or schemas during generation processes.
Usage Example
- Since:
- 1.2.0
- Author:
- Viktor Tovstyi
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionDescription of the resource's purpose, structure, or content.String[]One or more unique URIs associated with this resource. -
Optional Element Summary
Optional Elements -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPlaceholder value indicating that a property is not defined.
-
Field Details
-
NOT_DEFINED
Placeholder value indicating that a property is not defined.- See Also:
-
-
Element Details
-
description
String descriptionDescription of the resource's purpose, structure, or content.This metadata is shared with the generative-AI provider to help determine when and why this resource should be loaded.
- Returns:
- the resource description
-
uri
String[] uriOne or more unique URIs associated with this resource.The URIs serve as the primary identifiers (e.g.,
"file:///schemas/bindex.json") used by generative models to request and locate the resource content.- Returns:
- an array of URIs mapping to this resource
-
-
-
mimeType
String mimeTypeThe MIME type of the resource content.Defaults to
NOT_DEFINED. Providing a specific MIME type (such as"application/json"or"text/markdown") helps the AI provider process and parse the returning payload correctly.- Returns:
- the MIME type of the resource, or
NOT_DEFINEDif unspecified
- Default:
- "___NOT_DEFINED___"
-