feat(adapters): 添加 Vercel AI SDK 记忆中间件#470
Open
Qiyuanqiii wants to merge 1 commit into
Open
Conversation
Collaborator
|
Thank you for submitting this PR and participating in Tencent Rhino-bird Open-source Training Program! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue
Related to #235
背景
#235 已确认 #316 为通用 Gateway client 基线、#372 为 MCP bridge 基线。本 PR 不引入新的 Gateway client、MCP server 或通用 Adapter SDK,而是补充一个尚未覆盖的平台原生接入方式:Vercel AI SDK v6
LanguageModelV3Middleware。功能
createAiSdkMemoryMiddleware()。transformParams:根据最后一条用户文本召回记忆,并追加到当前用户消息末尾。wrapGenerate:在最终非工具调用响应后写入 user/assistant turn。wrapStream:收集 text delta,在流正常结束后写入记忆。@tencentdb-agent-memory/memory-tencentdb/ai-sdk范围边界
本 PR 不包含:
验证命令
验证结果
验证截图