Class
FoundryLlmResource
Description [src]
abstract class Foundry.LlmResource : GObject.Object
{
/* No available fields */
}
Abstract base class for LLM resources.
A resource represents external content that can be provided to an LLM, such as files, URLs, or other data sources. Resources have metadata including a URI, name, description, and content type.
Instance methods
foundry_llm_resource_load_json
If the content_type is “application/json” then the resource may implement this function to provide a JsonNode instead of a serialized byte buffer. This is helpful in situations where the protocol can pass structured information for JSON such as Model Context Protocol.
unstable since: 1.1
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct FoundryLlmResourceClass {
GObjectClass parent_class;
char* (* dup_uri) (
FoundryLlmResource* self
);
char* (* dup_name) (
FoundryLlmResource* self
);
char* (* dup_description) (
FoundryLlmResource* self
);
char* (* dup_content_type) (
FoundryLlmResource* self
);
DexFuture* (* load_bytes) (
FoundryLlmResource* self
);
DexFuture* (* load_json) (
FoundryLlmResource* self
);
}
No description available.
Class members
parent_class: GObjectClassNo description available.
dup_uri: char* (* dup_uri) ( FoundryLlmResource* self )No description available.
dup_name: char* (* dup_name) ( FoundryLlmResource* self )No description available.
dup_description: char* (* dup_description) ( FoundryLlmResource* self )No description available.
dup_content_type: char* (* dup_content_type) ( FoundryLlmResource* self )No description available.
load_bytes: DexFuture* (* load_bytes) ( FoundryLlmResource* self )No description available.
load_json: DexFuture* (* load_json) ( FoundryLlmResource* self )No description available.
Virtual methods
Foundry.LlmResourceClass.dup_content_type
Gets the content type for the resource.
unstable since: 1.1
Foundry.LlmResourceClass.load_json
If the content_type is “application/json” then the resource may implement this function to provide a JsonNode instead of a serialized byte buffer. This is helpful in situations where the protocol can pass structured information for JSON such as Model Context Protocol.
unstable since: 1.1