shiro 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +95 -11
- data/lib/shiro/client.rb +8 -0
- data/lib/shiro/deployment.rb +7 -1
- data/lib/shiro/generate_completion.rb +23 -0
- data/lib/shiro/me.rb +21 -0
- data/lib/shiro/prompt.rb +19 -0
- data/lib/shiro/version.rb +1 -1
- data/lib/shiro.rb +4 -1
- data/test/deployment_test.rb +12 -9
- data/test/generate_completion_test.rb +18 -0
- data/test/me_test.rb +18 -0
- data/test/prompt_test.rb +24 -0
- data/test/test_helper.rb +6 -0
- data/test/vcr_cassettes/deployment_retrieve.yml +8 -128
- data/test/vcr_cassettes/deployment_update.yml +67 -0
- data/test/vcr_cassettes/deployments_list.yml +7 -7
- data/test/vcr_cassettes/generate_completion_create.yml +68 -0
- data/test/vcr_cassettes/me_delete.yml +53 -0
- data/test/vcr_cassettes/me_retrieve.yml +119 -0
- data/test/vcr_cassettes/prompt_retrieve.yml +67 -0
- data/test/vcr_cassettes/prompts_list.yml +75 -0
- metadata +14 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21a6f05dddc41d4f36a795d0903dae119f30462e146aa2af7c94493b33150140
|
4
|
+
data.tar.gz: 59bc2c1218890363a96d140cc377b08d5498e37b29b8132bebed4b331ce89074
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2afd817c73c752788847b60608f2a14d9c5640cd6f3fa480bec2543e8e4ee703ca2e80d4f956b81afedef8078c933147e5ea4b7df938810980052de97d97928a
|
7
|
+
data.tar.gz: df0eeabce7ad42f8733591b405d6c53f43853e7eee301613aa3a3292ac21180f0ef41bf7185624b1f6039961b18845e2d3af4e32c058f766b34d9dc9310134ae
|
data/README.md
CHANGED
@@ -1,27 +1,111 @@
|
|
1
|
-
|
1
|
+
# Shiro Ruby Library
|
2
2
|
|
3
|
-
|
3
|
+
This is the official [Shiro API](https://openshiro.com/api/v1/docs) Ruby library gem maintained by [OpenShiro](https://openshiro.com). The Shiro Ruby library provides convenient access to the Stripe API from applications written in the Ruby language.
|
4
4
|
|
5
|
-
|
5
|
+
## Documentation
|
6
|
+
|
7
|
+
See the [API docs](https://openshiro.com/api/v1/docs) and also this post on [Getting Started with the Shiro API](https://openshiro.com/docs/getting-started-with-the-shiro-api).
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
To install the gem:
|
12
|
+
|
13
|
+
```
|
14
|
+
gem install shiro
|
15
|
+
```
|
16
|
+
|
17
|
+
Include it in your Rails gemfile with:
|
18
|
+
|
19
|
+
```
|
20
|
+
bundle add shiro
|
21
|
+
```
|
6
22
|
|
7
23
|
or directly in the gemfile:
|
8
24
|
|
9
|
-
|
25
|
+
```
|
26
|
+
gem "shiro", "~> 0.1.1"
|
27
|
+
```
|
10
28
|
|
11
|
-
|
29
|
+
## Usage
|
12
30
|
|
13
|
-
|
31
|
+
The library needs to be configured with your account's api key which is available in your Shiro account under API Keys.
|
32
|
+
|
33
|
+
```ruby
|
14
34
|
require "shiro"
|
15
35
|
|
16
36
|
Shiro.configure do |config|
|
17
37
|
config[:api_key] = "your_api_key..."
|
18
38
|
end
|
39
|
+
```
|
40
|
+
|
41
|
+
### Deployment Actions
|
19
42
|
|
20
|
-
|
43
|
+
**List deployments**
|
44
|
+
|
45
|
+
```ruby
|
21
46
|
deployments = Shiro::Deployment.list
|
22
|
-
|
47
|
+
```
|
48
|
+
|
49
|
+
**Retrieve a single deployment**
|
23
50
|
|
24
|
-
|
51
|
+
```ruby
|
25
52
|
deployment = Shiro::Deployment.retrieve("dpmt_lWokJnPAwQCeV2ZWovjG7BNr")
|
26
|
-
|
27
|
-
|
53
|
+
```
|
54
|
+
|
55
|
+
**Update a deployment**
|
56
|
+
|
57
|
+
```ruby
|
58
|
+
updated_deployment = Shiro::Deployment.update("dpmt_lWokJnPAwQCeV2ZWovjG7BNr", { name: "New Deployment Name" })
|
59
|
+
```
|
60
|
+
|
61
|
+
### Generating Completions
|
62
|
+
|
63
|
+
**Generate a completion for a deployment**
|
64
|
+
|
65
|
+
```ruby
|
66
|
+
content = Shiro::GenerateCompletion.create("dpmt_lWokJnPAwQCeV2ZWovjG7BNr",
|
67
|
+
environment: "PRODUCTION",
|
68
|
+
prompt_id: "prmt_WnAlbE5lEMtxAG2Qly6jo2dV", # optional
|
69
|
+
input_variables: { "key": "value" }
|
70
|
+
)
|
71
|
+
```
|
72
|
+
|
73
|
+
### User Account Actions
|
74
|
+
|
75
|
+
**Retrieve current user's details**
|
76
|
+
|
77
|
+
```ruby
|
78
|
+
current_user = Shiro::Me.retrieve
|
79
|
+
```
|
80
|
+
|
81
|
+
**Delete current user's account**
|
82
|
+
|
83
|
+
```ruby
|
84
|
+
response = Shiro::Me.destroy
|
85
|
+
```
|
86
|
+
|
87
|
+
### Prompt Actions
|
88
|
+
|
89
|
+
**List prompts**
|
90
|
+
|
91
|
+
```ruby
|
92
|
+
prompts = Shiro::Prompt.list
|
93
|
+
```
|
94
|
+
|
95
|
+
**Retrieve a single prompt**
|
96
|
+
|
97
|
+
```ruby
|
98
|
+
prompt = Shiro::Prompt.retrieve("prmt_WnAlbE5lEMtxAG2Qly6jo2dV")
|
99
|
+
```
|
100
|
+
|
101
|
+
## Support
|
102
|
+
|
103
|
+
New features and bug fixes are released on the latest major version of the Shiro Python library. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.
|
104
|
+
|
105
|
+
## Development
|
106
|
+
|
107
|
+
Run the tests:
|
108
|
+
|
109
|
+
```
|
110
|
+
rake test
|
111
|
+
```
|
data/lib/shiro/client.rb
CHANGED
@@ -18,6 +18,14 @@ module Shiro
|
|
18
18
|
self.class.post(path, body: body.to_json, headers: auth_header.merge("Content-Type" => "application/json"))
|
19
19
|
end
|
20
20
|
|
21
|
+
def patch(path, body = {})
|
22
|
+
self.class.patch(path, body: body.to_json, headers: auth_header.merge("Content-Type" => "application/json"))
|
23
|
+
end
|
24
|
+
|
25
|
+
def delete(path)
|
26
|
+
self.class.delete(path, headers: auth_header)
|
27
|
+
end
|
28
|
+
|
21
29
|
private
|
22
30
|
|
23
31
|
def auth_header
|
data/lib/shiro/deployment.rb
CHANGED
@@ -8,10 +8,16 @@ module Shiro
|
|
8
8
|
client.get("/deployments/#{id}").parsed_response
|
9
9
|
end
|
10
10
|
|
11
|
-
|
11
|
+
def self.update(id, attributes)
|
12
|
+
client.patch("/deployments/#{id}", attributes).parsed_response
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
12
16
|
|
13
17
|
def self.client
|
14
18
|
@client ||= Client.new
|
15
19
|
end
|
20
|
+
|
21
|
+
private_class_method :client
|
16
22
|
end
|
17
23
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Shiro
|
2
|
+
class GenerateCompletion
|
3
|
+
def self.create(deployment_id, options = {})
|
4
|
+
body = {
|
5
|
+
deployment_id: deployment_id,
|
6
|
+
environment: options[:environment],
|
7
|
+
prompt_id: options[:prompt_id],
|
8
|
+
input_variables: options[:input_variables]
|
9
|
+
}.compact
|
10
|
+
|
11
|
+
response = client.post("/generate_completion", body)
|
12
|
+
response.parsed_response
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def self.client
|
18
|
+
@client ||= Client.new
|
19
|
+
end
|
20
|
+
|
21
|
+
private_class_method :client
|
22
|
+
end
|
23
|
+
end
|
data/lib/shiro/me.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
module Shiro
|
2
|
+
class Me
|
3
|
+
def self.retrieve
|
4
|
+
response = client.get("/me")
|
5
|
+
response.parsed_response
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.delete
|
9
|
+
response = client.delete("/me")
|
10
|
+
response.parsed_response
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def self.client
|
16
|
+
@client ||= Client.new
|
17
|
+
end
|
18
|
+
|
19
|
+
private_class_method :client
|
20
|
+
end
|
21
|
+
end
|
data/lib/shiro/prompt.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
module Shiro
|
2
|
+
class Prompt
|
3
|
+
def self.list
|
4
|
+
client.get("/prompts").parsed_response
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.retrieve(id)
|
8
|
+
client.get("/prompts/#{id}").parsed_response
|
9
|
+
end
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def self.client
|
14
|
+
@client ||= Client.new
|
15
|
+
end
|
16
|
+
|
17
|
+
private_class_method :client
|
18
|
+
end
|
19
|
+
end
|
data/lib/shiro/version.rb
CHANGED
data/lib/shiro.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
require "net/http"
|
2
2
|
require "json"
|
3
3
|
require "uri"
|
4
|
+
require "shiro/version"
|
4
5
|
require "shiro/client"
|
5
6
|
require "shiro/deployment"
|
6
|
-
require "shiro/
|
7
|
+
require "shiro/prompt"
|
8
|
+
require "shiro/generate_completion"
|
9
|
+
require "shiro/me"
|
7
10
|
|
8
11
|
module Shiro
|
9
12
|
@config = {api_key: nil}
|
data/test/deployment_test.rb
CHANGED
@@ -2,12 +2,6 @@ require "test_helper"
|
|
2
2
|
require "shiro"
|
3
3
|
|
4
4
|
class DeploymentTest < Minitest::Test
|
5
|
-
def setup
|
6
|
-
Shiro.configure do |config|
|
7
|
-
config[:api_key] = ENV["SHIRO_API_KEY"]
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
5
|
def test_list_deployments
|
12
6
|
VCR.use_cassette("deployments_list") do
|
13
7
|
response = Shiro::Deployment.list
|
@@ -19,12 +13,21 @@ class DeploymentTest < Minitest::Test
|
|
19
13
|
|
20
14
|
def test_retrieve_deployment
|
21
15
|
VCR.use_cassette("deployment_retrieve") do
|
22
|
-
|
23
|
-
response = Shiro::Deployment.retrieve(deployment_id)
|
16
|
+
response = Shiro::Deployment.retrieve(ENV['SHIRO_DEPLOYMENT_ID'])
|
24
17
|
|
25
|
-
assert_equal
|
18
|
+
assert_equal ENV['SHIRO_DEPLOYMENT_ID'], response["id"]
|
26
19
|
assert response.key?("name")
|
27
20
|
assert response.key?("environment_type")
|
28
21
|
end
|
29
22
|
end
|
23
|
+
|
24
|
+
def test_update_deployment_name
|
25
|
+
VCR.use_cassette("deployment_update") do
|
26
|
+
new_name = "Updated Deployment Name"
|
27
|
+
|
28
|
+
response = Shiro::Deployment.update(ENV['SHIRO_DEPLOYMENT_ID'], {name: new_name})
|
29
|
+
|
30
|
+
assert_equal new_name, response["name"], "Expected the deployment's name to be updated"
|
31
|
+
end
|
32
|
+
end
|
30
33
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
require "shiro"
|
3
|
+
|
4
|
+
class GenerateCompletionTest < Minitest::Test
|
5
|
+
def test_create_generates_completion
|
6
|
+
VCR.use_cassette("generate_completion_create") do
|
7
|
+
options = {
|
8
|
+
environment: "PRODUCTION",
|
9
|
+
prompt_id: ENV['SHIRO_PROMPT_ID'],
|
10
|
+
input_variables: { "review_text": "I loved the movie." }
|
11
|
+
}
|
12
|
+
|
13
|
+
response = Shiro::GenerateCompletion.create(ENV['SHIRO_DEPLOYMENT_ID'], options)
|
14
|
+
|
15
|
+
assert response.key?("content"), "Expected response to include 'content'"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/test/me_test.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
require "shiro"
|
3
|
+
|
4
|
+
class MeTest < Minitest::Test
|
5
|
+
def test_retrieve_current_user_details
|
6
|
+
VCR.use_cassette("me_retrieve") do
|
7
|
+
response = Shiro::Me.retrieve
|
8
|
+
assert response.key?("id"), "Expected response to include 'id'"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_delete_current_user_account
|
13
|
+
VCR.use_cassette("me_delete") do
|
14
|
+
response = Shiro::Me.delete
|
15
|
+
assert response.empty? || response.key?("message"), "Expected successful deletion message or empty response"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/test/prompt_test.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
require "shiro"
|
3
|
+
|
4
|
+
class PromptTest < Minitest::Test
|
5
|
+
def test_list_prompts
|
6
|
+
VCR.use_cassette("prompts_list") do
|
7
|
+
response = Shiro::Prompt.list
|
8
|
+
assert response.first.has_key?("id"), "Expected first prompt to have an 'id'"
|
9
|
+
assert response.first.has_key?("name"), "Expected first prompt to have a 'name'"
|
10
|
+
# Add more assertions based on the expected structure of a prompt
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_retrieve_prompt
|
15
|
+
VCR.use_cassette("prompt_retrieve") do
|
16
|
+
response = Shiro::Prompt.retrieve(ENV['SHIRO_PROMPT_ID'])
|
17
|
+
|
18
|
+
assert_equal ENV['SHIRO_PROMPT_ID'], response["id"]
|
19
|
+
assert response.key?("name"), "Expected prompt to have a 'name'"
|
20
|
+
assert response.key?("body"), "Expected prompt to have a 'body'"
|
21
|
+
# Add more assertions based on the expected structure of a prompt
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -5,9 +5,15 @@ require "minitest/autorun"
|
|
5
5
|
require "vcr"
|
6
6
|
require "webmock/minitest"
|
7
7
|
|
8
|
+
Shiro.configure do |config|
|
9
|
+
config[:api_key] = ENV["SHIRO_API_KEY"]
|
10
|
+
end
|
11
|
+
|
8
12
|
VCR.configure do |config|
|
9
13
|
config.cassette_library_dir = "test/vcr_cassettes"
|
10
14
|
config.hook_into :webmock
|
11
15
|
config.filter_sensitive_data("<SHIRO_API_KEY>") { ENV["SHIRO_API_KEY"] }
|
16
|
+
config.filter_sensitive_data('<SHIRO_PROMPT_ID>') { ENV['SHIRO_PROMPT_ID'] }
|
17
|
+
config.filter_sensitive_data('<SHIRO_DEPLOYMENT_ID>') { ENV['SHIRO_DEPLOYMENT_ID'] }
|
12
18
|
config.default_cassette_options = {record: :new_episodes}
|
13
19
|
end
|
@@ -2,127 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://openshiro.com/api/v1/deployments
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
Authorization:
|
11
|
-
- Bearer <SHIRO_API_KEY>
|
12
|
-
Accept-Encoding:
|
13
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
-
Accept:
|
15
|
-
- "*/*"
|
16
|
-
User-Agent:
|
17
|
-
- Ruby
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 404
|
21
|
-
message: Not Found
|
22
|
-
headers:
|
23
|
-
Server:
|
24
|
-
- Cowboy
|
25
|
-
Date:
|
26
|
-
- Sun, 25 Feb 2024 07:30:17 GMT
|
27
|
-
Report-To:
|
28
|
-
- '{"group":"heroku-nel","max_age":3600,"endpoints":[{"url":"https://nel.heroku.com/reports?ts=1708846218&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=ZbYV%2BK%2FVaHIjbZJOaO61NdSl3OhGZ%2FBe4vLc1XEiSeE%3D"}]}'
|
29
|
-
Reporting-Endpoints:
|
30
|
-
- heroku-nel=https://nel.heroku.com/reports?ts=1708846218&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=ZbYV%2BK%2FVaHIjbZJOaO61NdSl3OhGZ%2FBe4vLc1XEiSeE%3D
|
31
|
-
Nel:
|
32
|
-
- '{"report_to":"heroku-nel","max_age":3600,"success_fraction":0.005,"failure_fraction":0.05,"response_headers":["Via"]}'
|
33
|
-
Connection:
|
34
|
-
- keep-alive
|
35
|
-
X-Frame-Options:
|
36
|
-
- SAMEORIGIN
|
37
|
-
X-Xss-Protection:
|
38
|
-
- '0'
|
39
|
-
X-Content-Type-Options:
|
40
|
-
- nosniff
|
41
|
-
X-Permitted-Cross-Domain-Policies:
|
42
|
-
- none
|
43
|
-
Referrer-Policy:
|
44
|
-
- strict-origin-when-cross-origin
|
45
|
-
Content-Type:
|
46
|
-
- application/json; charset=utf-8
|
47
|
-
X-Request-Id:
|
48
|
-
- b096e5ce-a064-4441-aa4f-a898670988df
|
49
|
-
X-Runtime:
|
50
|
-
- '0.083281'
|
51
|
-
Strict-Transport-Security:
|
52
|
-
- max-age=63072000; includeSubDomains
|
53
|
-
Content-Length:
|
54
|
-
- '21'
|
55
|
-
Via:
|
56
|
-
- 1.1 vegur
|
57
|
-
body:
|
58
|
-
encoding: UTF-8
|
59
|
-
string: '{"error":"Not found"}'
|
60
|
-
recorded_at: Sun, 25 Feb 2024 07:30:18 GMT
|
61
|
-
- request:
|
62
|
-
method: get
|
63
|
-
uri: https://openshiro.com/api/v1/deployments
|
64
|
-
body:
|
65
|
-
encoding: US-ASCII
|
66
|
-
string: ''
|
67
|
-
headers:
|
68
|
-
Authorization:
|
69
|
-
- Bearer <SHIRO_API_KEY>
|
70
|
-
Accept-Encoding:
|
71
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
72
|
-
Accept:
|
73
|
-
- "*/*"
|
74
|
-
User-Agent:
|
75
|
-
- Ruby
|
76
|
-
response:
|
77
|
-
status:
|
78
|
-
code: 200
|
79
|
-
message: OK
|
80
|
-
headers:
|
81
|
-
Server:
|
82
|
-
- Cowboy
|
83
|
-
Date:
|
84
|
-
- Sun, 25 Feb 2024 07:39:32 GMT
|
85
|
-
Report-To:
|
86
|
-
- '{"group":"heroku-nel","max_age":3600,"endpoints":[{"url":"https://nel.heroku.com/reports?ts=1708846772&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=cdr7XBdIFoAGME5VTc3DFKxAU7Nr720WZ%2FcYOtjLQls%3D"}]}'
|
87
|
-
Reporting-Endpoints:
|
88
|
-
- heroku-nel=https://nel.heroku.com/reports?ts=1708846772&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=cdr7XBdIFoAGME5VTc3DFKxAU7Nr720WZ%2FcYOtjLQls%3D
|
89
|
-
Nel:
|
90
|
-
- '{"report_to":"heroku-nel","max_age":3600,"success_fraction":0.005,"failure_fraction":0.05,"response_headers":["Via"]}'
|
91
|
-
Connection:
|
92
|
-
- keep-alive
|
93
|
-
X-Frame-Options:
|
94
|
-
- SAMEORIGIN
|
95
|
-
X-Xss-Protection:
|
96
|
-
- '0'
|
97
|
-
X-Content-Type-Options:
|
98
|
-
- nosniff
|
99
|
-
X-Permitted-Cross-Domain-Policies:
|
100
|
-
- none
|
101
|
-
Referrer-Policy:
|
102
|
-
- strict-origin-when-cross-origin
|
103
|
-
Content-Type:
|
104
|
-
- application/json; charset=utf-8
|
105
|
-
Etag:
|
106
|
-
- W/"df6856bf370905f0b5233c2350b8e440"
|
107
|
-
Cache-Control:
|
108
|
-
- max-age=0, private, must-revalidate
|
109
|
-
X-Request-Id:
|
110
|
-
- 713eeb82-2a79-4d93-b709-ec083cfc0c1c
|
111
|
-
X-Runtime:
|
112
|
-
- '0.026924'
|
113
|
-
Strict-Transport-Security:
|
114
|
-
- max-age=63072000; includeSubDomains
|
115
|
-
Content-Length:
|
116
|
-
- '296'
|
117
|
-
Via:
|
118
|
-
- 1.1 vegur
|
119
|
-
body:
|
120
|
-
encoding: UTF-8
|
121
|
-
string: '[{"id":"dpmt_o6drBgMEZv9YmU9vYjb5QwxR","name":"Categorization","environment_type":{"id":"env_ZWaJKVvg9wQEAILwnNqxk0zy","object":"environment_type","name":"PRODUCTION"},"created_at":1707946238,"updated_at":1707946238,"url":"https://openshiro.com/api/v1/deployments/dpmt_o6drBgMEZv9YmU9vYjb5QwxR"}]'
|
122
|
-
recorded_at: Sun, 25 Feb 2024 07:39:32 GMT
|
123
|
-
- request:
|
124
|
-
method: get
|
125
|
-
uri: https://openshiro.com/api/v1/deployments/dpmt_o6drBgMEZv9YmU9vYjb5QwxR
|
5
|
+
uri: https://openshiro.com/api/v1/deployments/<SHIRO_DEPLOYMENT_ID>
|
126
6
|
body:
|
127
7
|
encoding: US-ASCII
|
128
8
|
string: ''
|
@@ -143,11 +23,11 @@ http_interactions:
|
|
143
23
|
Server:
|
144
24
|
- Cowboy
|
145
25
|
Date:
|
146
|
-
-
|
26
|
+
- Mon, 26 Feb 2024 05:59:29 GMT
|
147
27
|
Report-To:
|
148
|
-
- '{"group":"heroku-nel","max_age":3600,"endpoints":[{"url":"https://nel.heroku.com/reports?ts=
|
28
|
+
- '{"group":"heroku-nel","max_age":3600,"endpoints":[{"url":"https://nel.heroku.com/reports?ts=1708927170&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=zpkRbZ%2FmJU3mj5JXwnVKm2Hui9MBTOOQ7pWaH9TE7jg%3D"}]}'
|
149
29
|
Reporting-Endpoints:
|
150
|
-
- heroku-nel=https://nel.heroku.com/reports?ts=
|
30
|
+
- heroku-nel=https://nel.heroku.com/reports?ts=1708927170&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=zpkRbZ%2FmJU3mj5JXwnVKm2Hui9MBTOOQ7pWaH9TE7jg%3D
|
151
31
|
Nel:
|
152
32
|
- '{"report_to":"heroku-nel","max_age":3600,"success_fraction":0.005,"failure_fraction":0.05,"response_headers":["Via"]}'
|
153
33
|
Connection:
|
@@ -169,9 +49,9 @@ http_interactions:
|
|
169
49
|
Cache-Control:
|
170
50
|
- max-age=0, private, must-revalidate
|
171
51
|
X-Request-Id:
|
172
|
-
-
|
52
|
+
- 6eee47fd-8717-48d2-bf75-33a8ffbadaa9
|
173
53
|
X-Runtime:
|
174
|
-
- '0.
|
54
|
+
- '0.020676'
|
175
55
|
Strict-Transport-Security:
|
176
56
|
- max-age=63072000; includeSubDomains
|
177
57
|
Content-Length:
|
@@ -180,6 +60,6 @@ http_interactions:
|
|
180
60
|
- 1.1 vegur
|
181
61
|
body:
|
182
62
|
encoding: UTF-8
|
183
|
-
string: '{"id":"
|
184
|
-
recorded_at:
|
63
|
+
string: '{"id":"<SHIRO_DEPLOYMENT_ID>","name":"Categorization","environment_type":{"id":"env_ZWaJKVvg9wQEAILwnNqxk0zy","object":"environment_type","name":"PRODUCTION"},"created_at":1707946238,"updated_at":1707946238,"url":"https://openshiro.com/api/v1/deployments/<SHIRO_DEPLOYMENT_ID>"}'
|
64
|
+
recorded_at: Mon, 26 Feb 2024 05:59:30 GMT
|
185
65
|
recorded_with: VCR 6.2.0
|
@@ -0,0 +1,67 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: patch
|
5
|
+
uri: https://openshiro.com/api/v1/deployments/<SHIRO_DEPLOYMENT_ID>
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"Updated Deployment Name"}'
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- Bearer <SHIRO_API_KEY>
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- Cowboy
|
27
|
+
Date:
|
28
|
+
- Mon, 26 Feb 2024 06:24:18 GMT
|
29
|
+
Report-To:
|
30
|
+
- '{"group":"heroku-nel","max_age":3600,"endpoints":[{"url":"https://nel.heroku.com/reports?ts=1708928658&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=Sr1eJVSUC9bOxeL3PEppE165oApuzHd%2Bmqpb%2FdbDeww%3D"}]}'
|
31
|
+
Reporting-Endpoints:
|
32
|
+
- heroku-nel=https://nel.heroku.com/reports?ts=1708928658&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=Sr1eJVSUC9bOxeL3PEppE165oApuzHd%2Bmqpb%2FdbDeww%3D
|
33
|
+
Nel:
|
34
|
+
- '{"report_to":"heroku-nel","max_age":3600,"success_fraction":0.005,"failure_fraction":0.05,"response_headers":["Via"]}'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
X-Frame-Options:
|
38
|
+
- SAMEORIGIN
|
39
|
+
X-Xss-Protection:
|
40
|
+
- '0'
|
41
|
+
X-Content-Type-Options:
|
42
|
+
- nosniff
|
43
|
+
X-Permitted-Cross-Domain-Policies:
|
44
|
+
- none
|
45
|
+
Referrer-Policy:
|
46
|
+
- strict-origin-when-cross-origin
|
47
|
+
Content-Type:
|
48
|
+
- application/json; charset=utf-8
|
49
|
+
Etag:
|
50
|
+
- W/"c87bc2c44f7f1903b49ac02299e8bf7a"
|
51
|
+
Cache-Control:
|
52
|
+
- max-age=0, private, must-revalidate
|
53
|
+
X-Request-Id:
|
54
|
+
- 8e3ca24e-1abc-4f63-96bc-a6453e611591
|
55
|
+
X-Runtime:
|
56
|
+
- '0.044823'
|
57
|
+
Strict-Transport-Security:
|
58
|
+
- max-age=63072000; includeSubDomains
|
59
|
+
Content-Length:
|
60
|
+
- '303'
|
61
|
+
Via:
|
62
|
+
- 1.1 vegur
|
63
|
+
body:
|
64
|
+
encoding: UTF-8
|
65
|
+
string: '{"id":"<SHIRO_DEPLOYMENT_ID>","name":"Updated Deployment Name","environment_type":{"id":"env_ZWaJKVvg9wQEAILwnNqxk0zy","object":"environment_type","name":"PRODUCTION"},"created_at":1707946238,"updated_at":1708928658,"url":"https://openshiro.com/api/v1/deployments/<SHIRO_DEPLOYMENT_ID>"}'
|
66
|
+
recorded_at: Mon, 26 Feb 2024 06:24:18 GMT
|
67
|
+
recorded_with: VCR 6.2.0
|
@@ -23,11 +23,11 @@ http_interactions:
|
|
23
23
|
Server:
|
24
24
|
- Cowboy
|
25
25
|
Date:
|
26
|
-
-
|
26
|
+
- Mon, 26 Feb 2024 05:59:28 GMT
|
27
27
|
Report-To:
|
28
|
-
- '{"group":"heroku-nel","max_age":3600,"endpoints":[{"url":"https://nel.heroku.com/reports?ts=
|
28
|
+
- '{"group":"heroku-nel","max_age":3600,"endpoints":[{"url":"https://nel.heroku.com/reports?ts=1708927169&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=Snz3k5OG%2BB%2F1n9t9Hkk7u5FR%2Bq0FFEtUFx2FloiO86s%3D"}]}'
|
29
29
|
Reporting-Endpoints:
|
30
|
-
- heroku-nel=https://nel.heroku.com/reports?ts=
|
30
|
+
- heroku-nel=https://nel.heroku.com/reports?ts=1708927169&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=Snz3k5OG%2BB%2F1n9t9Hkk7u5FR%2Bq0FFEtUFx2FloiO86s%3D
|
31
31
|
Nel:
|
32
32
|
- '{"report_to":"heroku-nel","max_age":3600,"success_fraction":0.005,"failure_fraction":0.05,"response_headers":["Via"]}'
|
33
33
|
Connection:
|
@@ -49,9 +49,9 @@ http_interactions:
|
|
49
49
|
Cache-Control:
|
50
50
|
- max-age=0, private, must-revalidate
|
51
51
|
X-Request-Id:
|
52
|
-
-
|
52
|
+
- c8ded587-ba2e-43f9-ba6a-06b58140165b
|
53
53
|
X-Runtime:
|
54
|
-
- '0.
|
54
|
+
- '0.019040'
|
55
55
|
Strict-Transport-Security:
|
56
56
|
- max-age=63072000; includeSubDomains
|
57
57
|
Content-Length:
|
@@ -60,6 +60,6 @@ http_interactions:
|
|
60
60
|
- 1.1 vegur
|
61
61
|
body:
|
62
62
|
encoding: UTF-8
|
63
|
-
string: '[{"id":"
|
64
|
-
recorded_at:
|
63
|
+
string: '[{"id":"<SHIRO_DEPLOYMENT_ID>","name":"Categorization","environment_type":{"id":"env_ZWaJKVvg9wQEAILwnNqxk0zy","object":"environment_type","name":"PRODUCTION"},"created_at":1707946238,"updated_at":1707946238,"url":"https://openshiro.com/api/v1/deployments/<SHIRO_DEPLOYMENT_ID>"}]'
|
64
|
+
recorded_at: Mon, 26 Feb 2024 05:59:29 GMT
|
65
65
|
recorded_with: VCR 6.2.0
|
@@ -0,0 +1,68 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://openshiro.com/api/v1/generate_completion
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"deployment_id":"<SHIRO_DEPLOYMENT_ID>","environment":"PRODUCTION","prompt_id":"<SHIRO_PROMPT_ID>","input_variables":{"review_text":"I
|
9
|
+
loved the movie."}}'
|
10
|
+
headers:
|
11
|
+
Authorization:
|
12
|
+
- Bearer <SHIRO_API_KEY>
|
13
|
+
Content-Type:
|
14
|
+
- application/json
|
15
|
+
Accept-Encoding:
|
16
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
17
|
+
Accept:
|
18
|
+
- "*/*"
|
19
|
+
User-Agent:
|
20
|
+
- Ruby
|
21
|
+
response:
|
22
|
+
status:
|
23
|
+
code: 200
|
24
|
+
message: OK
|
25
|
+
headers:
|
26
|
+
Server:
|
27
|
+
- Cowboy
|
28
|
+
Date:
|
29
|
+
- Mon, 26 Feb 2024 06:03:48 GMT
|
30
|
+
Report-To:
|
31
|
+
- '{"group":"heroku-nel","max_age":3600,"endpoints":[{"url":"https://nel.heroku.com/reports?ts=1708927427&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=sQB7OR7nXa%2BfXt4OL6e1AVB06%2FixC0Mup%2FaxCIn9ie0%3D"}]}'
|
32
|
+
Reporting-Endpoints:
|
33
|
+
- heroku-nel=https://nel.heroku.com/reports?ts=1708927427&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=sQB7OR7nXa%2BfXt4OL6e1AVB06%2FixC0Mup%2FaxCIn9ie0%3D
|
34
|
+
Nel:
|
35
|
+
- '{"report_to":"heroku-nel","max_age":3600,"success_fraction":0.005,"failure_fraction":0.05,"response_headers":["Via"]}'
|
36
|
+
Connection:
|
37
|
+
- keep-alive
|
38
|
+
X-Frame-Options:
|
39
|
+
- SAMEORIGIN
|
40
|
+
X-Xss-Protection:
|
41
|
+
- '0'
|
42
|
+
X-Content-Type-Options:
|
43
|
+
- nosniff
|
44
|
+
X-Permitted-Cross-Domain-Policies:
|
45
|
+
- none
|
46
|
+
Referrer-Policy:
|
47
|
+
- strict-origin-when-cross-origin
|
48
|
+
Content-Type:
|
49
|
+
- application/json; charset=utf-8
|
50
|
+
Etag:
|
51
|
+
- W/"fd68791208451c24a3ba8a8d0a590581"
|
52
|
+
Cache-Control:
|
53
|
+
- max-age=0, private, must-revalidate
|
54
|
+
X-Request-Id:
|
55
|
+
- fc2e9a78-8e89-4689-8413-b1e1fcf97bb8
|
56
|
+
X-Runtime:
|
57
|
+
- '0.555866'
|
58
|
+
Strict-Transport-Security:
|
59
|
+
- max-age=63072000; includeSubDomains
|
60
|
+
Content-Length:
|
61
|
+
- '22'
|
62
|
+
Via:
|
63
|
+
- 1.1 vegur
|
64
|
+
body:
|
65
|
+
encoding: UTF-8
|
66
|
+
string: '{"content":"Positive"}'
|
67
|
+
recorded_at: Mon, 26 Feb 2024 06:03:48 GMT
|
68
|
+
recorded_with: VCR 6.2.0
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: delete
|
5
|
+
uri: https://openshiro.com/api/v1/me
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- Bearer <SHIRO_API_KEY>
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
X-Frame-Options:
|
24
|
+
- SAMEORIGIN
|
25
|
+
X-Xss-Protection:
|
26
|
+
- '0'
|
27
|
+
X-Content-Type-Options:
|
28
|
+
- nosniff
|
29
|
+
X-Permitted-Cross-Domain-Policies:
|
30
|
+
- none
|
31
|
+
Referrer-Policy:
|
32
|
+
- strict-origin-when-cross-origin
|
33
|
+
Content-Type:
|
34
|
+
- application/json; charset=utf-8
|
35
|
+
Etag:
|
36
|
+
- W/"44136fa355b3678a1146ad16f7e8649e"
|
37
|
+
Cache-Control:
|
38
|
+
- max-age=0, private, must-revalidate
|
39
|
+
X-Request-Id:
|
40
|
+
- 86f451d4-9e9c-453f-8647-26a586cf2b65
|
41
|
+
X-Runtime:
|
42
|
+
- '0.347555'
|
43
|
+
Server-Timing:
|
44
|
+
- start_processing.action_controller;dur=0.06, sql.active_record;dur=137.93,
|
45
|
+
instantiation.active_record;dur=25.10, transaction.active_record;dur=296.68,
|
46
|
+
broadcast.action_cable;dur=3.67, process_action.action_controller;dur=333.74
|
47
|
+
Content-Length:
|
48
|
+
- '2'
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: "{}"
|
52
|
+
recorded_at: Mon, 26 Feb 2024 06:16:40 GMT
|
53
|
+
recorded_with: VCR 6.2.0
|
@@ -0,0 +1,119 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://openshiro.com/api/v1/me
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- Bearer <SHIRO_API_KEY>
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- Cowboy
|
25
|
+
Date:
|
26
|
+
- Mon, 26 Feb 2024 06:09:20 GMT
|
27
|
+
Report-To:
|
28
|
+
- '{"group":"heroku-nel","max_age":3600,"endpoints":[{"url":"https://nel.heroku.com/reports?ts=1708927761&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=Vh%2Feruwe0tEyg5ah3p8a0tQcitVvGyR0tcVyw8HtXjo%3D"}]}'
|
29
|
+
Reporting-Endpoints:
|
30
|
+
- heroku-nel=https://nel.heroku.com/reports?ts=1708927761&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=Vh%2Feruwe0tEyg5ah3p8a0tQcitVvGyR0tcVyw8HtXjo%3D
|
31
|
+
Nel:
|
32
|
+
- '{"report_to":"heroku-nel","max_age":3600,"success_fraction":0.005,"failure_fraction":0.05,"response_headers":["Via"]}'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
X-Xss-Protection:
|
38
|
+
- '0'
|
39
|
+
X-Content-Type-Options:
|
40
|
+
- nosniff
|
41
|
+
X-Permitted-Cross-Domain-Policies:
|
42
|
+
- none
|
43
|
+
Referrer-Policy:
|
44
|
+
- strict-origin-when-cross-origin
|
45
|
+
Content-Type:
|
46
|
+
- application/json; charset=utf-8
|
47
|
+
Etag:
|
48
|
+
- W/"60cc97c152f0d947e79864495341f1b7"
|
49
|
+
Cache-Control:
|
50
|
+
- max-age=0, private, must-revalidate
|
51
|
+
X-Request-Id:
|
52
|
+
- ed072458-5136-454a-935f-3f8737e61acd
|
53
|
+
X-Runtime:
|
54
|
+
- '0.019382'
|
55
|
+
Strict-Transport-Security:
|
56
|
+
- max-age=63072000; includeSubDomains
|
57
|
+
Content-Length:
|
58
|
+
- '1360'
|
59
|
+
Via:
|
60
|
+
- 1.1 vegur
|
61
|
+
body:
|
62
|
+
encoding: UTF-8
|
63
|
+
string: '{"id":"user_dWqxZ3mGOJ6kXIXwD40KXlPn","name":"Duncan Miller","avatar_url":{"blob":{"id":1,"key":"x8q37po2gfbe8d2421kk1m4l2y8y","filename":"duncan-headshot-200.jpg","content_type":"image/jpeg","metadata":{"identified":true,"width":200,"height":200,"analyzed":true},"byte_size":92039,"checksum":"RUXifzZRlURZb1D7Nn450w==","created_at":"2023-10-23T14:36:16.375-07:00","service_name":"amazon","attachable_sgid":"eyJfcmFpbHMiOnsiZGF0YSI6ImdpZDovL2p1bXBzdGFydC1hcHAvQWN0aXZlU3RvcmFnZTo6QmxvYi8xP2V4cGlyZXNfaW4iLCJwdXIiOiJhdHRhY2hhYmxlIn19--84dad8a8e74ccf46f7208c191d2c8f70f8a19cf2"},"variation":{"transformations":{"format":"jpg","resize_to_fit":[48,48]}}},"sgid":"eyJfcmFpbHMiOnsiZGF0YSI6ImdpZDovL2p1bXBzdGFydC1hcHAvVXNlci8xP2V4cGlyZXNfaW4iLCJwdXIiOiJhdHRhY2hhYmxlIn19--7d79db2c0f4b25214e358449bc1e4d3b61374a3c","content":" \u003cspan\u003e\n \u003cimg
|
64
|
+
height=\"14\" width=\"14\" class=\"inline-block rounded-full\" src=\"https://openshiro.com/rails/active_storage/representations/redirect/BAh7BkkiC19yYWlscwY6BkVUewdJIglkYXRhBjsAVGkGSSIIcHVyBjsAVEkiDGJsb2JfaWQGOwBG--a64858739d09ceec3a56d85e5af5eb1f446fb886/BAh7BkkiC19yYWlscwY6BkVUewdJIglkYXRhBjsAVHsHOgtmb3JtYXRJIghqcGcGOwBUOhJyZXNpemVfdG9fZml0WwdpNWk1SSIIcHVyBjsAVEkiDnZhcmlhdGlvbgY7AEY=--65ac645c590797100032e4bd99b1c7cddb63b2bb/duncan-headshot-200.jpg\"
|
65
|
+
/\u003e\n Duncan Miller\n \u003c/span\u003e\n"}'
|
66
|
+
recorded_at: Mon, 26 Feb 2024 06:09:21 GMT
|
67
|
+
- request:
|
68
|
+
method: get
|
69
|
+
uri: http://localhost:3000/api/v1/me
|
70
|
+
body:
|
71
|
+
encoding: US-ASCII
|
72
|
+
string: ''
|
73
|
+
headers:
|
74
|
+
Authorization:
|
75
|
+
- Bearer <SHIRO_API_KEY>
|
76
|
+
Accept-Encoding:
|
77
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
78
|
+
Accept:
|
79
|
+
- "*/*"
|
80
|
+
User-Agent:
|
81
|
+
- Ruby
|
82
|
+
response:
|
83
|
+
status:
|
84
|
+
code: 200
|
85
|
+
message: OK
|
86
|
+
headers:
|
87
|
+
X-Frame-Options:
|
88
|
+
- SAMEORIGIN
|
89
|
+
X-Xss-Protection:
|
90
|
+
- '0'
|
91
|
+
X-Content-Type-Options:
|
92
|
+
- nosniff
|
93
|
+
X-Permitted-Cross-Domain-Policies:
|
94
|
+
- none
|
95
|
+
Referrer-Policy:
|
96
|
+
- strict-origin-when-cross-origin
|
97
|
+
Content-Type:
|
98
|
+
- application/json; charset=utf-8
|
99
|
+
Etag:
|
100
|
+
- W/"c280e16cc3b6444421ad4419c17b084f"
|
101
|
+
Cache-Control:
|
102
|
+
- max-age=0, private, must-revalidate
|
103
|
+
X-Request-Id:
|
104
|
+
- 410538e3-e868-40c9-b53f-86867a4900b8
|
105
|
+
X-Runtime:
|
106
|
+
- '0.030299'
|
107
|
+
Server-Timing:
|
108
|
+
- start_processing.action_controller;dur=0.05, sql.active_record;dur=10.79,
|
109
|
+
instantiation.active_record;dur=0.26, transaction.active_record;dur=6.58,
|
110
|
+
render_partial.action_view;dur=2.39, process_action.action_controller;dur=19.01
|
111
|
+
Content-Length:
|
112
|
+
- '623'
|
113
|
+
body:
|
114
|
+
encoding: UTF-8
|
115
|
+
string: '{"id":"user_dWqxZ3mGOJ6kXIXwD40KXlPn","name":"Admin User","avatar_url":"https://secure.gravatar.com/avatar/ffed0d373ee73e94d740ccc42d5482f6.png?default=mp\u0026rating=pg\u0026size=48","sgid":"eyJfcmFpbHMiOnsiZGF0YSI6ImdpZDovL2p1bXBzdGFydC1hcHAvVXNlci8xP2V4cGlyZXNfaW4iLCJwdXIiOiJhdHRhY2hhYmxlIn19--c304d75afe7bdcba99999d278c24e4f941dd9797","content":" \u003cspan\u003e\n \u003cimg
|
116
|
+
height=\"14\" width=\"14\" class=\"inline-block rounded-full\" src=\"https://secure.gravatar.com/avatar/ffed0d373ee73e94d740ccc42d5482f6.png?default=mp\u0026amp;rating=pg\u0026amp;size=48\"
|
117
|
+
/\u003e\n Admin User\n \u003c/span\u003e\n"}'
|
118
|
+
recorded_at: Mon, 26 Feb 2024 06:11:30 GMT
|
119
|
+
recorded_with: VCR 6.2.0
|
@@ -0,0 +1,67 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://openshiro.com/api/v1/prompts/<SHIRO_PROMPT_ID>
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- Bearer <SHIRO_API_KEY>
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- Cowboy
|
25
|
+
Date:
|
26
|
+
- Mon, 26 Feb 2024 05:59:29 GMT
|
27
|
+
Report-To:
|
28
|
+
- '{"group":"heroku-nel","max_age":3600,"endpoints":[{"url":"https://nel.heroku.com/reports?ts=1708927169&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=Snz3k5OG%2BB%2F1n9t9Hkk7u5FR%2Bq0FFEtUFx2FloiO86s%3D"}]}'
|
29
|
+
Reporting-Endpoints:
|
30
|
+
- heroku-nel=https://nel.heroku.com/reports?ts=1708927169&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=Snz3k5OG%2BB%2F1n9t9Hkk7u5FR%2Bq0FFEtUFx2FloiO86s%3D
|
31
|
+
Nel:
|
32
|
+
- '{"report_to":"heroku-nel","max_age":3600,"success_fraction":0.005,"failure_fraction":0.05,"response_headers":["Via"]}'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
X-Xss-Protection:
|
38
|
+
- '0'
|
39
|
+
X-Content-Type-Options:
|
40
|
+
- nosniff
|
41
|
+
X-Permitted-Cross-Domain-Policies:
|
42
|
+
- none
|
43
|
+
Referrer-Policy:
|
44
|
+
- strict-origin-when-cross-origin
|
45
|
+
Content-Type:
|
46
|
+
- application/json; charset=utf-8
|
47
|
+
Etag:
|
48
|
+
- W/"a575c0b29702255cb670921a0f872d1f"
|
49
|
+
Cache-Control:
|
50
|
+
- max-age=0, private, must-revalidate
|
51
|
+
X-Request-Id:
|
52
|
+
- c606f154-b317-490a-879c-c939a9f952ca
|
53
|
+
X-Runtime:
|
54
|
+
- '0.022605'
|
55
|
+
Strict-Transport-Security:
|
56
|
+
- max-age=63072000; includeSubDomains
|
57
|
+
Content-Length:
|
58
|
+
- '473'
|
59
|
+
Via:
|
60
|
+
- 1.1 vegur
|
61
|
+
body:
|
62
|
+
encoding: UTF-8
|
63
|
+
string: '{"id":"<SHIRO_PROMPT_ID>","name":"Categorization prompt 1","body":"Categorize
|
64
|
+
the following review as either positive or negative. Respond with one word
|
65
|
+
only, positive or negative. {{ review_text }}","temperature":0.5,"language_model":{"id":"lm_4Rz6y7lNwKRwgSybQMEB1j82","object":"language_model","name":"gpt-4","provider_name":"OpenAI"},"created_at":1707946227,"updated_at":1707946227,"url":"https://openshiro.com/api/v1/prompts/<SHIRO_PROMPT_ID>"}'
|
66
|
+
recorded_at: Mon, 26 Feb 2024 05:59:29 GMT
|
67
|
+
recorded_with: VCR 6.2.0
|
@@ -0,0 +1,75 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://openshiro.com/api/v1/prompts
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- Bearer <SHIRO_API_KEY>
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- Cowboy
|
25
|
+
Date:
|
26
|
+
- Mon, 26 Feb 2024 04:49:40 GMT
|
27
|
+
Report-To:
|
28
|
+
- '{"group":"heroku-nel","max_age":3600,"endpoints":[{"url":"https://nel.heroku.com/reports?ts=1708922980&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=ZxXLE2FPmGnf8UTsugNEf5pYtoLHvvTY4KWPtFrf91M%3D"}]}'
|
29
|
+
Reporting-Endpoints:
|
30
|
+
- heroku-nel=https://nel.heroku.com/reports?ts=1708922980&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=ZxXLE2FPmGnf8UTsugNEf5pYtoLHvvTY4KWPtFrf91M%3D
|
31
|
+
Nel:
|
32
|
+
- '{"report_to":"heroku-nel","max_age":3600,"success_fraction":0.005,"failure_fraction":0.05,"response_headers":["Via"]}'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
X-Xss-Protection:
|
38
|
+
- '0'
|
39
|
+
X-Content-Type-Options:
|
40
|
+
- nosniff
|
41
|
+
X-Permitted-Cross-Domain-Policies:
|
42
|
+
- none
|
43
|
+
Referrer-Policy:
|
44
|
+
- strict-origin-when-cross-origin
|
45
|
+
Content-Type:
|
46
|
+
- application/json; charset=utf-8
|
47
|
+
Etag:
|
48
|
+
- W/"6c286312298ab48ed557e97b8c1d270b"
|
49
|
+
Cache-Control:
|
50
|
+
- max-age=0, private, must-revalidate
|
51
|
+
X-Request-Id:
|
52
|
+
- ff3372fa-be53-46ba-a347-79bda5605735
|
53
|
+
X-Runtime:
|
54
|
+
- '0.035550'
|
55
|
+
Strict-Transport-Security:
|
56
|
+
- max-age=63072000; includeSubDomains
|
57
|
+
Content-Length:
|
58
|
+
- '1665'
|
59
|
+
Via:
|
60
|
+
- 1.1 vegur
|
61
|
+
body:
|
62
|
+
encoding: UTF-8
|
63
|
+
string: '[{"id":"prmt_qWdKlNznA8bQws61v039e2wk","name":"New hire letter","body":"Write
|
64
|
+
a new hire welcome letter to a new employee whose first name is {{ first_name
|
65
|
+
}}. {{ first_name }} has been hired as a {{ job_title }}. Let them know that
|
66
|
+
their new company email address will be {{ email }}. ","temperature":0.0,"language_model":{"id":"lm_4Rz6y7lNwKRwgSybQMEB1j82","object":"language_model","name":"gpt-4","provider_name":"OpenAI"},"created_at":1706838837,"updated_at":1706838837,"url":"https://openshiro.com/api/v1/prompts/prmt_qWdKlNznA8bQws61v039e2wk"},{"id":"prmt_B2Q3O6anr10rzSr5RMNzqvde","name":"New
|
67
|
+
hire letter fun","body":"Imagine you are a fun writer and write in a light,
|
68
|
+
but still professional manner. Please write a new hire welcome letter to
|
69
|
+
a new employee whose first name is {{ first_name }}. {{ first_name }} has
|
70
|
+
been hired as a {{ job_title }}. Let them know that their new company email
|
71
|
+
address will be {{ email }}","temperature":0.0,"language_model":{"id":"lm_4Rz6y7lNwKRwgSybQMEB1j82","object":"language_model","name":"gpt-4","provider_name":"OpenAI"},"created_at":1706842288,"updated_at":1706842288,"url":"https://openshiro.com/api/v1/prompts/prmt_B2Q3O6anr10rzSr5RMNzqvde"},{"id":"prmt_6q9JKvEmp5LPxub5ONgawnrB","name":"Categorization
|
72
|
+
prompt 1","body":"Categorize the following review as either positive or negative.
|
73
|
+
Respond with one word only, positive or negative. {{ review_text }}","temperature":0.5,"language_model":{"id":"lm_4Rz6y7lNwKRwgSybQMEB1j82","object":"language_model","name":"gpt-4","provider_name":"OpenAI"},"created_at":1707946227,"updated_at":1707946227,"url":"https://openshiro.com/api/v1/prompts/prmt_6q9JKvEmp5LPxub5ONgawnrB"}]'
|
74
|
+
recorded_at: Mon, 26 Feb 2024 04:49:40 GMT
|
75
|
+
recorded_with: VCR 6.2.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shiro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Duncan Miller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -109,12 +109,24 @@ files:
|
|
109
109
|
- lib/shiro.rb
|
110
110
|
- lib/shiro/client.rb
|
111
111
|
- lib/shiro/deployment.rb
|
112
|
+
- lib/shiro/generate_completion.rb
|
113
|
+
- lib/shiro/me.rb
|
114
|
+
- lib/shiro/prompt.rb
|
112
115
|
- lib/shiro/version.rb
|
113
116
|
- shiro.gemspec
|
114
117
|
- test/deployment_test.rb
|
118
|
+
- test/generate_completion_test.rb
|
119
|
+
- test/me_test.rb
|
120
|
+
- test/prompt_test.rb
|
115
121
|
- test/test_helper.rb
|
116
122
|
- test/vcr_cassettes/deployment_retrieve.yml
|
123
|
+
- test/vcr_cassettes/deployment_update.yml
|
117
124
|
- test/vcr_cassettes/deployments_list.yml
|
125
|
+
- test/vcr_cassettes/generate_completion_create.yml
|
126
|
+
- test/vcr_cassettes/me_delete.yml
|
127
|
+
- test/vcr_cassettes/me_retrieve.yml
|
128
|
+
- test/vcr_cassettes/prompt_retrieve.yml
|
129
|
+
- test/vcr_cassettes/prompts_list.yml
|
118
130
|
homepage: https://github.com/OpenShiro/shiro-ruby
|
119
131
|
licenses: []
|
120
132
|
metadata: {}
|