Factory


Object Hierarchy:

Object hierarchy for Factory

Description:

public class Factory : Object

Base class for agent factories.

Provides common functionality for loading resource sections based on agent name. Can be used directly as a default implementation that returns empty system prompt and passes through user input.

Example

// Use as default (no modifications)
var factory = new Agent.Factory();

// Generate system and user prompts
string system_prompt = factory.system_message(null);
string user_prompt = factory.generate_user_prompt("User question");

// Or create custom factory
public class MyFactory : Agent.Factory {
public override string system_message(Base? handler = null) throws Error {
return "You are a helpful assistant.";
}
}

All known sub-classes:

Namespace: OLLMchat.Agent
Package: ollmchat

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class GLib.Object