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"

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

相关推荐
是店小二呀11 小时前
Doubao-Seed-Code 打造一个专属的规划平台
人工智能·aigc·doubao
幂律智能12 小时前
幂律智能入选“AI100应用标杆”,赋能产业发展新范式
人工智能·百度
咚咚王者13 小时前
人工智能之数据分析 numpy:第十章 副本视图
人工智能·数据分析·numpy
Dev7z13 小时前
让阅卷不再繁琐:图像识别与数据分析提升智能答题卡评分效率
人工智能·计算机视觉
咚咚王者13 小时前
人工智能之数据分析 numpy:第十一章 字符串与字节交换
人工智能·数据分析·numpy
数字孪生家族16 小时前
视频孪生与空间智能:重构数字时空认知,定义智能决策新范式
人工智能·重构·空间智能·视频孪生与空间智能
FL1717131416 小时前
Pytorch保存pt和pkl
人工智能·pytorch·python
jieshenai16 小时前
5090显卡,基于vllm完成大模型推理
人工智能·自然语言处理
逻极18 小时前
云智融合:AIGC与云计算服务新范式(深度解析)
人工智能·云计算·aigc·云服务