Skip to content

Commit

Permalink
fix: AI-generated desc lose space and case info terwer#775
Browse files Browse the repository at this point in the history
  • Loading branch information
cesaryuan committed Oct 11, 2023
1 parent 05a8712 commit e4f07f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/publish/form/PublishDescription.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const handleMakeDesc = async () => {
const { chat } = useChatGPT()
const chatText = await chat(inputWord, {
name: "desc",
systemMessage: HtmlUtil.parseHtml(formData.html, AiConstants.MAX_INPUT_TOKEN_LENGTH, true),
systemMessage: formData.md?.substring(0, AiConstants.MAX_INPUT_TOKEN_LENGTH) ?? HtmlUtil.parseHtml(formData.html, AiConstants.MAX_INPUT_TOKEN_LENGTH, true),
})
if (StrUtil.isEmptyString(chatText)) {
ElMessage.error("请求错误,请在偏好设置配置请求地址和ChatGPT key!")
Expand Down

0 comments on commit e4f07f7

Please sign in to comment.