创建对话时加入参数变量,比如商品 Id
Open
- Dominant language
- TypeScript
- Stars
- 292
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
我们将智能体发布后,用 ChatSDK 集成到自己 App 上,非常方便。
现在问题是用户创建会话的时候,我们想传入当前的商品ID,让 AI 直接讲解这个商品 , 同时用户对某一个商品的咨询会话保持独立,也就是 UserID+ 商品ID = session_name 。
我们现在的实现是每次用户打开 AI 讲解,都通过API 将当前商品ID 当做智能体的用户变量去存,这个方法也能用。但是我们的用户账号可能有多个设备,或者快速切换之类的原因,会导致商品ID冲突变化。
有没有在创建会话时候能带上默认参数,方便后续工作流获取信息。
Contributor guide
Research direction
Start by locating the SDK entry point for creating conversations and inspect the request fields it currently accepts. Determine how a per-session product ID could be passed and remain isolated for each user and product; done means the value can be supplied at conversation creation and is available to the later workflow without conflicting across devices.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100