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"

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

相关推荐
杨杨杨大侠3 小时前
RAG、记忆、上下文,这几个东西到底怎么串起来?
人工智能·agent
system_error_x4 小时前
MCP协议开发实战:从零搭建AI Agent工具链
人工智能
Sayai4 小时前
ComfyUI+混元视频实战:12G 显存跑 13G 模型,5 分钟出片(国产开源,附模型与工作流)
人工智能·aigc·音视频·comfyui·hunyuanvideo·混元视频
燧机科技SuiJi5 小时前
山体坍塌落石滑坡泥石流监测系统 落石泥石流监控摄像机
大数据·人工智能·深度学习·yolo
国科安芯5 小时前
立方星与微纳卫星综合电子微型化趋势下的抗辐射MCU选型综述
人工智能·单片机·嵌入式硬件·mcu·risc-v·抗辐射
诸神缄默不语5 小时前
小春学习日刊 2026年第4期:2026.10.16
人工智能
draracle5 小时前
为什么 AI 无法胜任系统架构
人工智能·系统架构
未来和明天6 小时前
iLeadE-3403边缘计算网关10.4 TOPS数据采集、视频接入与外设扩展等多元化应用需求
人工智能·边缘计算
youngfengying6 小时前
集成学习及置信度
人工智能·机器学习