V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
lvxiaomao
V2EX  ›  程序员

AI 大模型为什么不能正确的进行时间戳转日期

  •  
  •   lvxiaomao · 16 天前 · 1474 次点击

    问了 deepseek 、豆包,把毫秒级时间戳 1744271944172 转成成 yyyy-MM-dd HH:mm:ss 的格式。但是给的结果是不对的。 我需要给 deepseek 哪些信息才能获得正确的结果呀;

    11 条回复    2025-04-11 21:41:11 +08:00
    RoccoShi
        1
    RoccoShi  
       16 天前
    你需要一个可以执行 code 的模型
    z7356995
        2
    z7356995  
       16 天前
    自己写个 mcp
    cheng6563
        3
    cheng6563  
       15 天前
    让它笔算可能行
    InkStone
        4
    InkStone  
       15 天前
    你需要给他一个 MCP 才能获得正确的结果。

    但由于 deepseek r1 本身没有稳定调 MCP 的能力,所以……
    Semidio
        5
    Semidio  
       15 天前
    @InkStone V3 可以调用 MCP
    Curtion
        6
    Curtion  
       15 天前
    @InkStone 取决于实现 MCP 的方法,如果是 function call 不行,但是 prompt 可以,例如 Roo Code 就能使用 R1 调用 MCP
    InkStone
        7
    InkStone  
       15 天前
    @Curtion 可以调但不稳。在我自己的测试场景里,有个应该触发 MCP 调用的地方,V3 0324 基本可以正常触发,但 R1 有一大半的情况下触发不了。
    areless
        8
    areless  
       15 天前
    读 mem0 的源码就会发现大模型接口有一行 tools ,他有一个必须准确记录的 facts 的回参。他通过 function call 去问答大模型,格式参数为
    "function": {
    "name": "establish_relationships",
    "description": "Establish relationships among the entities based on the provided text.",
    "parameters": {
    "type": "object",
    "properties": {
    "entities": {
    "type": "array",
    "items": {
    "type": "object",
    "properties": {
    "source": {"type": "string", "description": "The source entity of the relationship."},
    "relationship": {
    "type": "string",
    "description": "The relationship between the source and destination entities.",
    },
    "destination": {
    "type": "string",
    "description": "The destination entity of the relationship.",
    },
    },
    "required": [
    "source",
    "relationship",
    "destination",
    ],
    "additionalProperties": False,
    },
    }
    },
    "required": ["entities"],
    "additionalProperties": False,
    },
    }
    结果除了官方自带的不能本地部署的 OPENAI LLM 以外,所有能本地部署的大模型( qwen\deepseeek\llama\gemma\phi\granite ,ollama 上所有带 TOOLS 的模型)要么不能输出,要么只输出了
    item:{***},type:{***}
    然后程序报错
    areless
        9
    areless  
       15 天前
    我不知道 mcp 跟 function call 有什么区别。我只想本地输出一个 JSON 去调取 function ,可是除了天气预报什么都做不到。还记得 2024 年的 Rabbit R1 吗?这跟 MCP 像不像,拍片展示效果一流。可是实际根本没人要。主要就是能不能做到精确,大部分本地部署 LLM 乱输出的,LLM 从构架上讲是有这能力的,但其中矛盾的部分就是输出输入的精确性。参多必难控,参少,随意调。这是程序员的法则。你有一亿参数怎么调呢?也只能自动化 chat 了。希望国内大部分 LLM 厂商 tools 能剥离一个高精度场景
    yinmin
        10
    yinmin  
       15 天前 via iPhone
    你的问法不对,正确的问题是:请使用 html 和 javascript 写单个 html 文件,输入毫秒级时间戳转成成 yyyy-MM-dd HH:mm:ss 的格式。

    然后运行生成的代码,输入秒数得到结果。

    你把 ai 理解成一个博士,只允许口算不能用计算器。
    xuejianxianzun
        11
    xuejianxianzun  
       15 天前
    确实,我问了 ChatGPT 和 Grok ,给出的结果也都是错的。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2724 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 14:37 · PVG 22:37 · LAX 07:37 · JFK 10:37
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.