解锁潜力:创建支持Actions接口调用的高级GPTs

如何创建带有Actions接口调用的GPTs

在本篇博客中,我们将介绍如何创建一个带有Actions接口调用的GPTs ,以及如何进行配置和使用。我们将以 https://chat.openai.com/g/g-GMrQhe7ka-gptssearch 为例,演示整个过程。

Ps: 数据来源:https://gpt-stores.com/

标题基本信息定义

首先,让我们为这个GPTs定义基本信息:

Name: GptsSearch

Description: 一个用于通过向量数据库查询匹配的GPTs的GPT。

Instructions:

  1. 通过API调用,根据用户提供的关键词来执行查询,以找到所需的GPTs。
  2. 在处理用户的问题之前,必要时优化用户的输入,以确保意图清晰明了。
  3. 通过接口检索与用户意图相关的GPTs列表,并将结果呈现给用户。
  4. 回复开头语: 在回复中始于以下陈述:"数据来源于 https://gpt-stores.com。"

标题添加 Actions

接下来,让我们讨论如何配置Actions。在这里,我们采用了调用第三方API的方法,与这个GPTs类似,它调用一个API来查询向量化后的GPTs信息。以下是具体的配置细节:
server :

请求方式:

get: 表示接口的请求方式是GET。

Parameter 配置:

根据你的接口的需求配置相应数量的参数。例如,这里我们配置了以下参数:

pageSize: 一次返回的项目数量,最多20个。

pageNum: 一次返回的页数,最小为1。

title: 用户搜索GPTs的关键词。

Response Definition:

主要定义了接口响应的格式。

Component Definition:

为Response 定义了一个对象。

通过上述配置,我们基本完成了Actions接口调用的配置。在使用过程中,GPTs将根据情况调用接口并传递相关参数。

以下是一个示例OpenAPI配置,用于描述GPTs Store Search API:

yaml 复制代码
# Taken from https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.0/petstore.yaml

openapi: "3.0.0"
info:
  version: 1.0.0
  title: GPTs Store Search API
  license:
    name: MIT
servers:
  - url: https://api-py.gpt-stores.com
paths:
  /extra_data_get:
    get:
      summary: List all gpts
      operationId: queryGPTs
      tags:
        - gpts
      parameters:
        - name: pageSize
          in: query
          description: How many items to return at one time (max 20)
          required: true
          schema:
            type: integer
            maximum: 20
            format: int32
        - name: pageNum
          in: query
          description: How many pageNum to return at one time  (min 1)
          required: true
          schema:
            type: integer
            maximum: 1
            format: int32
        - name: title
          in: query
          description: The keyword for user search the gpts
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A paged array of gpts
          headers:
            x-next:
              description: A link to the next page of responses
              schema:
                type: string
          content:
            application/json:    
              schema:
                $ref: "#/components/schemas/GPTs"
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
components:
  schemas:
    GPTs:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
        title:
          type: string
        post_name:
          type: string
        author:
          type: string
        author_link:
          type: string
        content:
          type: string
        download_link:
          type: string
        cdn_featured_image:
          type: string
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
相关推荐
齐杰拉18 小时前
源码精读:拆解 ChatGPT 打字机效果背后的数据流水线
前端·chatgpt
mit6.8242 天前
[code-review] 日志机制 | `LOG_LEVEL`
人工智能·chatgpt·代码复审
Orange_sparkle2 天前
解决Dify中接入xinference模型无法开关思考模式和使用function calling的问题
人工智能·深度学习·语言模型·chatgpt
gptplus2 天前
【重要通知】ChatGPT Plus将于9月16日调整全球充值定价,低价区将被弃用,开发者如何应对?
人工智能·gpt·chatgpt
跨境小新2 天前
ChatGPT大模型训练指南:如何借助动态代理IP提高训练效率
网络协议·tcp/ip·chatgpt
sinat_286945192 天前
Case-Based Reasoning用于RAG
人工智能·算法·chatgpt
陈敬雷-充电了么-CEO兼CTO2 天前
突破多模态极限!InstructBLIP携指令微调革新视觉语言模型,X-InstructBLIP实现跨模态推理新高度
人工智能·自然语言处理·chatgpt·blip·clip·多模态大模型·gpt-5
007tg2 天前
从ChatGPT家长控制功能看AI合规与技术应对策略
人工智能·chatgpt·企业数据安全
Memene摸鱼日报2 天前
「Memene 摸鱼日报 2025.9.11」腾讯推出命令行编程工具 CodeBuddy Code, ChatGPT 开发者模式迎来 MCP 全面支持
人工智能·chatgpt·agi
陈敬雷-充电了么-CEO兼CTO4 天前
视频理解新纪元!VideoChat双模架构突破视频对话瓶颈,开启多模态交互智能时代
人工智能·chatgpt·大模型·多模态·世界模型·kimi·deepseek