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] UnboundLocalError: cannot access local variable 'msg' where it is not associated with a value #1536

Closed
1 of 15 tasks
yuerf opened this issue May 17, 2024 · 4 comments · Fixed by #1592
Closed
1 of 15 tasks
Labels
bug Something isn't working Waiting for reply

Comments

@yuerf
Copy link

yuerf commented May 17, 2024

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

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 yuerf added bug Something isn't working Waiting for reply labels May 17, 2024
@nikenfls
Copy link

check llm (local model path/ embedding model path/proxy api/token etc.) configuration?

@yuerf
Copy link
Author

yuerf commented May 17, 2024

check llm (local model path/ embedding model path/proxy api/token etc.) configuration?

Thanks.

@hsts3535
Copy link

I also encountered the same problem. After careful inspection, there were no issues with the configuration of the glm-4 online model, and tongyi_proxyllm can be used normally.
PixPin_2024-05-20_09-05-06

@hsts3535
Copy link

hsts3535 commented May 20, 2024

Solved, the version of Python package -- zhipuai is too high, it has been downgraded to 1.0.7 and can now run "pip install zhipuai==1.0.7"

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
Development

Successfully merging a pull request may close this issue.

3 participants