Update nexus wiki content
This commit is contained in:
27
wiki/concepts/Conversation-State-Persistence.md
Normal file
27
wiki/concepts/Conversation-State-Persistence.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
title: "Conversation-State-Persistence"
|
||||
type: concept
|
||||
tags: []
|
||||
sources: [expose-hermes-agent-as-an-openai-compatible-api-for-any-frontend]
|
||||
last_updated: 2026-05-02
|
||||
---
|
||||
|
||||
## Definition
|
||||
Conversation State Persistence 是服务端存储完整对话历史(含工具调用)的机制,使客户端无需自行管理上下文。
|
||||
|
||||
## Implementation in Hermes Agent
|
||||
通过 `/v1/responses` API 实现有状态会话:
|
||||
- **无状态**:`/v1/chat/completions` 每次请求需传递完整对话历史
|
||||
- **有状态**:`/v1/responses` 支持 `previous_response_id` 链式调用,服务端保留完整上下文(含工具调用)
|
||||
|
||||
## Key Benefits
|
||||
- 客户端无需存储和发送完整对话历史
|
||||
- 服务端自动维护工具调用记录
|
||||
- 支持多轮对话中的上下文连续性
|
||||
|
||||
## Use Case
|
||||
长对话场景下,使用 Responses API 可以大幅减少客户端代码复杂度。
|
||||
|
||||
## Related
|
||||
- [[ResponsesAPI]]
|
||||
- [[System-Prompt-Layering]]
|
||||
Reference in New Issue
Block a user