3接上篇 我的自定义GPTs的改进优化 与物理世界连接成功 GPTs的创建与使用定义和执行特定任务的功能模块 通过API与外部系统或服务的交互

https://blog.csdn.net/chenhao0568/article/details/134875067?spm=1001.2014.3001.5502

从服务器日志里看到请求多了一个"location="

bash 复制代码
23.102.140.123 - - [08/Dec/2023:14:02:20 +0800] "GET /getWeather.php?location=&location=New+York HTTP/1.1" 200 337 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; ChatGPT-User/1.0; +https://openai.com/bot"
65.154.226.167 - - [08/Dec/2023:14:06:31 +0800] "GET / HTTP/1.1" 403 548 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.5938.132 Safari/537.36"
23.102.140.117 - - [08/Dec/2023:14:19:14 +0800] "GET /getWeather.php?location=&location=Beijing HTTP/1.1" 200 336 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; ChatGPT-User/1.0; +https://openai.com/bot"

修改Schema

bash 复制代码
{
  "openapi": "3.1.0",
  "info": {
    "title": "Get weather data",
    "description": "Retrieves current weather data for a location.",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://3.wjsou.com"
    }
  ],
  "paths": {
    "/getWeather.php": {
      "get": {
        "description": "Get temperature for a specific location",
        "operationId": "GetCurrentWeather",
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "description": "The city and state to retrieve the weather for",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {}
  }
}

再看服务器日志请求就对了。

bash 复制代码
23.102.140.117 - - [08/Dec/2023:14:37:32 +0800] "GET /getWeather.php?location=New+York HTTP/1.1" 200 337 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; ChatGPT-User/1.0; +https://openai.com/bot"

首次输入英文后,后面输入中文北京也能理解了。

相关推荐
智圣新创011 分钟前
高校共生型学生社区生态圈搭建 核心路径与效能升级高频实操答疑
大数据·人工智能
table study13 分钟前
LzzCad:一款开源的 AI + CAD/CAM 软件
人工智能
rain_sxr14 分钟前
浏览器跑大模型:WebGPU 端侧推理的加载、回退与性能工程
人工智能
薛定e的猫咪17 分钟前
Codex全套科研技能汇总
人工智能·深度学习
码农学院28 分钟前
跨平台AI搜索优化的统一策略与引擎差异适配方法
人工智能
赫文派42 分钟前
K3 与 Kimi Code 实战:模型到终端 Agent
人工智能·ai编程
z12345677791 小时前
2026年企业AI办公工具深度评测:钉钉悟空平替横向选型指南
人工智能·钉钉
网易云信1 小时前
网易智企入选《2026人工智能发展白皮书》,帝王蟹引领“智能增效”场景
人工智能·agent
老兵发新帖1 小时前
Transformer最新小样本学习能力分析
人工智能
阿虎儿1 小时前
Dify Failed to invoke tool: Aborted: Maximum execution steps exceeded: 501 > 500
人工智能