diff --git a/.vscode/settings.json b/.vscode/settings.json index c9ef5af..d558379 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -19,6 +19,7 @@ "langchain", "langfuse", "metas", + "michat", "mina", "mindnote", "openai", diff --git a/assets/chatHistory.json b/assets/chatHistory.json new file mode 100644 index 0000000..04eba29 --- /dev/null +++ b/assets/chatHistory.json @@ -0,0 +1,1237 @@ +[ + { + "body": { + "content": "{\"text\":\"
感觉真的应该出个官方版的,流量浪费了
最近想了个逻辑,和雷总说,我们可以用你的公开记忆数据的数字人换小米用户的记忆数据
\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728816421121", + "deleted": false, + "message_id": "om_b8e49fb4d518705afe2d7d1354a2c6a8", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728816476510", + "updated": true + }, + { + "body": { "content": "{\"text\":\"进一步的为每个人做一个数字分身\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728816456421", + "deleted": false, + "message_id": "om_8b19c4c8ec92cd931c820660cd55a034", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728816456421", + "updated": false + }, + { + "body": { "content": "{\"text\":\"AI 时代的小米数据飞轮就转动起来了\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728816498465", + "deleted": false, + "message_id": "om_c0757bd3dbf0cbe69651df46fabe8013", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728816498465", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"人车家,人是中心\\n谁掌握更多人的数据、挖掘好人的数据价值,就有更多商业价值\\nAI 时代,新的大语言计算范式诞生后,会拉动更多数据参与计算,预测人的数据化程度和参与大模型计算的程度会进一步大幅提升。\\n\\n在这个新趋势下,哪个公司会获得这波数据计算的红利,最后掌握最多的数据、以这些数据为生产资料做产品服务消费者?以及这些公司可能的路径是什么?\\n成为关键问题\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728822284760", + "deleted": false, + "message_id": "om_a9b230ebffed6a026b700e6d63269e62", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728822284760", + "updated": false + }, + { + "body": { "content": "{\"text\":\"写点备忘\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728822291570", + "deleted": false, + "message_id": "om_e3c869718472ca9edf02ffb3e4417bc6", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728822291570", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"我已经把群当记事本了[笑哭]\\nmi chat 飞书版能不能把我在 ai 应用和这个群的所有数据,相关上下文数据获取出来\\n\\n进一步的数据分类,把上面这些思考的东西和项目的、任务性的区分开\\n\\n就是我的工作回忆录了\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728822467916", + "deleted": false, + "message_id": "om_0a8b2d37a7d0dd20ba13e5b99949c335", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728822467916", + "updated": false + }, + { + "body": { + "content": "{\"image_key\":\"img_v2_62fd5c6e-dbf6-405f-b1cd-06eaa046678l\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728822598276", + "deleted": false, + "message_id": "om_6002bef6337eee97a47e4f950d261d2d", + "msg_type": "image", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728822598276", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"参考微信上这个广告\\n\\n把自己的小米经历写成一本书,5 分钟 0 基础\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728822661591", + "deleted": false, + "message_id": "om_06afee4add4f721c9b64095bb121a03c", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728822661591", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"https://mp.weixin.qq.com/s/W0TjU-svytY17Cg_F8PaSw\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728864770487", + "deleted": false, + "message_id": "om_ef9262aa9cbf0a7bebfc4587a313e78d", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728864770487", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"@_user_1 不以公司的身份去做,以个人的身份做+和公关沟通默契后,不举报下线我们就行\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728868839974", + "deleted": false, + "mentions": [ + { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "key": "@_user_1", + "name": "张鹏", + "tenant_key": "2ee61fe50f4f1657" + } + ], + "message_id": "om_87038caee841ca8163c5cbca4eddc8bc", + "msg_type": "text", + "parent_id": "om_b8e49fb4d518705afe2d7d1354a2c6a8", + "root_id": "om_b8e49fb4d518705afe2d7d1354a2c6a8", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728868839974", + "updated": false + }, + { + "body": { "content": "{\"text\":\"这样所有人压力都小\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728868852773", + "deleted": false, + "message_id": "om_628b67aeaed8a4c89eb30e0f34f2b105", + "msg_type": "text", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728868852773", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"我想一下这个路径\\n\\n发个 app 就叫 AI 导师\\n可以把雷总和巴菲特、芒格、李光耀等导师放一起\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728869209135", + "deleted": false, + "message_id": "om_c49ac8627a3b4bd65820e426a30d92c0", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728869209135", + "updated": false + }, + { + "body": { "content": "{\"text\":\"谁来告,就下架谁\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728869290903", + "deleted": false, + "message_id": "om_b19d6b25eac961cd40618454f0f2d1c7", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728869290903", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"https://xiaomi.f.mioffice.cn/file/boxk4dxwdMtvcVF8cr5TL3o870f\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728876382771", + "deleted": false, + "message_id": "om_806ca54e214b92b20e1c0a0d3ca6449f", + "msg_type": "text", + "sender": { + "id": "ou_784cee74cac253716abcb10703e03bde", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728876382771", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"@_user_1 @_user_2 \\n光哥,可以体会下~~ 嗯,上次提到的deepseekV2.5,我们试了试,效果更好,但是Token生成速度(TPS)太慢了,不适合当前Mi Chat的场景[送心] \\n后续我们看下如何优化(通过模型量化、推理加速的手段来提速),再考虑使用呀\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728876474496", + "deleted": false, + "mentions": [ + { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "key": "@_user_1", + "name": "左建光", + "tenant_key": "2ee61fe50f4f1657" + }, + { + "id": "ou_04caea5a8f590ba69edaa8e4f6095ba6", + "id_type": "open_id", + "key": "@_user_2", + "name": "张卫", + "tenant_key": "2ee61fe50f4f1657" + } + ], + "message_id": "om_247f87a8862fb368da49ee28ad440bb7", + "msg_type": "text", + "sender": { + "id": "ou_784cee74cac253716abcb10703e03bde", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728876474496", + "updated": false + }, + { + "body": { + "content": "{\"title\":\"\",\"content\":[[{\"tag\":\"text\",\"text\":\"个人感觉这次kimi发布的new功能挺尴尬的 产品体验损失的好严重...这个问题 全流程需要处理50s\",\"style\":[]}],[{\"tag\":\"img\",\"image_key\":\"img_v2_5339ad8f-75dc-4afc-bb70-4466ffaef94l\",\"width\":1152,\"height\":892}],[{\"tag\":\"text\",\"text\":\"不开启探索版的时候大概是20s,和平时的体验差距不大。\",\"style\":[]}],[{\"tag\":\"img\",\"image_key\":\"img_v2_5ba16a9f-0fdf-4ccc-8db1-5eefd83f48el\",\"width\":1204,\"height\":838}],[{\"tag\":\"text\",\"text\":\"问题本身是个简单问题,回答的质量差距不大。\",\"style\":[]}]]}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728879966843", + "deleted": false, + "message_id": "om_c15c4a7438d8d402539ad5f47f262178", + "msg_type": "post", + "sender": { + "id": "ou_5716d582eff41734a4cd1977e35c1fcf", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728879966843", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"@_user_1 嗯。应该是简单问题,默认不会开启? 需要手动开启探索版,如果我们的问题是复杂的,毕竟更贵、次数有限制?\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728880123960", + "deleted": false, + "mentions": [ + { + "id": "ou_5716d582eff41734a4cd1977e35c1fcf", + "id_type": "open_id", + "key": "@_user_1", + "name": "魏柏楠", + "tenant_key": "2ee61fe50f4f1657" + } + ], + "message_id": "om_c7ae6df59263827ee56d94eaac2b327b", + "msg_type": "text", + "parent_id": "om_c15c4a7438d8d402539ad5f47f262178", + "root_id": "om_c15c4a7438d8d402539ad5f47f262178", + "sender": { + "id": "ou_784cee74cac253716abcb10703e03bde", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728880123960", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"用了下,回答的内容确实没有显著的区别。\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728880767310", + "deleted": false, + "message_id": "om_3b83dbaacbb5c05b8795e8f5aff61231", + "msg_type": "text", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728880767310", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"估计是有些类别的问题上会能感受到差别\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728880969383", + "deleted": false, + "message_id": "om_17e723a65452192395368fb4b4f6bd0c", + "msg_type": "text", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728880969383", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"嗯 能差异的部分 核心应该是问出复杂问题[[NotFound]]\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728883368514", + "deleted": false, + "message_id": "om_2ba65ceb9c536204900f8ffc0f0c857c", + "msg_type": "text", + "sender": { + "id": "ou_5716d582eff41734a4cd1977e35c1fcf", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728883368514", + "updated": false + }, + { + "body": { "content": "{\"text\":\"是的。有没有复杂问题来个案例[笑哭]\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728883517343", + "deleted": false, + "message_id": "om_49fde302c15d0f236b5e5a2466e4f50c", + "msg_type": "text", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728883517343", + "updated": false + }, + { + "body": { + "content": "{\"title\":\"\",\"content\":[[{\"tag\":\"img\",\"image_key\":\"img_v2_dc769f51-26fa-4ce6-b6bc-0b745fcdc90l\",\"width\":2325,\"height\":785}],[{\"tag\":\"text\",\"text\":\"复杂问题问不了。。。\",\"style\":[]}]]}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728883620322", + "deleted": false, + "message_id": "om_12cacaef72ce12ba5fdbde5f35842628", + "msg_type": "post", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728883620322", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"这就凸显了AI大模型产品在对比测试上的重要性,不然一次升级连自己都说不清楚哪里提升了哪里降低了\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728883838193", + "deleted": false, + "message_id": "om_2672139330b447df89023a2782bcec79", + "msg_type": "text", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728883838193", + "updated": false + }, + { + "body": { "content": "This message type is currently not supported" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728890678988", + "deleted": false, + "message_id": "om_a745ce28dc59fca432cef1824deb9ca3", + "msg_type": "merge_forward", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728890678988", + "updated": false + }, + { + "body": { "content": "{\"text\":\"王哲用完去找田春英的文档去了~\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728891198883", + "deleted": false, + "message_id": "om_daf589e83074ce9f7553f0033fbfd4af", + "msg_type": "text", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728891198883", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"已经开始扩散了\\n模型现在是外部模型,这个是一个风险\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728891301260", + "deleted": false, + "message_id": "om_31b1a9252961791fd1f2fdd3cbb44b7d", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728891301260", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"准备好了,可以随时改成内部模型MiLM2.1-13B-Chat。\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728891388565", + "deleted": false, + "message_id": "om_91d6072473f140e96c520b74617e7087", + "msg_type": "text", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728891388565", + "updated": false + }, + { + "body": { "content": "{\"text\":\"[捂脸]还是用更好的开源模型吧\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728891463179", + "deleted": false, + "message_id": "om_06c44e23a613a4c063d1fb07c26ee3ca", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728891463179", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"@_user_1 光哥,这个效果有做过对比么...建议对比下,而后上线\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728891480555", + "deleted": false, + "mentions": [ + { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "key": "@_user_1", + "name": "左建光", + "tenant_key": "2ee61fe50f4f1657" + } + ], + "message_id": "om_9c3572d7919aad42dfdd7452b949c1f6", + "msg_type": "text", + "parent_id": "om_91d6072473f140e96c520b74617e7087", + "root_id": "om_91d6072473f140e96c520b74617e7087", + "sender": { + "id": "ou_784cee74cac253716abcb10703e03bde", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728891480555", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"你看,问题又回到了\\\"AI大模型产品在对比测试上的重要性\\\"\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728891568259", + "deleted": false, + "message_id": "om_dd1ea0ae8f4823e26375184320352aa9", + "msg_type": "text", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728891568259", + "updated": false + }, + { + "body": { + "content": "{\"image_key\":\"img_v2_818ac9ef-9618-4db2-af1c-7c816c62e04l\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728891665263", + "deleted": false, + "message_id": "om_72ea6f5aa94e21b2897ae8011113b5fc", + "msg_type": "image", + "sender": { + "id": "ou_784cee74cac253716abcb10703e03bde", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728891665263", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"@_user_1 印象中,中奇做了一个大模型对比平台。 就是对于同一批问题,各个模型回答的效果如何\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728891725785", + "deleted": false, + "mentions": [ + { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "key": "@_user_1", + "name": "左建光", + "tenant_key": "2ee61fe50f4f1657" + } + ], + "message_id": "om_7c9265f7f068eb7e5a0f6c63bbb12163", + "msg_type": "text", + "parent_id": "om_dd1ea0ae8f4823e26375184320352aa9", + "root_id": "om_dd1ea0ae8f4823e26375184320352aa9", + "sender": { + "id": "ou_784cee74cac253716abcb10703e03bde", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728891725785", + "updated": false + }, + { + "body": { "content": "{\"text\":\"关键是没有没有评测好坏的标准\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728891736352", + "deleted": false, + "message_id": "om_7a89cdbbf44527979b2538605648e1ed", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728891736352", + "updated": false + }, + { + "body": { "content": "{\"text\":\"“真值”“预期”是什么\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728891750133", + "deleted": false, + "message_id": "om_19d1c1b3418f7f6df18170e3e1ccdfa7", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728891750133", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"额。。。这个一般都是先造一批( 代表性、典型问题),即提供真值\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728891776894", + "deleted": false, + "message_id": "om_e1f1212c2866f3cd95dace7ce8c22aef", + "msg_type": "text", + "sender": { + "id": "ou_784cee74cac253716abcb10703e03bde", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728891776894", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"这个是评测的真难点\\n有的话就可以自动化、规模化的评测,而非网页上人工试试\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728891789494", + "deleted": false, + "message_id": "om_bdfc5dd16e2362c06dc11d5daeb4f862", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728891789494", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"刚才试了下,周六大会上演示的阿外的问题在MiLM2.1-13B-Chat上都可以回答,没问题。\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728891791779", + "deleted": false, + "message_id": "om_6699788b0a7629024f11561c3fa1306c", + "msg_type": "text", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728891791779", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"Qwen是不是还是会更好些?\\n还是说这个场景对推理数据的要求高,对模型要求不高\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728891843851", + "deleted": false, + "message_id": "om_3f4dd58009417937eabb4694239848e1", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728891843851", + "updated": false + }, + { + "body": { "content": "{\"text\":\"给栾老师的模型找了个爆款应用的场景\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728891900248", + "deleted": false, + "message_id": "om_4e93ce92f763ccb8f744f8390e12e6b4", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728891900248", + "updated": false + }, + { + "body": { "content": "{\"text\":\"我再问下qingchao,确认下\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728891948184", + "deleted": false, + "message_id": "om_9278982718627c3013bda2ea0deb9613", + "msg_type": "text", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728891948184", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"AI应用带动大模型的销售 如果AI应用都用MiLM是不是就卖爆了[呲牙]\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728892069588", + "deleted": false, + "message_id": "om_d3d48f35a6aa7b8d06bbf0429ee9dc7f", + "msg_type": "text", + "sender": { + "id": "ou_5716d582eff41734a4cd1977e35c1fcf", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728892069588", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"确认了下。目前mify只有MiLM2.1-13B-Chat是我们自己私有部署的,其他都是会把问题传到外部\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728892102557", + "deleted": false, + "message_id": "om_d8a84dd1f1944717cdb342140de04137", + "msg_type": "text", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728892102557", + "updated": false + }, + { + "body": { "content": "{\"text\":\"我一会在对比下卢鹏和绍辉的\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728892336825", + "deleted": false, + "message_id": "om_ff3d4a130e41f96e83d16536d8ebcd27", + "msg_type": "text", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728892336825", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"试了下卢鹏和绍辉同样的问题,MiLM2.1-13B-Chat的准确性确实要差不少。不过也没有太离谱,差不多是gpt的60%(我拍的)
\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728893532451", + "deleted": false, + "message_id": "om_429d41392912a2bbe85ea3c1cc950c1e", + "msg_type": "text", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728893540191", + "updated": true + }, + { + "body": { + "content": "{\"text\":\"可以回答,但是会让体验下降很多。主要是准确性不太好\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728893713274", + "deleted": false, + "message_id": "om_2862eab5341d92b89b581959f99d4eaa", + "msg_type": "text", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728893713274", + "updated": false + }, + { + "body": { "content": "{\"text\":\"先确保效果\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728893837407", + "deleted": false, + "message_id": "om_2db3141a1e6c9373c1ee8cd5e602e28c", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728893837407", + "updated": false + }, + { + "body": { + "content": "{\"title\":\"\",\"content\":[[{\"tag\":\"img\",\"image_key\":\"img_v2_e6374d3f-75cb-4643-908d-25cf67f90ddl\",\"width\":1503,\"height\":668}],[{\"tag\":\"text\",\"text\":\"欧老师这边弄来三个人\",\"style\":[]}]]}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728894250007", + "deleted": false, + "message_id": "om_a4739083608c864f60d55a92aa067245", + "msg_type": "post", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728894250007", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"田春英我还有点印象,我记得在6期的时候她就在,好像是负责网络的\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728894289474", + "deleted": false, + "message_id": "om_92830a64d174191a5dbc790d3b2181b4", + "msg_type": "text", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728894289474", + "updated": false + }, + { + "body": { "content": "{\"text\":\"NB了\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728894307749", + "deleted": false, + "message_id": "om_d286867571d418f38b54272fba99238b", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728894307749", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"初步验证了“只要有收益,大家就自觉的上交数据”\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728894340595", + "deleted": false, + "message_id": "om_92082c45f9f0695efa3706abf716c41b", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728894340595", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"有一次SAP的戴尔的机器坏了,开了一晚上的会,就是她主持\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728894342307", + "deleted": false, + "message_id": "om_49791aacbe8e84ff3ad0e1b562310597", + "msg_type": "text", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728894342307", + "updated": false + }, + { + "body": { "content": "{\"text\":\"一会问下她戴尔的机器问题\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728894355994", + "deleted": false, + "message_id": "om_6c617f2e5b9dcd16b3f3c9e0846171ce", + "msg_type": "text", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728894355994", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"建议在mi chat推介中,放几个公司里可以全员可见的文档的对话链接\\n让用户直观看到产品效果\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728895808562", + "deleted": false, + "message_id": "om_09e448c3a731b882d1f72483b7225181", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728895808562", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"看文档增加一些prompt,但我从用户(特别是小白)视角还是无法直观感受到\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728895871626", + "deleted": false, + "message_id": "om_e345df3e20f3018e9dd8f23a28a70ffd", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728895871626", + "updated": false + }, + { + "body": { "content": "{\"text\":\"@_user_1 好的 我补充下不敏感的案例\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728895923499", + "deleted": false, + "mentions": [ + { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "key": "@_user_1", + "name": "张鹏", + "tenant_key": "2ee61fe50f4f1657" + } + ], + "message_id": "om_08ba5e68e85e7d5ac6c49ec839954b44", + "msg_type": "text", + "parent_id": "om_e345df3e20f3018e9dd8f23a28a70ffd", + "root_id": "om_e345df3e20f3018e9dd8f23a28a70ffd", + "sender": { + "id": "ou_5716d582eff41734a4cd1977e35c1fcf", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728895923499", + "updated": false + }, + { + "body": { + "content": "{\"image_key\":\"img_v2_1ad25be6-fc06-4813-a386-521080cfedbl\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728897124190", + "deleted": false, + "message_id": "om_d4698dd7e9299b109f38c675b6343b4c", + "msg_type": "image", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728897124190", + "updated": false + }, + { + "body": { "content": "{\"text\":\"@_user_1 也同步更新下这里的文档\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728897140185", + "deleted": false, + "mentions": [ + { + "id": "ou_5716d582eff41734a4cd1977e35c1fcf", + "id_type": "open_id", + "key": "@_user_1", + "name": "魏柏楠", + "tenant_key": "2ee61fe50f4f1657" + } + ], + "message_id": "om_f5dcf57f42b23bbff966132ad148cb79", + "msg_type": "text", + "parent_id": "om_08ba5e68e85e7d5ac6c49ec839954b44", + "root_id": "om_e345df3e20f3018e9dd8f23a28a70ffd", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728897140185", + "updated": false + }, + { + "body": { + "content": "{\"image_key\":\"img_v2_4b610d06-3c59-4987-94a2-cf0015a572cl\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728897182189", + "deleted": false, + "message_id": "om_a58a298fb0cf7f0df0a0ad3c1d860851", + "msg_type": "image", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728897182189", + "updated": false + }, + { + "body": { "content": "{\"text\":\"现在的案例,效果一般:)\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728897222613", + "deleted": false, + "message_id": "om_a6136f4a13b2e0504c7d8ac4247c3f87", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728897222613", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"这是@_user_1 你自己的周报数据么[奸笑]\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728897264373", + "deleted": false, + "mentions": [ + { + "id": "ou_784cee74cac253716abcb10703e03bde", + "id_type": "open_id", + "key": "@_user_1", + "name": "徐函秋", + "tenant_key": "2ee61fe50f4f1657" + } + ], + "message_id": "om_f9eb1b76413bd5c175f5812e04f882de", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728897264373", + "updated": false + }, + { + "body": { "content": "{\"text\":\"看总结,几乎联系不到你\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728897372876", + "deleted": false, + "message_id": "om_4d828a5c82e29b07af3a931ec423f911", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728897372876", + "updated": false + }, + { + "body": { "content": "{\"text\":\"@_user_1 柏楠的,哈哈\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728897973748", + "deleted": false, + "mentions": [ + { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "key": "@_user_1", + "name": "张鹏", + "tenant_key": "2ee61fe50f4f1657" + } + ], + "message_id": "om_c79dd24dc2fd58568ed213b1970f13d6", + "msg_type": "text", + "parent_id": "om_f9eb1b76413bd5c175f5812e04f882de", + "root_id": "om_f9eb1b76413bd5c175f5812e04f882de", + "sender": { + "id": "ou_784cee74cac253716abcb10703e03bde", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728897973748", + "updated": false + }, + { + "body": { + "content": "{\"text\":\"你说完,我也联系不上[捂脸]\\n而且内功是指可复制的方法论\\n看来这个不是一个通用的词语\"}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728898076007", + "deleted": false, + "message_id": "om_a04537688a1df20a14c7089aa7044a47", + "msg_type": "text", + "sender": { + "id": "ou_91c74f39a87414e2b568a3783283098a", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728898076007", + "updated": false + }, + { + "body": { "content": "{\"text\":\"@_user_1 /groupchat
\"}" }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728899205971", + "deleted": false, + "mentions": [ + { + "id": "ou_2848711ba5b5dda52b1f499f65bee641", + "id_type": "open_id", + "key": "@_user_1", + "name": "Mi Chat", + "tenant_key": "2ee61fe50f4f1657" + } + ], + "message_id": "om_f653ea60776d423ebe7986a734c96c53", + "msg_type": "text", + "sender": { + "id": "ou_5716d582eff41734a4cd1977e35c1fcf", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728901649006", + "updated": true + }, + { + "body": { + "content": "{\"title\":\"\",\"content\":[[{\"tag\":\"img\",\"image_key\":\"img_v2_31841e7c-49e5-425a-881f-5e55c1b96f9l\",\"width\":2268,\"height\":1371}],[{\"tag\":\"text\",\"text\":\"这个问题,探索版解释的更清楚些\",\"style\":[]}]]}" + }, + "chat_id": "oc_bd23da1ae9948654fc04365d7d102d73", + "create_time": "1728899312275", + "deleted": false, + "message_id": "om_3f47ea8c58aa6e8ba08a8bcb232bd353", + "msg_type": "post", + "sender": { + "id": "ou_d36614bcb1524972548232999182b810", + "id_type": "open_id", + "sender_type": "user", + "tenant_key": "2ee61fe50f4f1657" + }, + "update_time": "1728899312275", + "updated": false + } +] diff --git a/routes/bot/groupAgent/chatHistory.ts b/routes/bot/groupAgent/chatHistory.ts new file mode 100644 index 0000000..4e4156b --- /dev/null +++ b/routes/bot/groupAgent/chatHistory.ts @@ -0,0 +1,141 @@ +import { parseJsonString } from "@egg/hooks" +import logger from "@egg/logger" + +import { Context, LarkServer } from "../../../types" + +interface Message { + user: string + content: string + time: string +} + +const extractTextFromJson = (data: any): string => { + let result = "" + + if (Array.isArray(data)) { + // 如果是数组,遍历数组元素 + for (const element of data) { + result += extractTextFromJson(element) // 递归调用处理每个元素 + } + } else if (typeof data === "object" && data !== null) { + // 如果是对象,遍历对象的键 + for (const key in data) { + if (key === "text" && typeof data[key] === "string") { + result += data[key] // 拼接 text 值 + } else { + result += extractTextFromJson(data[key]) // 递归调用处理子对象 + } + } + } + + return result +} + +const getChatHistory = async ({ + larkService, + larkBody: { + actionValue: { chatId, timeScope }, + }, +}: Context.Data): Promise