Mistral Patent for “Code implemented tool calls”
Mistral Patent for “Code implemented tool calls”
Mistral 关于“代码实现工具调用”的专利
US 12,670,045 B1 Code implemented tool calls Gabriel Vergnaud, Paris (FR) Assigned to Mistral AI, Paris (FR) Filed by Mistral AI, Paris (FR) Filed on Mar. 4, 2026, as Appl. No. 19/557,103. Int. Cl. G06F 9/54 (2006.01) CPC G06F 9/547 (2013.01) 20 Claims
美国专利 US 12,670,045 B1,标题为“代码实现工具调用”(Code implemented tool calls)。发明人为 Gabriel Vergnaud(法国巴黎),受让人为 Mistral AI(法国巴黎),由 Mistral AI(法国巴黎)提交。申请日期为 2026 年 3 月 4 日,申请号为 19/557,103。国际分类号(Int. Cl.)为 G06F 9/54 (2006.01),CPC 分类号为 G06F 9/547 (2013.01),共包含 20 项权利要求。
1. A method, comprising: receiving, at a server, a user request for execution of one or more tool calls; generating, by a large language model (LLM), a code block in a programming language, the code block configured to encapsulate the one or more tool calls; executing, by the server, the code block in a sandbox; in response to obtaining a pending tool call, pausing execution of the code block; transmitting the pending tool call to a client for execution; receiving, from the client, a first result of the pending tool call; resuming execution of the code block and substituting the first result of the pending tool call for the pending tool call in the code block; and returning a second result of the executed code block to the LLM.
- 一种方法,包括:在服务器端接收用户执行一个或多个工具调用的请求;由大语言模型(LLM)生成一段编程语言代码块,该代码块被配置为封装所述一个或多个工具调用;由服务器在沙箱中执行该代码块;在获取到待处理的工具调用时,暂停代码块的执行;将待处理的工具调用传输至客户端进行执行;从客户端接收该待处理工具调用的第一结果;恢复代码块的执行,并将代码块中的待处理工具调用替换为该第一结果;以及将执行后的代码块的第二结果返回给大语言模型(LLM)。