|
|
eb1b90445f
|
fix: 修复 Eino Graph 类型不匹配和多模态消息问题
- 添加 msg2str 转换节点解决 ChatModel 输出 *schema.Message 与 Splitter 期望 string 的类型不匹配
- 将多模态图片内容从 system 消息移到 user 消息(DashScope API 仅支持 user/tool 角色的多模态内容)
- 修复 Content 和 UserInputMultiContent 不能同时设置的问题
- Splitter 输出改为 StreamReader[string](单句),TTS 改为 TransformableLambda 流式消费
- 修复 .env 中 PostgreSQL DSN 和 Redis ADDR 的 http:// 前缀问题
|
2026-06-19 23:24:01 +08:00 |
|
|
|
4b731b5ac0
|
feat: 实现 Eino Graph 构建与 Orchestrator 适配器,切换 main.go
- graph.go: 构建 Graph 拓扑 START→STT→History→ChatModel→Splitter→TTS→Done→END
- 创建 eino-ext ChatModel 对接 DashScope OpenAI 兼容接口
- 统一使用值类型(PipelineInput/PipelineOutput)
- Callback 在运行时通过 Stream option 传入
- adapter.go: EinoOrchestrator 实现 orchestrator.Orchestrator 接口
- 解码 base64 音频/图片,注入 context 值
- 调用 Graph.Stream() 触发惰性执行并消费输出
- 追加用户/助手消息到历史
- main.go: 移除旧 llmService + orchestrator.New()
替换为 eino.NewPipelineGraph() + eino.NewEinoOrchestrator()
- 各节点统一使用值类型,State 传递请求元数据
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-19 21:58:17 +08:00 |
|
|
|
fd5c7712f8
|
feat: 引入 Eino 框架并实现 AI 编排层基础设施与节点
- 引入 cloudwego/eino v0.9.9 和 eino-ext/components/model/openai v0.1.13
- 新增 internal/eino/ 包:
- types.go: PipelineInput/Output、STTOutput、TokenUsage 类型定义
- state.go: PipelineState 跨节点状态收集(线程安全)
- callback.go: ChatModel OnEndWithStreamOutput 回调,逐 token 推送 llm_chunk
- nodes_stt.go: STT Lambda,支持文本/语音输入模式
- nodes_history.go: 历史组装 Lambda,含多模态图片支持
- nodes_splitter.go: 句子分割 Transform Lambda
- nodes_tts.go: TTS Lambda,逐句合成推送音频
- nodes_done.go: Done Lambda,发送 llm_done 并追加历史
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-19 21:49:28 +08:00 |
|