labring / FastGPT

FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, and visual AI workflow orchestration, letting you easily develop and deploy complex question-answering systems without the need for extensive setup or configuration.
https://tryfastgpt.ai
Other
17.49k stars 4.69k forks source link

功能请求:fastgpt函数的cTime输出中包含星期几 #1276

Closed KanoSang closed 5 months ago

KanoSang commented 6 months ago

例行检查

功能描述 如果fastgpt中的cTime函数能输出所包含的星期信息会非常有帮助。这个功能的增强能让开发者更有效地管理与时间相关的功能,尤其是那些依赖周计划的功能。 应用场景 例如,在一个需要在特定日子执行某些操作的日程安排应用中,如果能直接获取到星期信息,无需额外的日期解析或引入外部库,将会极大地简化流程。 相关示例 建议的格式可以是:YYYY-MM-DD, 星期X, HH:mm:ss。这样既能够提供完整的日期和时间信息,也包括了星期,使得时间信息更为全面和实用。

nongmo677 commented 6 months ago

引入dayjs以及它自身的locale扩展来支持中文格式化

import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';
dayjs().format('YYYY-MM-DD HH:mm:ss dddd');

image

KanoSang commented 6 months ago

感谢你的回复,请问是改源码实现的吗,我这边是win系统docker部署的

nongmo677 commented 6 months ago

感谢你的回复,请问是改源码实现的吗,我这边是win系统docker部署的

是,源码搜索dayjs(),找到相关代码重新打包部署

KanoSang commented 5 months ago

了解,谢谢

nightzjp commented 5 months ago

如果官方能支持就更完美了。非必要真不想改动源码

c121914yu commented 5 months ago

https://github.com/labring/FastGPT/releases/tag/v4.8-preview 已包含(英文星期,不过按模型能力,能理解)

nightzjp commented 5 months ago

https://github.com/labring/FastGPT/releases/tag/v4.8-preview 已包含(英文星期,不过按模型能力,能理解)

感谢官方,感谢c1219yu。Thanks♪(・ω・)ノ