Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [ChatExcel] Tongyi proxyllm response with 'InvalidParameter:User and assistant need to appear alternately in the message' #756

Closed
4 of 15 tasks
AlphaHinex opened this issue Oct 31, 2023 · 4 comments · Fixed by #781
Labels
bug Something isn't working Waiting for reply

Comments

@AlphaHinex
Copy link
Contributor

Search before asking

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

Operating system information

MacOS(x86)

Python version information

3.10

DB-GPT version

main

Related scenes

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

Installation Information

Device information

CPU

Models information

LLM_MODEL=tongyi_proxyllm
PROXYLLM_BACKEND=qwen-turbo
LANGUAGE=zh
TONGYI_PROXY_API_KEY=sk-xxxxxxxxx

What happened

Only get InvalidParameter:User and assistant need to appear alternately in the message response

截屏2023-10-31 上午11 20 27

What you expected to happen

screenshot-20231031-112254

How to reproduce

  1. Use latest DB-GPT main branch code
  2. cp .env.template .env
  3. Update .env with
LLM_MODEL=tongyi_proxyllm
PROXYLLM_BACKEND=qwen-turbo
LANGUAGE=zh
# https://help.aliyun.com/zh/dashscope/developer-reference/quick-start?spm=a2c4g.11186623.0.0.15c231b1OqeXaZ
TONGYI_PROXY_API_KEY=sk-xxxxxxxxx
  1. Start DB-GPT by python pilot/server/dbgpt_server.py --port 5050
  2. Upload files below
  3. Talk to tongyi at ChatExcel scene

部门人数统计.xlsx
部门人数统计.csv

Additional context

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@AlphaHinex AlphaHinex added bug Something isn't working Waiting for reply labels Oct 31, 2023
@csunny
Copy link
Collaborator

csunny commented Oct 31, 2023

Great for that, please submit a PR.

@yhjun1026
Copy link
Collaborator

The message bug that the tongyi model dialogue input format is not compatible with dbgpt has been fixed and will be merge in 0.4.1. If you are anxious to fix it locally, you can modify pilot/model/proxy/llms/tongyi.py and modify it in combination with the definition of tongyi api. DBGPT messages are changed to tongyi messages

@AlphaHinex
Copy link
Contributor Author

This issue still exists in my environment with v0.4.1

@yhjun1026
Copy link
Collaborator

Well, due to the delay of another feature, my code did not have time to be merged into 0.4.1. Let me merge it and use your fix first. Your PR has been merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Waiting for reply
Projects
None yet
3 participants