接上一贴
所有分享出来的插件我在librechat都测试使用过,nextchat里不保证可用性,nextchat对格式要求严格可能得自己微调格式,可能能用
因为水平太菜,半瓶子醋,所以api的认证我都写在了插件里,自己改一下
apikey,有能力的佬友可以优化一下,现在基本就是能跑就行
没有喂饭教程需要有一定的动手能力
需要配合prompt使用,让gpt去调用插件!!!
1、邮件发送
源于临时邮箱|:
openapi: 3.0.0
info:
title: Temp Email API
version: 1.0.0
description: 这是一个用于发送电子邮件的API,与临时电子邮件服务集成。该API非常适合需要发送一次性验证邮件或其他临时通讯的应用场景。
servers:
- url: {修改成你的临时邮箱后端地址}
paths:
/external/api/send_mail:
post:
operationId: Sendmail
summary: Send an email
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
token:
type: string
description: can be `{改成你的邮箱地址凭证}`
from_name:
type: string
description: Sender's name
to_name:
type: string
description: Recipient's name
to_mail:
type: string
description: Recipient's email address
subject:
type: string
description: Email subject
is_html:
type: boolean
description: Indicates whether the content is in HTML format
content:
type: string
description: Email content
required:
- from_name
- to_name
- to_mail
- subject
- is_html
- content
parameters:
- name: x-custom-auth
in: header
required: true
schema:
type: string
description: can be `{如果有网页密码,就自己改掉,没有就把这一整块删掉}`
responses:
'200':
description: Email sent successfully
security:
- bearerAuth: []
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
示意图:
2、天气查询插件
API来着于高德:
openapi: 3.0.0
info:
title: 高德API
version: 1.0.0
description: 高德api是一个集合了多种功能的api合集
servers:
- url: https://restapi.amap.com/v3
paths:
/geocode/geo:
get:
summary: Geocode an Address
description: 将结构化地址转换为地理坐标。
parameters:
- name: key
in: query
required: true
schema:
type: string
description: must be {改成你的apikey}
- name: address
in: query
required: true
schema:
type: string
description: 结构化地址信息,规则遵循:国家、省份、城市、区县、城镇、乡村、街道、门牌号码、屋邨、大厦,如:北京市朝阳区阜通东大街6号。如果没有详细地址那就只写城市
- name: city
in: query
required: false
schema:
type: string
description: 该城市缩小了搜索范围。
- name: sig
in: query
required: false
schema:
type: string
description: 用于身份验证的数字签名。
- name: output
in: query
required: false
schema:
type: string
enum: [JSON, XML]
default: JSON
description: Response data format (JSON or XML).
- name: callback
in: query
required: false
schema:
type: string
description: 回调函数名称,仅在输出为JSON时有效。
responses:
'200':
description: Geocoding results
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: Status of the request (0 for failure, 1 for success).
count:
type: integer
description: Number of results returned.
info:
type: string
description: Information about the request status.
geocodes:
type: array
items:
type: object
properties:
country:
type: string
description: Country of the address.
province:
type: string
description: Province of the address.
city:
type: string
description: City of the address.
citycode:
type: string
description: City code of the address.
district:
type: string
description: District of the address.
street:
type: string
description: Street name of the address.
number:
type: string
description: House number of the address.
adcode:
type: string
description: Area code of the address.
location:
type: string
description: Coordinates (longitude, latitude).
level:
type: string
description: Matching level of the geocoding result.
/weather/weatherInfo:
get:
summary: Retrieve weather information
parameters:
- name: key
in: query
required: true
schema:
type: string
description: Must be {改成你的apikey}
- name: city
in: query
required: true
schema:
type: string
description: City code based on adcode
- name: extensions
in: query
required: false
schema:
type: string
enum: [base, all]
description: Weather data type, base for live weather, all for forecast
- name: output
in: query
required: false
schema:
type: string
enum: [JSON, XML]
description: Response format, JSON or XML
responses:
'200':
description: Weather information retrieved successfully
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: Return status, 1 for success, 0 for failure
count:
type: string
description: Total number of results
info:
type: string
description: Status information
infocode:
type: string
description: Status code, 10000 for success
lives:
type: array
items:
type: object
properties:
province:
type: string
description: Province name
city:
type: string
description: City name
adcode:
type: string
description: Area code
weather:
type: string
description: Weather description
temperature:
type: string
description: Current temperature in Celsius
winddirection:
type: string
description: Wind direction description
windpower:
type: string
description: Wind power level
humidity:
type: string
description: Air humidity
reporttime:
type: string
description: Data release time
forecast:
type: array
items:
type: object
properties:
city:
type: string
description: City name
adcode:
type: string
description: City code
province:
type: string
description: Province name
reporttime:
type: string
description: Forecast release time
casts:
type: array
items:
type: object
properties:
date:
type: string
description: Date
week:
type: string
description: Day of the week
dayweather:
type: string
description: Daytime weather
nightweather:
type: string
description: Nighttime weather
daytemp:
type: string
description: Daytime temperature
nighttemp:
type: string
description: Nighttime temperature
daywind:
type: string
description: Daytime wind direction
nightwind:
type: string
description: Nighttime wind direction
daypower:
type: string
description: Daytime wind power
nightpower:
type: string
description: Nighttime wind power
security: []
components:
schemas:
WeatherInfo:
type: object
properties:
status:
type: string
count:
type: string
info:
type: string
infocode:
type: string
lives:
type: array
items:
$ref: '#/components/schemas/LiveWeather'
forecast:
type: array
items:
$ref: '#/components/schemas/ForecastWeather'
LiveWeather:
type: object
properties:
province:
type: string
city:
type: string
adcode:
type: string
weather:
type: string
temperature:
type: string
winddirection:
type: string
windpower:
type: string
humidity:
type: string
reporttime:
type: string
ForecastWeather:
type: object
properties:
city:
type: string
adcode:
type: string
province:
type: string
reporttime:
type: string
casts:
type: array
items:
$ref: '#/components/schemas/CastWeather'
CastWeather:
type: object
properties:
date:
type: string
week:
type: string
dayweather:
type: string
nightweather:
type: string
daytemp:
type: string
nighttemp:
type: string
daywind:
type: string
nightwind:
type: string
daypower:
type: string
nightpower:
type: string
3、 高铁路线规划
API来着于高德:
{
"openapi": "3.1.0",
"info": {
"title": "高德地图API",
"description": "高德地图API是一个优质的聚合api提供平台,提供量多种api可供调用,比如公共交通路线规划API(火车、公交、地铁)。",
"version": "1.0.0"
},
"servers": [
{
"url": "https://restapi.amap.com/v3"
}
],
"paths": {
"/direction/transit/integrated": {
"get": {
"summary": "规划一条交通路线",
"description": "规划一条交通路线",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string",
"description": "Must be {改成你的apikey}"
}
},
{
"name": "origin",
"in": "query",
"required": true,
"schema": {
"type": "string",
"description": "Start point in longitude, latitude format"
}
},
{
"name": "destination",
"in": "query",
"required": true,
"schema": {
"type": "string",
"description": "End point in longitude, latitude format"
}
},
{
"name": "city",
"in": "query",
"required": true,
"schema": {
"type": "string",
"description": "Start city name or city code"
}
},
{
"name": "cityd",
"in": "query",
"required": false,
"schema": {
"type": "string",
"description": "Destination city name or city code for inter-city transit"
}
},
{
"name": "extensions",
"in": "query",
"required": false,
"schema": {
"type": "string",
"default": "base",
"enum": ["base", "all"],
"description": "Return result details (base/all)"
}
},
{
"name": "strategy",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"description": "Transit strategy (0: Fastest, 1: Cheapest, etc.default: 0)"
}
},
{
"name": "nightflag",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"description": "Calculate night buses (0: No, 1: Yes,default: 0)"
}
},
{
"name": "date",
"in": "query",
"required": false,
"schema": {
"type": "string",
"description": "Departure date (format: yyyy-mm-dd)"
}
},
{
"name": "time",
"in": "query",
"required": false,
"schema": {
"type": "string",
"description": "Departure time (format: HH:mm)"
}
},
{
"name": "sig",
"in": "query",
"required": false,
"schema": {
"type": "string",
"description": "Digital signature"
}
},
{
"name": "output",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": ["JSON", "XML"],
"default": "JSON",
"description": "Output format (JSON/XML)"
}
},
{
"name": "callback",
"in": "query",
"required": false,
"schema": {
"type": "string",
"description": "JSONP callback function name"
}
}
],
"responses": {
"200": {
"description": "Successful response with transit plan details",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "火车换乘信息列表",
"properties": {
"id": {
"type": "string",
"description": "线路 id 编号"
},
"time": {
"type": "string",
"description": "该线路车段耗时"
},
"name": {
"type": "string",
"description": "线路名称"
},
"trip": {
"type": "string",
"description": "线路车次号"
},
"distance": {
"type": "number",
"description": "该 item 换乘段的行车总距离"
},
"type": {
"type": "string",
"description": "线路车次类型,参考如下:2010:普客火车,2011:G字头的高铁火车,2012:D字头的动车火车,2013:C字头的城际火车,2014:Z字头的直达特快火车,2015:T字头的特快火车,2016:K字头的快车火车,2017:L字头,Y字头的临时火车,2018:S字头的郊区线火车"
},
"departure_stop": {
"type": "object",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "上车站点 ID"
},
"name": {
"type": "string",
"description": "上车站点名称"
},
"location": {
"type": "string",
"description": "上车站点经纬度"
},
"adcode": {
"type": "string",
"description": "上车站点所在城市的 adcode"
},
"time": {
"type": "string",
"description": "上车点发车时间"
},
"start": {
"type": "string",
"description": "是否始发站,1表示为始发站,0表示非始发站"
}
}
}
},
"arrival_stop": {
"type": "object",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "下车站点 ID"
},
"name": {
"type": "string",
"description": "下车站点名称"
},
"location": {
"type": "string",
"description": "下车站点经纬度"
},
"adcode": {
"type": "string",
"description": "下车站点所在城市的 adcode"
},
"time": {
"type": "string",
"description": "到站时间,如大于24:00,则表示跨天"
},
"end": {
"type": "string",
"description": "是否为终点站,1表示为终点站,0表示非终点站"
}
}
}
},
"via_stop": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "途径站点的名称"
},
"id": {
"type": "string",
"description": "途径站点的 ID"
},
"location": {
"type": "string",
"description": "途径站点的坐标点"
},
"time": {
"type": "string",
"description": "途径站点的进站时间,如大于24:00,则表示跨天"
},
"wait": {
"type": "string",
"description": "途径站点的停靠时间,单位:分钟"
}
}
}
},
"alters": {
"type": "array",
"items": {
"type": "object",
"description": "",
"properties": {
"id": {
"type": "string",
"description": "备选方案 ID"
},
"name": {
"type": "string",
"description": "备选线路名称"
}
}
}
},
"spaces": {
"type": "array",
"items": {
"type": "object",
"description": "",
"properties": {
"code": {
"type": "string",
"description": "火车的仓位编号,具体可以参照下面内容:0:不分仓位级别,9:特等座,10:火车硬座,11:火车软座,12:火车软座1等座,13:火车软座2等座,14:火车硬卧上铺,15:火车硬卧中铺,16:火车硬卧下铺,17:火车软卧上铺,18:火车软卧下铺,19:火车高级软卧上铺,20:火车高级软卧下铺,21:火车商务座,22:长途汽车座席,23:长途汽车卧席上铺,24:长途汽车卧席中铺,25:长途汽车卧席下铺,30:飞机经济舱,31:飞机商务舱,40:客轮经济舱,41:客轮3等舱,42:客轮2等舱,43:客轮豪华舱"
},
"cost": {
"type": "number",
"description": "仓位费用"
}
}
}
}
}
}
}
}
}
}
}
},
"/geocode/geo": {
"get": {
"summary": "Geocode an Address",
"description": "将结构化地址转换为地理坐标。",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string",
"description": "Must be {改成你的apikey}"
}
},
{
"name": "address",
"in": "query",
"required": true,
"schema": {
"type": "string",
"description": "结构化地址信息,规则遵循:国家、省份、城市、区县、城镇、乡村、街道、门牌号码、屋邨、大厦,如:北京市朝阳区阜通东大街6号。如果没有详细地址那就只写城市"
}
},
{
"name": "city",
"in": "query",
"required": false,
"schema": {
"type": "string",
"description": "该城市缩小了搜索范围。"
}
},
{
"name": "sig",
"in": "query",
"required": false,
"schema": {
"type": "string",
"description": "用于身份验证的数字签名。"
}
},
{
"name": "output",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": ["JSON", "XML"],
"default": "JSON",
"description": "Response data format (JSON or XML)."
}
},
{
"name": "callback",
"in": "query",
"required": false,
"schema": {
"type": "string",
"description": "回调函数名称,仅在输出为JSON时有效。"
}
}
],
"responses": {
"200": {
"description": "Geocoding results",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "Status of the request (0 for failure, 1 for success)."
},
"count": {
"type": "integer",
"description": "Number of results returned."
},
"info": {
"type": "string",
"description": "Information about the request status."
},
"geocodes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"country": {
"type": "string",
"description": "Country of the address."
},
"province": {
"type": "string",
"description": "Province of the address."
},
"city": {
"type": "string",
"description": "City of the address."
},
"citycode": {
"type": "string",
"description": "City code of the address."
},
"district": {
"type": "string",
"description": "District of the address."
},
"street": {
"type": "string",
"description": "Street name of the address."
},
"number": {
"type": "string",
"description": "House number of the address."
},
"adcode": {
"type": "string",
"description": "Area code of the address."
},
"location": {
"type": "string",
"description": "Coordinates (longitude, latitude)."
},
"level": {
"type": "string",
"description": "Matching level of the geocoding result."
}
}
}
}
}
}
}
}
}
}
}
}
}
}
4、时间获取
功能用于获取时间:
接口来自时间接口
openapi: 3.1.1
info:
title: Time API
version: 1.0.0
description: When the system needs to address topics related to the current time, this API can be used to obtain accurate time and date information.Instructions:Both id and key must be "88888888".The type must be 2.
servers:
- url: https://cn.apihz.cn
paths:
/api/time/getapi.php:
get:
operationId: getTime
summary: Retrieve time information
parameters:
- name: id
in: query
required: true
schema:
type: integer
description: It has to be "88888888
- name: key
in: query
required: true
schema:
type: integer
description: It has to be "88888888
- name: type
in: query
required: true
schema:
type: integer
description: can be '2'
responses:
'200':
description: Time information retrieved successfully
content:
application/json:
schema:
type: object
properties:
time:
type: string
description: The requested time information
security: []