Skip to content

[Bug] 发起会话带上user_name,但无法在对话历史中根据user_name进行查询 #2930

@mpthink

Description

@mpthink

Search before asking

  • I had searched in the issues and found no similar issues.

Operating system information

Linux

Python version information

=3.11

DB-GPT version

main

Related scenes

  • Chat Data
  • Chat Excel
  • Chat DB
  • Chat Knowledge
  • Model Management
  • Dashboard
  • Plugins

Installation Information

Device information

CentOS, Docker env

Models information

硅基流动

What happened

在/api/v1/chat/dialogue/new中,请求我带上了user_name,但是查询的时候user_name是空的,并没有保存

Image

我们看了下源码发现:
发起会话不会创建会话记录,user_name需通过/v1/chat/completions传递入库,但是接口里面对它做了重写覆盖,要改源码才能实现效果

Image

What you expected to happen

希望可以通过user_name去查询不同用户的会话历史记录

How to reproduce

调用post接口,然后再调用query_page接口,就能发现该问题,是一个必现问题

Additional context

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions