Replaces wrong-direction llm_api.py (which served OpenAI endpoints) with llm_client.py -- a client that calls supplier LLM APIs. New module: llm_client.py - llm_chat(messages, model, temperature, ...) -> OpenAI response dict - llm_chat_stream(messages, ...) -> async generator of SSE chunks - llm_simple(prompt, system) -> plain text response - llm_list_models() -> list available models from provider - llm_get_config() -> show current config (key masked) - Supports provider presets: openai, dashscope, deepseek, siliconflow - Retry with exponential backoff (3 attempts) - 429 rate limit handling with Retry-After - Structured logging via appPublic.log Model changes (harnessed_agent_config): - Add llm_provider (preset name: dashscope/openai/deepseek/siliconflow) - Add top_p field - llm_service_url defaults to DashScope compatible endpoint Other: - Remove wrong-direction /v1/ endpoints - Fix pyproject.toml deps: only sqlor + bricks_for_python - Update init/data.json seed data with LLM config fields - Update CRUD view with llm_provider dropdown
106 lines
3.5 KiB
JSON
106 lines
3.5 KiB
JSON
{
|
|
"hermes_memory": [
|
|
{
|
|
"id": "default_user_profile_1",
|
|
"user_id": "user_1",
|
|
"target": "user",
|
|
"content": "Default user profile for Hermes Agent module - User 1",
|
|
"created_at": "2026-04-15 21:06:00",
|
|
"updated_at": "2026-04-15 21:06:00"
|
|
},
|
|
{
|
|
"id": "default_memory_notes_1",
|
|
"user_id": "user_1",
|
|
"target": "memory",
|
|
"content": "Default memory notes for Hermes Agent module - User 1",
|
|
"created_at": "2026-04-15 21:06:00",
|
|
"updated_at": "2026-04-15 21:06:00"
|
|
},
|
|
{
|
|
"id": "default_user_profile_2",
|
|
"user_id": "user_2",
|
|
"target": "user",
|
|
"content": "Default user profile for Hermes Agent module - User 2",
|
|
"created_at": "2026-04-15 21:06:00",
|
|
"updated_at": "2026-04-15 21:06:00"
|
|
},
|
|
{
|
|
"id": "default_memory_notes_2",
|
|
"user_id": "user_2",
|
|
"target": "memory",
|
|
"content": "Default memory notes for Hermes Agent module - User 2",
|
|
"created_at": "2026-04-15 21:06:00",
|
|
"updated_at": "2026-04-15 21:06:00"
|
|
}
|
|
],
|
|
"hermes_skills": [
|
|
{
|
|
"id": "harnessed_agent_core_1",
|
|
"user_id": "user_1",
|
|
"name": "hermes-agent-core",
|
|
"description": "Core functionality of Hermes Agent module - User 1",
|
|
"category": "software-development",
|
|
"version": "1.0.0",
|
|
"content": "Core skill for Hermes Agent module implementation - User 1",
|
|
"created_at": "2026-04-15 21:06:00",
|
|
"updated_at": "2026-04-15 21:06:00"
|
|
},
|
|
{
|
|
"id": "harnessed_agent_core_2",
|
|
"user_id": "user_2",
|
|
"name": "hermes-agent-core",
|
|
"description": "Core functionality of Hermes Agent module - User 2",
|
|
"category": "software-development",
|
|
"version": "1.0.0",
|
|
"content": "Core skill for Hermes Agent module implementation - User 2",
|
|
"created_at": "2026-04-15 21:06:00",
|
|
"updated_at": "2026-04-15 21:06:00"
|
|
}
|
|
],
|
|
"harnessed_agent_config": [
|
|
{
|
|
"id": "default_agent_config_user_1",
|
|
"user_id": "user_1",
|
|
"work_dir": "./hermes_work",
|
|
"skills_path": "~/.hermes/skills",
|
|
"max_memory_tokens": 2000,
|
|
"default_priority": 50,
|
|
"high_priority_threshold": 70,
|
|
"low_priority_threshold": 30,
|
|
"auto_cleanup_enabled": "1",
|
|
"min_retention_days": 30,
|
|
"created_at": "2026-04-20 10:48:00",
|
|
"updated_at": "2026-04-20 10:48:00",
|
|
"llm_provider": "dashscope",
|
|
"llm_service_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
|
|
"llm_api_key": "",
|
|
"available_models": "[\"qwen3-max\", \"qwen-plus\", \"qwen-turbo\"]",
|
|
"default_model": "qwen-plus",
|
|
"default_temperature": 0.7,
|
|
"top_p": 1.0,
|
|
"enable_streaming": "1"
|
|
},
|
|
{
|
|
"id": "default_agent_config_user_2",
|
|
"user_id": "user_2",
|
|
"work_dir": "./hermes_work",
|
|
"skills_path": "~/.hermes/skills",
|
|
"max_memory_tokens": 2000,
|
|
"default_priority": 50,
|
|
"high_priority_threshold": 70,
|
|
"low_priority_threshold": 30,
|
|
"auto_cleanup_enabled": "1",
|
|
"min_retention_days": 30,
|
|
"created_at": "2026-04-20 10:48:00",
|
|
"updated_at": "2026-04-20 10:48:00",
|
|
"llm_provider": "dashscope",
|
|
"llm_service_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
|
|
"llm_api_key": "",
|
|
"available_models": "[\"qwen3-max\", \"qwen-plus\", \"qwen-turbo\"]",
|
|
"default_model": "qwen-plus",
|
|
"default_temperature": 0.7,
|
|
"top_p": 1.0,
|
|
"enable_streaming": "1"
|
|
}
|
|
]
|
|
} |