- Add /v1/chat/completions endpoint (POST) with streaming support - Add /v1/models endpoint (GET) listing available models - Add /v1/completions endpoint (POST) legacy compatibility - Add llm_api.py module with OpenAI API proxy via aiohttp - Add llm_service_url, llm_api_key, available_models to config model - Update harnessed_agent_config_view CRUD to protect API key field - Register new functions in init.py (harnessed_llm_chat_completions etc.) - Add .gitignore for pycache files Endpoints available under module path: POST /harnessed_agent/v1/chat/completions GET /harnessed_agent/v1/models POST /harnessed_agent/v1/completions
155 lines
4.4 KiB
JSON
155 lines
4.4 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "harnessed_agent_config",
|
|
"title": "Hermes Agent module configuration settings",
|
|
"primary": "id"
|
|
}
|
|
],
|
|
"fields": [
|
|
{
|
|
"name": "id",
|
|
"title": "Unique configuration identifier",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "user_id",
|
|
"title": "User ID for multi-user isolation",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "work_dir",
|
|
"title": "Working directory path",
|
|
"type": "str",
|
|
"length": 255,
|
|
"nullable": "no",
|
|
"default": "./hermes_work"
|
|
},
|
|
{
|
|
"name": "skills_path",
|
|
"title": "Skills directory path",
|
|
"type": "str",
|
|
"length": 255,
|
|
"nullable": "no",
|
|
"default": "~/.hermes/skills"
|
|
},
|
|
{
|
|
"name": "max_memory_tokens",
|
|
"title": "Maximum tokens for memory context",
|
|
"type": "int",
|
|
"nullable": "no",
|
|
"default": "2000"
|
|
},
|
|
{
|
|
"name": "default_priority",
|
|
"title": "Default priority for new memories (0-100)",
|
|
"type": "int",
|
|
"nullable": "no",
|
|
"default": "50"
|
|
},
|
|
{
|
|
"name": "high_priority_threshold",
|
|
"title": "Threshold for high priority memories",
|
|
"type": "int",
|
|
"nullable": "no",
|
|
"default": "70"
|
|
},
|
|
{
|
|
"name": "low_priority_threshold",
|
|
"title": "Threshold for low priority memories",
|
|
"type": "int",
|
|
"nullable": "no",
|
|
"default": "30"
|
|
},
|
|
{
|
|
"name": "auto_cleanup_enabled",
|
|
"title": "Enable automatic memory cleanup",
|
|
"type": "str",
|
|
"length": "1",
|
|
"nullable": "no",
|
|
"default": "1"
|
|
},
|
|
{
|
|
"name": "min_retention_days",
|
|
"title": "Minimum days to retain memories",
|
|
"type": "int",
|
|
"nullable": "no",
|
|
"default": "30"
|
|
},
|
|
{
|
|
"name": "default_model",
|
|
"title": "Default LLM model for agent tasks",
|
|
"type": "str",
|
|
"length": 64,
|
|
"nullable": "yes",
|
|
"default": "qwen3-max"
|
|
},
|
|
{
|
|
"name": "default_temperature",
|
|
"title": "Default temperature for LLM calls",
|
|
"type": "float",
|
|
"length": 5,
|
|
"dec": 2,
|
|
"nullable": "no",
|
|
"default": "0.7"
|
|
},
|
|
{
|
|
"name": "enable_streaming",
|
|
"title": "Enable streaming response for LLM calls",
|
|
"type": "str",
|
|
"length": "1",
|
|
"nullable": "no",
|
|
"default": "1"
|
|
},
|
|
{
|
|
"name": "llm_service_url",
|
|
"title": "LLM service base URL (OpenAI-compatible endpoint)",
|
|
"type": "str",
|
|
"length": 255,
|
|
"nullable": "yes",
|
|
"default": "https://dashscope.aliyuncs.com/compatible-mode/v1",
|
|
"comments": "Base URL for the LLM provider API, e.g. https://api.openai.com/v1"
|
|
},
|
|
{
|
|
"name": "llm_api_key",
|
|
"title": "LLM service API key",
|
|
"type": "str",
|
|
"length": 255,
|
|
"nullable": "yes",
|
|
"default": "",
|
|
"comments": "API key for LLM service authentication (Bearer token)"
|
|
},
|
|
{
|
|
"name": "available_models",
|
|
"title": "Available LLM models (JSON array)",
|
|
"type": "text",
|
|
"nullable": "yes",
|
|
"default": "",
|
|
"comments": "JSON array of model IDs, e.g. [\"qwen3-max\", \"qwen3-plus\"]"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"title": "Creation timestamp",
|
|
"type": "timestamp",
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "updated_at",
|
|
"title": "Last update timestamp",
|
|
"type": "timestamp",
|
|
"nullable": "no"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "idx_user_agent_config",
|
|
"idxtype": "index",
|
|
"idxfields": ["user_id"]
|
|
}
|
|
],
|
|
"codes": []
|
|
} |