DB-GPT icon indicating copy to clipboard operation
DB-GPT copied to clipboard

[Bug] UnboundLocalError: cannot access local variable 'msg' where it is not associated with a value

Open yuerf opened this issue 9 months ago • 4 comments

Search before asking

  • [X] 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

1

Models information

LLM: glm-4 Embedding model: text2vec-large-chinese

What happened

dbgpt/app/scene/base_chat.py: Traceback (most recent call last): File "/home/test/llm_projects/DB-GPT/dbgpt/app/scene/base_chat.py", line 294, in stream_call self.current_message.add_ai_message(msg) ^^^ UnboundLocalError: cannot access local variable 'msg' where it is not associated with a value image

What you expected to happen

repair

How to reproduce

1

Additional context

No response

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

yuerf avatar May 17 '24 03:05 yuerf