gptinfo 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/tools.json +38 -0
- data/lib/gptinfo/parser.rb +8 -0
- data/lib/gptinfo/tool.rb +14 -0
- data/lib/gptinfo/version.rb +1 -1
- metadata +2 -3
- data/.vscode/settings.json +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b28ed9549631b8a0df9d9cd132b205e6de107f0f747c95cd207a18f9fb63cb5
|
4
|
+
data.tar.gz: 6284474c2b8da81b4f83687f205941f603be93b456f622697e12a2414ff119cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 530aba9454b57abe466e90866cea63e0eabe5aec3091db954a8cfac58f882ec91001ccea5a9ee70774bc7bdbf779eb4b89cf157be697bd54c3de6a6366fcf050
|
7
|
+
data.tar.gz: 6a6c2286e99cc0c5d151fbe327b5aceb1edb88614d84d949e56648c3ff23d2936866ed0f813aad7562b0a704dc5a8b382b6673ea01fad7ea385fe0b2b45cdc7f
|
data/data/tools.json
CHANGED
@@ -52,5 +52,43 @@
|
|
52
52
|
"type": "python",
|
53
53
|
"settings": null,
|
54
54
|
"metadata": null
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"id": "gzm_cnf_pxse1QlxHg1ZXxTI6Y6NhGWW~gzm_tool_yizxX5aZ6l9WKGWQ7Xo5KcAY",
|
58
|
+
"type": "plugins_prototype",
|
59
|
+
"settings": null,
|
60
|
+
"metadata": {
|
61
|
+
"action_id": "g-630f55526644a3e4d3fb64f56f9b004beac24526",
|
62
|
+
"domain": "www.eventbriteapi.com",
|
63
|
+
"raw_spec": "{\n \"openapi\": \"3.1.0\",\n \"info\": {\n \"title\": \"Eventbrite-like Event Creation API\",\n \"description\": \"API for creating 'Meet the Future' events with specific details.\",\n \"version\": \"v1.0.0\"\n },\n \"servers\": [\n {\n \"url\": \"https://www.eventbriteapi.com\"\n }\n ],\n \"paths\": {\n \"/v3/organizations/514868749047/events/\": {\n \"post\": {\n \"summary\": \"Create a 'Meet the Future' event\",\n \"description\": \"Creates a new 'Meet the Future' event with specific details and information.\",\n \"operationId\": \"createEvent\",\n \"requestBody\": {\n \"required\": true,\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/EventRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Event created successfully\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/EventResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid request, missing or incorrect event details\"\n },\n \"500\": {\n \"description\": \"Server error occurred while creating the event\"\n }\n }\n }\n }\n },\n \"components\": {\n \"schemas\": {\n \"EventRequest\": {\n \"type\": \"object\",\n \"properties\": {\n\n \"event\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"object\",\n \"properties\": {\n \"html\": {\n \"type\": \"string\",\n \"example\": \"Your Event Name Here in HTML format\"\n }\n },\n \"required\": [\"html\"]\n },\n \"summary\": {\n\n \"type\": \"string\",\n \"example\": \"Event Description in HTML format\"\n \n },\n\n \"start\": {\n \"type\": \"object\",\n \"properties\": {\n \"timezone\": {\n \"type\": \"string\",\n \"example\": \"Europe/Rome\"\n },\n \"utc\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2023-12-01T18:00:00Z\"\n }\n },\n \"required\": [\"timezone\", \"utc\"]\n },\n \"end\": {\n \"type\": \"object\",\n \"properties\": {\n \"timezone\": {\n \"type\": \"string\",\n \"example\": \"Europe/Rome\"\n },\n \"utc\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2023-12-01T21:00:00Z\"\n }\n },\n \"required\": [\"timezone\", \"utc\"]\n },\n \"currency\": {\n \"type\": \"string\",\n \"default\": \"EUR\"\n }\n}}\n },\n \"required\": [\"name\", \"start_time\", \"end_time\", \"summary\"]\n },\n \"EventResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"event_id\": {\n \"type\": \"string\",\n \"example\": \"1234567890\"\n },\n \"status\": {\n \"type\": \"string\",\n \"example\": \"created\"\n },\n \"creation_time\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2023-05-05T19:30:00Z\"\n }\n }\n }\n }\n }\n}\n",
|
64
|
+
"json_schema": null,
|
65
|
+
"auth": {
|
66
|
+
"type": "service_http",
|
67
|
+
"instructions": "",
|
68
|
+
"authorization_type": "bearer",
|
69
|
+
"verification_tokens": {},
|
70
|
+
"custom_auth_header": ""
|
71
|
+
},
|
72
|
+
"privacy_policy_url": "https://www.eventbrite.com/help/en-us/articles/460838/eventbrite-privacy-policy/"
|
73
|
+
}
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"id": "gzm_cnf_pxse1QlxHg1ZXxTI6Y6NhGWW~gzm_tool_VxYXY18Cb4XB4wXBN70feYJP",
|
77
|
+
"type": "plugins_prototype",
|
78
|
+
"settings": null,
|
79
|
+
"metadata": {
|
80
|
+
"action_id": "g-e574776c80636be947f8f881094dc928f000ac6f",
|
81
|
+
"domain": "leadthefuturetech.wpcomstaging.com",
|
82
|
+
"raw_spec": "{\n \"openapi\": \"3.1.0\",\n \"info\": {\n \"title\": \"WooCommerce Coupon API\",\n \"description\": \"API for creating WooCommerce coupons with specific requirements.\",\n \"version\": \"v1.0.0\"\n },\n \"servers\": [\n {\n \"url\": \"https://leadthefuturetech.wpcomstaging.com\"\n }\n ],\n \"paths\": {\n \"/wp-json/myapi/v1/create-coupon/\": {\n \"post\": {\n \"summary\": \"Create a WooCommerce coupon\",\n \"description\": \"Creates a new coupon with specific attributes and restrictions.\",\n \"operationId\": \"createCoupon\",\n \"requestBody\": {\n \"required\": true,\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CouponRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Successful response\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CouponResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid request\"\n },\n \"500\": {\n \"description\": \"Server error\"\n }\n }\n }\n }\n },\n \"components\": {\n \"schemas\": {\n \"CouponRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"amount\": {\n \"type\": \"number\",\n \"format\": \"float\",\n \"example\": 30\n },\n \"email\": {\n \"type\": \"string\",\n \"format\": \"email\",\n \"example\": \"specificemail@example.com\"\n }\n },\n \"required\": [\n \"email\"\n ]\n },\n \"CouponResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"coupon_code\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n}",
|
83
|
+
"json_schema": null,
|
84
|
+
"auth": {
|
85
|
+
"type": "service_http",
|
86
|
+
"instructions": "",
|
87
|
+
"authorization_type": "bearer",
|
88
|
+
"verification_tokens": {},
|
89
|
+
"custom_auth_header": ""
|
90
|
+
},
|
91
|
+
"privacy_policy_url": "https://leadthefuturetech.wpcomstaging.com/"
|
92
|
+
}
|
55
93
|
}
|
56
94
|
]
|
data/lib/gptinfo/parser.rb
CHANGED
@@ -20,6 +20,10 @@ module Gptinfo
|
|
20
20
|
@tools ||= get('tools').map{|item| Tool.new(item) }
|
21
21
|
end
|
22
22
|
|
23
|
+
def plugins_prototypes
|
24
|
+
@tools.filter { |tool| tool.type == 'plugins_prototype' } unless @tools.empty?
|
25
|
+
end
|
26
|
+
|
23
27
|
def files
|
24
28
|
@files ||= get('files').map{|item| File.new(item) }
|
25
29
|
end
|
@@ -40,6 +44,10 @@ module Gptinfo
|
|
40
44
|
@capabilities ||= tool_types.map{|type| type.values[0] }
|
41
45
|
end
|
42
46
|
|
47
|
+
def has_plugin?
|
48
|
+
@capabilities.include?("Plugin")
|
49
|
+
end
|
50
|
+
|
43
51
|
def file_types
|
44
52
|
@file_types ||= files.map{|f| f.type }.uniq
|
45
53
|
end
|
data/lib/gptinfo/tool.rb
CHANGED
@@ -26,9 +26,23 @@ module Gptinfo
|
|
26
26
|
'DALL·E Image Generation'
|
27
27
|
when 'browser'
|
28
28
|
'Web Browsing'
|
29
|
+
when 'plugins_prototype'
|
30
|
+
'Plugin'
|
29
31
|
end
|
30
32
|
end
|
31
33
|
|
34
|
+
def plugin?
|
35
|
+
type == 'plugins_prototype'
|
36
|
+
end
|
37
|
+
|
38
|
+
def domain
|
39
|
+
metadata['domain'] unless metadata.empty?
|
40
|
+
end
|
41
|
+
|
42
|
+
def raw_spec
|
43
|
+
JSON.parse(metadata['raw_spec']) unless metadata.empty?
|
44
|
+
end
|
45
|
+
|
32
46
|
private
|
33
47
|
|
34
48
|
def get(keys)
|
data/lib/gptinfo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gptinfo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sead Feng
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: GPT Info Parser
|
14
14
|
email:
|
@@ -18,7 +18,6 @@ extensions: []
|
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
20
|
- ".rspec"
|
21
|
-
- ".vscode/settings.json"
|
22
21
|
- CHANGELOG.md
|
23
22
|
- CODE_OF_CONDUCT.md
|
24
23
|
- LICENSE.txt
|
data/.vscode/settings.json
DELETED