Skip to content

[Feature/功能]: 优化数据库对长提示词的保存 #1553

@tanmoumou252

Description

@tanmoumou252

Pre-submission Checklist / 提交前检查

  • I have searched the existing issues and this feature has not been requested / 我已搜索现有 issues,此功能尚未被提出
  • I have read the documentation / 我已阅读文档

FAQ Check / FAQ 检查

  • I have checked the FAQ and this feature has not been requested there / 我已查阅 FAQ,此功能未被提及

Background / 背景说明

提示词过长时 无法保存 控制台显示 Data too long for column 'content' at row 1

Problem Statement / 问题描述

提示词过长时 无法保存 控制台显示 Data too long for column 'content' at row 1

Proposed Solution / 期望方案

我是用的是便携版mysql mariadb 提示词 token约600

在cmd 依次运行

mysql -h 127.0.0.1 -u root axonhub

SHOW TABLES;   #看到提示词的表名是prompts

ALTER TABLE prompts MODIFY COLUMN content LONGTEXT;    #修改的是上一个结果中的提示词的表名

SELECT * FROM prompts;   #显示的是上上个结果的提示词的表名的内部具体数据

最终可以看到这个很长的提示词已经在表内了 且发起请求之后也正确的附加了

禁用提示词后获得的结果也符合没有提示词的预期,说明这个操作在mysql的数据库可以实现长提示词的保存

Feature Category / 功能分类

UI / Dashboard / UI / 控制台

Additional Context / 其他补充信息

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions