Skip to content

fix: Fix the generate_prompt method generated a 'None' string#6464

Open
wangliang181230 wants to merge 1 commit into
1Panel-dev:v2from
wangliang181230:PR/67-fix--generate_prompt--NoneStr
Open

fix: Fix the generate_prompt method generated a 'None' string#6464
wangliang181230 wants to merge 1 commit into
1Panel-dev:v2from
wangliang181230:PR/67-fix--generate_prompt--NoneStr

Conversation

@wangliang181230

@wangliang181230 wangliang181230 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it?

fix: Fix the generate_prompt method generated a 'None' string

修复方法 generate_prompt 生成了 'None' 字符串的问题。
注:调用端并不是生成提示词时,这是错误的,应该返回None,而不是 'None' 字符串。

Summary of your change

判断器 做测试:

  1. 修复前:(a=Noneb=None,但 a != b,因为 None != 'None'
    图片

  2. 修复后:(a=Noneb=Nonea == bNone == None
    图片

Please indicate you've done the following:

  • Made sure tests are passing and test coverage is added if needed.
  • Made sure commit message follow the rule of Conventional Commits specification.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant