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的金融保险业务多模态问答assistant
人工智能
DBBH4 分钟前
DBBH的AI学习笔记
人工智能·笔记·学习
新科技事物4 分钟前
编曲常用软件哪个好,音乐人实测AI编曲软件优化体验
人工智能
天若有情6735 分钟前
省市聚力:软件产业的“中国土壤”与“创新脊梁”
大数据·人工智能·microsoft
Jerryhut14 分钟前
目标检测算法综述1
人工智能·目标检测·计算机视觉
GDAL15 分钟前
人工智能AI在书签篮分类中的应用落地
人工智能·分类·bert·书签篮·书签栏
OLOLOadsd12316 分钟前
自然景观分类与识别_YOLO11_C3k2_IDWC改进方法详解
人工智能·分类·数据挖掘
2501_9413297217 分钟前
棉田方向识别与分类_yolo11-seg-repvit实现_1
人工智能·分类·数据挖掘
Liue6123123118 分钟前
【深度学习】YOLO11-SlimNeck实现多种杂草植物叶片智能识别与分类系统,提升农业精准管理效率_2
人工智能·深度学习·分类
高洁0123 分钟前
知识图谱如何结合 RAG实现更精确的知识问答
人工智能·算法·机器学习·数据挖掘·知识图谱