Skip to content

[Bug]: SDK AsyncHTTPClient session not support to submit parts #397

@yeshion23333

Description

@yeshion23333

Bug Description

参考session的API doc:https://github.com/volcengine/OpenViking/blob/main/docs/zh/api/05-sessions.md
使用AsyncHTTPClient:

  1. client使用的session为:openviking.client.session.Session。文档add_message()支持添加TextPart, ContextPart, ToolPart,实际该session仅能添加 str的content; 和文档有出入
  2. session.add_message() 查看实际调用AsyncHTTPClient 的 add_message() 方法,该方法支持传入prats。但不支持传入dict,需提前进行json序列化

Steps to Reproduce

session = client.session(session_id="123")
test = TextPart(text="Hello, how can I help?")
await client.add_message(session_id="123", role="user", parts=[test])
res = await session.commit()

Expected Behavior

  1. 文档和实际api保持一致;
    2.session.add_message() 支持parts

Actual Behavior

none

Minimal Reproducible Example

Error Logs

OpenViking Version

0.2.2

Python Version

3.14

Operating System

macOS

Model Backend

None

Additional Context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions