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"

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

相关推荐
ZCXZ12385296a1 分钟前
YOLO13-C3k2-ConverseB改进:CCTV监控场景下车辆目标检测详解
人工智能·目标检测·目标跟踪
木非哲9 分钟前
AB实验高级必修课(二):从宏观叙事到微观侦查,透视方差分析与回归的本质
人工智能·数据挖掘·回归·abtest
玩电脑的辣条哥10 分钟前
幽灵回复AI已回复但前端不显示的排查与修复
前端·人工智能
冬奇Lab11 分钟前
团队宪法:CLAUDE.md 和rule使用技巧与复利模式
人工智能·ai编程
细节处有神明11 分钟前
开源数据之历史气象数据的获取与使用
人工智能·python·算法
cxr82818 分钟前
思维的相变:规模如何通过“结晶”重塑大语言模型的推理几何?
人工智能·语言模型·自然语言处理
【赫兹威客】浩哥19 分钟前
基于 YOLO 多版本模型的路面缺陷识别实践与分析
人工智能·计算机视觉·目标跟踪
SEO_juper21 分钟前
AI内容优化的2026实战路径:从策略、工具到案例
人工智能·ai·工具
无忧智库25 分钟前
全域未来乡村数字化建设与共富运营规划方案深度解读:打造数字乡村“中国样本“的完整方法论(PPT)
大数据·人工智能
紧固件研究社26 分钟前
2026第十六届上海紧固件专业展|洞察紧固件升级新方向
大数据·人工智能·制造·紧固件·上海紧固件展·上海紧固件专业展