function call

函数调用示意图: [[_resources/function call/f77ae5f98f02fbbe52786da5845a4fb8_MD5.jpeg|Open: Pasted image 20250319193109.png]] ![[_resources/function call/f77ae5f98f02fbbe52786da5845a4fb8_MD5.jpeg]]

flowchart TD
    classDef process fill:#e6f3ff,stroke:#666,stroke-width:2px;
    classDef decision fill:#ffe6cc,stroke:#666,stroke-width:2px,shape:diamond;
    classDef tool fill:#e6ffe6,stroke:#666,stroke-width:2px,shape:parallelogram;
    classDef module fill:#f0f0f0,stroke:#999,stroke-width:1px;

    subgraph 用户端
        start[用户提问]:::process --> app[[问题解析]]
	    feedback[回复用户]
    end

    subgraph 程序控制
        toolinfo --> invoke[调用REST API]:::process
        toolResult --> app2[[结果整合]]:::process
    end

    subgraph 工具系统
        invoke --> weatherAPI[天气接口]
        weatherAPI --> toolResult[[JSON响应]]:::process
    end

    subgraph 大模型引擎
        mid1 -- 直接回复 -->feedback:::process
        mid1 -->|需工具| toolinfo[【天气查询】<br>参数: 地点]:::tool
        app -- 语义分析 --> mid1{需调用工具?<br>【第一次调用】}:::decision
        app2 -- 数据增强 --> answer2[生成最终回复<br>【第二次调用】]:::process
        answer2 --> feedback
    end

	
    style weatherAPI fill:#d4f7d4,stroke:#2d5f2d
    linkStyle 6 stroke:#666,stroke-width:1.5px;
使用 Hugo 构建
主题 StackJimmy 设计