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"

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

相关推荐
空中湖6 小时前
Spring AI Agent 编排:ReAct 模式 + 多 Agent 协作实战
人工智能·spring·react.js
only-qi6 小时前
RAG 工作机制详解:构建高质量知识库的技术全流程
网络·人工智能·rag
John_ToDebug6 小时前
Git Stash 完全指南:临时保存工作区的艺术
人工智能·git·agent
feibaoqq6 小时前
Atlas边端板卡AI识别:部署方法、技术实现、优劣及应用场景
人工智能·低空经济·低空安防
小保CPP6 小时前
OpenCV C++将多张图像合并为webp动图
c++·人工智能·opencv·计算机视觉
Xzaveir6 小时前
企业号码展示不可观测怎么办:状态机、拨测事件与异常回放
android·人工智能
FII工业富联科技服务6 小时前
从灯塔工厂到AI Factory新模式:AI正在重构制造业的四大核心能力
大数据·运维·人工智能·重构·ar·制造
前端开发江鸟6 小时前
从一个最小 Runtime Demo 看懂:陌生的 599 为什么不能重试
人工智能
AI小白Lin6 小时前
33 个 AI 专家全票通过?那问题才刚开始
人工智能·架构
Spey_Events6 小时前
【核心议题发布】聚焦深度维修与 AI 智慧革新!2026中国民用航空维修智造展——议题重磅发布!
大数据·人工智能