mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-21 17:38:10 +00:00
- IO abstraction layer with OutputChannel routing and capability validation - Three-layer memory (Context-Document-Graph) with TF-IDF relevance pruning - OneBot V11 QQ protocol plugin with Reverse WebSocket client - Plugin system with hot-reload (SKILL.md + native factories) - Knowledge system with TF-IDF vector indexing - Personality system (personal.md) - Text memory (JSONL with rotation) - Change tracker (overlayfs) with rollback - Lua adapter VM - Design document (DESIGN.md) Module: gitcode.com/JianFeeeee/HomeAgent
23 lines
484 B
Lua
23 lines
484 B
Lua
local adapter = {}
|
|
|
|
adapter.name = "openai"
|
|
adapter.version = "1.0.0"
|
|
|
|
function adapter.transform_request(input)
|
|
local messages = input.messages or {}
|
|
local result = {
|
|
model = input.model or "gpt-4",
|
|
messages = messages,
|
|
temperature = input.temperature or 0.7,
|
|
max_tokens = input.max_tokens or 2048,
|
|
stream = input.stream or false
|
|
}
|
|
return result
|
|
end
|
|
|
|
function adapter.transform_response(raw)
|
|
return raw
|
|
end
|
|
|
|
return adapter
|