ruby-amazon-bedrock 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +57 -0
  3. data/.gitignore +12 -0
  4. data/.rspec +3 -0
  5. data/.rubocop.yml +28 -0
  6. data/CHANGELOG.md +9 -0
  7. data/CODE_OF_CONDUCT.md +74 -0
  8. data/CONTRIBUTING.md +3 -0
  9. data/Gemfile +16 -0
  10. data/Gemfile.lock +109 -0
  11. data/LICENSE.txt +21 -0
  12. data/README.md +329 -0
  13. data/Rakefile +12 -0
  14. data/bin/console +12 -0
  15. data/bin/setup +8 -0
  16. data/lib/bedrock/version.rb +9 -0
  17. data/lib/bedrock.rb +10 -0
  18. data/lib/bedrock_runtime/client.rb +41 -0
  19. data/lib/bedrock_runtime/payload_builders/ai_21_labs/base.rb +55 -0
  20. data/lib/bedrock_runtime/payload_builders/ai_21_labs/j2_mid_v1.rb +22 -0
  21. data/lib/bedrock_runtime/payload_builders/ai_21_labs/j2_ultra_v1.rb +22 -0
  22. data/lib/bedrock_runtime/payload_builders/amazon/base.rb +51 -0
  23. data/lib/bedrock_runtime/payload_builders/amazon/titan_image_generator_v1.rb +45 -0
  24. data/lib/bedrock_runtime/payload_builders/amazon/titan_text_express_v1.rb +23 -0
  25. data/lib/bedrock_runtime/payload_builders/amazon/titan_text_lite_v1.rb +31 -0
  26. data/lib/bedrock_runtime/payload_builders/anthropic/base.rb +55 -0
  27. data/lib/bedrock_runtime/payload_builders/anthropic/claude_instant_v1.rb +21 -0
  28. data/lib/bedrock_runtime/payload_builders/anthropic/claude_v1.rb +23 -0
  29. data/lib/bedrock_runtime/payload_builders/anthropic/claude_v2.rb +21 -0
  30. data/lib/bedrock_runtime/payload_builders/base.rb +33 -0
  31. data/lib/bedrock_runtime/payload_builders/cohere/command_base.rb +46 -0
  32. data/lib/bedrock_runtime/payload_builders/cohere/command_light_text_v14.rb +23 -0
  33. data/lib/bedrock_runtime/payload_builders/cohere/command_text_v14.rb +21 -0
  34. data/lib/bedrock_runtime/payload_builders/cohere/embed_base.rb +41 -0
  35. data/lib/bedrock_runtime/payload_builders/cohere/embed_english_v3.rb +23 -0
  36. data/lib/bedrock_runtime/payload_builders/cohere/embed_multilingual_v3.rb +21 -0
  37. data/lib/bedrock_runtime/payload_builders/meta/base.rb +45 -0
  38. data/lib/bedrock_runtime/payload_builders/meta/llama213b_chat_v1.rb +23 -0
  39. data/lib/bedrock_runtime/payload_builders/meta/llama270b_chat_v1.rb +21 -0
  40. data/lib/bedrock_runtime/payload_builders/stability_ai/base.rb +48 -0
  41. data/lib/bedrock_runtime/payload_builders/stability_ai/stable_diffusion_xl_v0.rb +23 -0
  42. data/lib/bedrock_runtime/payload_builders/stability_ai/stable_diffusion_xl_v1.rb +23 -0
  43. data/lib/bedrock_runtime/payload_factory.rb +72 -0
  44. data/ruby-amazon-bedrock.gemspec +39 -0
  45. data/sig/ruby/amazon/bedrock.rbs +8 -0
  46. data/spec/bedrock_runtime/client_spec.rb +51 -0
  47. data/spec/bedrock_runtime/payload_builders/ai_21_labs/base_spec.rb +32 -0
  48. data/spec/bedrock_runtime/payload_builders/ai_21_labs/j2_mid_v1_spec.rb +33 -0
  49. data/spec/bedrock_runtime/payload_builders/ai_21_labs/j2_ultra_v1_spec.rb +33 -0
  50. data/spec/bedrock_runtime/payload_builders/amazon/base_spec.rb +31 -0
  51. data/spec/bedrock_runtime/payload_builders/amazon/titan_image_generator_v1_spec.rb +38 -0
  52. data/spec/bedrock_runtime/payload_builders/amazon/titan_text_express_v1_spec.rb +32 -0
  53. data/spec/bedrock_runtime/payload_builders/amazon/titan_text_lite_v1_spec.rb +32 -0
  54. data/spec/bedrock_runtime/payload_builders/anthropic/base_spec.rb +33 -0
  55. data/spec/bedrock_runtime/payload_builders/anthropic/claude_instant_v1_spec.rb +34 -0
  56. data/spec/bedrock_runtime/payload_builders/anthropic/claude_v1_spec.rb +34 -0
  57. data/spec/bedrock_runtime/payload_builders/anthropic/claude_v2_spec.rb +34 -0
  58. data/spec/bedrock_runtime/payload_builders/base_spec.rb +34 -0
  59. data/spec/bedrock_runtime/payload_builders/cohere/command_base_spec.rb +27 -0
  60. data/spec/bedrock_runtime/payload_builders/cohere/command_light_text_v14_spec.rb +28 -0
  61. data/spec/bedrock_runtime/payload_builders/cohere/command_text_v14_spec.rb +28 -0
  62. data/spec/bedrock_runtime/payload_builders/cohere/embed_base_spec.rb +26 -0
  63. data/spec/bedrock_runtime/payload_builders/cohere/embed_english_v3_spec.rb +27 -0
  64. data/spec/bedrock_runtime/payload_builders/cohere/embed_multilingual_v3_spec.rb +27 -0
  65. data/spec/bedrock_runtime/payload_builders/meta/base_spec.rb +28 -0
  66. data/spec/bedrock_runtime/payload_builders/meta/llama213b_chat_v1_spec.rb +29 -0
  67. data/spec/bedrock_runtime/payload_builders/meta/llama270b_chat_v1_spec.rb +29 -0
  68. data/spec/bedrock_runtime/payload_builders/stability_ai/base_spec.rb +30 -0
  69. data/spec/bedrock_runtime/payload_builders/stability_ai/stable_diffusion_xl_v0_spec.rb +31 -0
  70. data/spec/bedrock_runtime/payload_builders/stability_ai/stable_diffusion_xl_v1_spec.rb +31 -0
  71. data/spec/bedrock_runtime/payload_factory_spec.rb +56 -0
  72. data/spec/bedrock_spec.rb +7 -0
  73. data/spec/cassettes/models/amazon_titan-text-express-v1.yml +59 -0
  74. data/spec/cassettes/models/amazon_titan-text-lite-v1.yml +54 -0
  75. data/spec/cassettes/models/anthropic_claude-instant-v1.yml +62 -0
  76. data/spec/cassettes/models/anthropic_claude-v1.yml +61 -0
  77. data/spec/cassettes/models/anthropic_claude-v2.yml +59 -0
  78. data/spec/cassettes/models/cohere_command-light-text-v14.yml +54 -0
  79. data/spec/cassettes/models/cohere_command-text-v14.yml +55 -0
  80. data/spec/cassettes/models/cohere_embed-english-v3.yml +47 -0
  81. data/spec/cassettes/models/cohere_embed-multilingual-v3.yml +47 -0
  82. data/spec/cassettes/models/errors/bad_request.yml +45 -0
  83. data/spec/cassettes/models/errors/not_found.yml +45 -0
  84. data/spec/cassettes/models/meta_llama2-13b-chat-v1.yml +73 -0
  85. data/spec/cassettes/models/meta_llama2-70b-chat-v1.yml +55 -0
  86. data/spec/cassettes/models/stability_stable-diffusion-xl-v0.yml +51 -0
  87. data/spec/cassettes/models/stability_stable-diffusion-xl-v1.yml +45 -0
  88. data/spec/spec_helper.rb +29 -0
  89. metadata +153 -0
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/amazon.titan-text-lite-v1/invoke
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"inputText":"Give me a short list of steps for creating a Ruby gem","textGenerationConfig":{"maxTokenCount":4096,"stopSequences":[],"temperature":0,"topP":1}}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - ''
12
+ Content-Type:
13
+ - application/json
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - aws-sdk-ruby3/3.189.0 ua/2.0 api/bedrock_runtime#1.4.0 os/macos#22 md/arm64
18
+ lang/ruby#3.2.2 md/3.2.2 cfg/retry-mode#legacy
19
+ Host:
20
+ - bedrock-runtime.us-east-1.amazonaws.com
21
+ Content-Length:
22
+ - '159'
23
+ response:
24
+ status:
25
+ code: 200
26
+ message: OK
27
+ headers:
28
+ Date:
29
+ - Wed, 06 Dec 2023 05:48:33 GMT
30
+ Content-Type:
31
+ - application/json
32
+ Content-Length:
33
+ - '540'
34
+ Connection:
35
+ - keep-alive
36
+ X-Amzn-Requestid:
37
+ - 0b0079d1-8c05-407a-a46b-bb871d9e87b8
38
+ X-Amzn-Bedrock-Invocation-Latency:
39
+ - '4366'
40
+ X-Amzn-Bedrock-Output-Token-Count:
41
+ - '116'
42
+ X-Amzn-Bedrock-Input-Token-Count:
43
+ - '12'
44
+ body:
45
+ encoding: UTF-8
46
+ string: '{"inputTextTokenCount":12,"results":[{"tokenCount":116,"outputText":"\nHere
47
+ are the steps for creating a Ruby gem:\n1. Create a directory for your gem.\n2.
48
+ Create a file named \"Gemfile\" in the directory.\n3. Add the path to the
49
+ directory containing your gem''s code in the \"Gemfile\".\n4. Run the command
50
+ \"bundle install\" in the directory.\n5. Add the \"gem\" command to your \".bashrc\"
51
+ file if you want to use it from the command line.\n6. Run the command \"gem
52
+ install [gem-name]\" to install the gem.","completionReason":"FINISH"}]}'
53
+ recorded_at: Wed, 06 Dec 2023 05:48:33 GMT
54
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-instant-v1/invoke
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"prompt":"\n\nHuman: Give me a short list of steps for creating a
9
+ Ruby gem\n\nAssistant:","max_tokens_to_sample":300,"temperature":0.5,"top_k":250,"top_p":1,"stop_sequences":["\\n\\nHuman"],"anthropic_version":"bedrock-2023-05-31"}'
10
+ headers:
11
+ Accept-Encoding:
12
+ - ''
13
+ Content-Type:
14
+ - application/json
15
+ Accept:
16
+ - "*/*"
17
+ User-Agent:
18
+ - aws-sdk-ruby3/3.189.0 ua/2.0 api/bedrock_runtime#1.4.0 os/macos#22 md/arm64
19
+ lang/ruby#3.2.2 md/3.2.2 cfg/retry-mode#legacy
20
+ Host:
21
+ - bedrock-runtime.us-east-1.amazonaws.com
22
+ Content-Length:
23
+ - '232'
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Date:
30
+ - Wed, 06 Dec 2023 05:48:47 GMT
31
+ Content-Type:
32
+ - application/json
33
+ Content-Length:
34
+ - '1104'
35
+ Connection:
36
+ - keep-alive
37
+ X-Amzn-Requestid:
38
+ - f542bb49-8e80-4c7b-926b-222edd1d7bf9
39
+ X-Amzn-Bedrock-Invocation-Latency:
40
+ - '5724'
41
+ X-Amzn-Bedrock-Output-Token-Count:
42
+ - '261'
43
+ X-Amzn-Bedrock-Input-Token-Count:
44
+ - '21'
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"completion":" Here are the basic steps to create a Ruby gem:\n\n1.
48
+ Generate the gem skeleton using the gem command:\n\n `gem build <gem_name>`\n\n2.
49
+ This will create a directory with the gem name, containing basic files like
50
+ the gemspec, Rakefile, lib directory etc.\n\n3. Define the gem functionality
51
+ by writing code/classes in the lib directory.\n\n4. Document the gem usage,
52
+ classes, and methods using YARD syntax in the code. \n\n5. Update the gemspec
53
+ file with metadata like name, version, description etc.\n\n6. Add development
54
+ and test dependencies to the gemspec.\n\n7. Write tests for the gem functionality
55
+ in a tests directory.\n\n8. Add a Rake task to run the tests.\n\n9. Publish
56
+ the gem to a gem host like RubyGems with `gem push <gemfile>` after testing.\n\n10.
57
+ Market and distribute the gem so others can install and use it with `gem install
58
+ <gem_name>`.\n\n11. Maintain and update the gem as needed with new versions/features.\n\nSo
59
+ in summary - generate skeleton, add code, document, test, publish, distribute
60
+ and maintain updates.","stop_reason":"stop_sequence","stop":"\n\nHuman:"}'
61
+ recorded_at: Wed, 06 Dec 2023 05:48:46 GMT
62
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,61 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-v1/invoke
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"prompt":"\n\nHuman: Give me a short list of steps for creating a
9
+ Ruby gem\n\nAssistant:","max_tokens_to_sample":300,"temperature":0.5,"top_k":250,"top_p":1,"stop_sequences":["\\n\\nHuman"],"anthropic_version":"bedrock-2023-05-31"}'
10
+ headers:
11
+ Accept-Encoding:
12
+ - ''
13
+ Content-Type:
14
+ - application/json
15
+ Accept:
16
+ - "*/*"
17
+ User-Agent:
18
+ - aws-sdk-ruby3/3.189.0 ua/2.0 api/bedrock_runtime#1.4.0 os/macos#22 md/arm64
19
+ lang/ruby#3.2.2 md/3.2.2 cfg/retry-mode#legacy
20
+ Host:
21
+ - bedrock-runtime.us-east-1.amazonaws.com
22
+ Content-Length:
23
+ - '232'
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Date:
30
+ - Wed, 06 Dec 2023 05:48:55 GMT
31
+ Content-Type:
32
+ - application/json
33
+ Content-Length:
34
+ - '1036'
35
+ Connection:
36
+ - keep-alive
37
+ X-Amzn-Requestid:
38
+ - c76610df-1538-4a15-af71-934e2e9db5da
39
+ X-Amzn-Bedrock-Invocation-Latency:
40
+ - '8165'
41
+ X-Amzn-Bedrock-Output-Token-Count:
42
+ - '265'
43
+ X-Amzn-Bedrock-Input-Token-Count:
44
+ - '21'
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"completion":" Here are the basic steps to create a Ruby gem:\n\n1.
48
+ Choose a gem name. Make sure it''s not already taken on RubyGems.org.\n\n2.
49
+ Create a directory with the gem name.\n\n3. Initialize the gem with `bundle
50
+ gem <gem name>`. This will create the necessary folder structure and files.\n\n4.
51
+ Edit the .gemspec file with details about your gem like summary, description,
52
+ authors, etc. \n\n5. Write your code! Add files like lib/gem_name.rb, bin/gem_name,
53
+ etc.\n\n6. Update the README.md with instructions and documentation for your
54
+ gem.\n\n7. Commit to git and push to GitHub.\n\n8. Build the gem with `gem
55
+ build <gem name>.gemspec`\n\n9. Push the gem to RubyGems with `gem push <gem
56
+ name>-<version>.gem`\n\n10. Update your gem with `gem update <gem name>` and
57
+ release new versions with `gem push <new version>.gem`\n\n11. Profit! Your
58
+ gem is now available for anyone to use in their Ruby projects.\n\nThat covers
59
+ the basic steps. Let me know if you have any other questions!","stop_reason":"stop_sequence","stop":"\n\nHuman:"}'
60
+ recorded_at: Wed, 06 Dec 2023 05:48:55 GMT
61
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,59 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-v2/invoke
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"prompt":"\n\nHuman: Give me a short list of steps for creating a
9
+ Ruby gem\n\nAssistant:","max_tokens_to_sample":300,"temperature":0.5,"top_k":250,"top_p":1,"stop_sequences":["\\n\\nHuman"],"anthropic_version":"bedrock-2023-05-31"}'
10
+ headers:
11
+ Accept-Encoding:
12
+ - ''
13
+ Content-Type:
14
+ - application/json
15
+ Accept:
16
+ - "*/*"
17
+ User-Agent:
18
+ - aws-sdk-ruby3/3.189.0 ua/2.0 api/bedrock_runtime#1.4.0 os/macos#22 md/arm64
19
+ lang/ruby#3.2.2 md/3.2.2 cfg/retry-mode#legacy
20
+ Host:
21
+ - bedrock-runtime.us-east-1.amazonaws.com
22
+ Content-Length:
23
+ - '232'
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Date:
30
+ - Wed, 06 Dec 2023 05:49:05 GMT
31
+ Content-Type:
32
+ - application/json
33
+ Content-Length:
34
+ - '911'
35
+ Connection:
36
+ - keep-alive
37
+ X-Amzn-Requestid:
38
+ - 2dea4410-7f17-4618-beb6-d7b54686d777
39
+ X-Amzn-Bedrock-Invocation-Latency:
40
+ - '9777'
41
+ X-Amzn-Bedrock-Output-Token-Count:
42
+ - '201'
43
+ X-Amzn-Bedrock-Input-Token-Count:
44
+ - '21'
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"completion":" Here is a short list of steps for creating a Ruby gem:\n\n1.
48
+ Create a new Ruby project and add your code/files\n2. Create a gemspec file
49
+ to specify metadata like name, version, dependencies etc. Use `bundle gem
50
+ gemname` to generate a template.\n3. Add a README and LICENSE file \n4. Setup
51
+ version control like git and make an initial commit\n5. Build the gem with
52
+ `gem build gemname.gemspec`\n6. Publish the gem with `gem push gemname-version.gem`\n7.
53
+ Add tests and document code with comments\n8. Choose a hosting service like
54
+ GitHub and push your code\n9. Release new versions by updating gemspec, building
55
+ and pushing \n\nThe key steps are creating the gemspec, building the gem file,
56
+ and publishing it. Make sure to follow RubyGems best practices like semantic
57
+ versioning. Add quality documentation, tests and keep publishing improvements.","stop_reason":"stop_sequence","stop":"\n\nHuman:"}'
58
+ recorded_at: Wed, 06 Dec 2023 05:49:05 GMT
59
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/cohere.command-light-text-v14/invoke
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"prompt":"Give me a short list of steps for creating a Ruby gem:","max_tokens":100,"temperature":0.8}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - ''
12
+ Content-Type:
13
+ - application/json
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - aws-sdk-ruby3/3.189.0 ua/2.0 api/bedrock_runtime#1.4.0 os/macos#22 md/arm64
18
+ lang/ruby#3.2.2 md/3.2.2 cfg/retry-mode#legacy
19
+ Host:
20
+ - bedrock-runtime.us-east-1.amazonaws.com
21
+ Content-Length:
22
+ - '102'
23
+ response:
24
+ status:
25
+ code: 200
26
+ message: OK
27
+ headers:
28
+ Date:
29
+ - Wed, 06 Dec 2023 05:49:08 GMT
30
+ Content-Type:
31
+ - application/json
32
+ Content-Length:
33
+ - '610'
34
+ Connection:
35
+ - keep-alive
36
+ X-Amzn-Requestid:
37
+ - 6cb5c51a-cbef-4aa0-89b9-1a82301b9fae
38
+ X-Amzn-Bedrock-Invocation-Latency:
39
+ - '1851'
40
+ X-Amzn-Bedrock-Output-Token-Count:
41
+ - '100'
42
+ X-Amzn-Bedrock-Input-Token-Count:
43
+ - '13'
44
+ body:
45
+ encoding: UTF-8
46
+ string: '{"generations":[{"finish_reason":"MAX_TOKENS","id":"1f09f5b8-309d-4f63-9611-e58206b07ed7","text":"
47
+ Here is a step-by-step guide to creating a Ruby gem:\n1. **Set up your development
48
+ environment**: \n - Ensure you have Ruby (version 2.5 or higher) installed
49
+ on your machine. You can download it from [the official website](https://www.ruby-lang.org/).\n -
50
+ Install a code editor or an IDE, such as [Visual Studio Code](https://code.visualstudio.com/).\n -
51
+ Install a `git` repository manager,"}],"id":"6cb5c51a-cbef-4aa0-89b9-1a82301b9fae","prompt":"Give
52
+ me a short list of steps for creating a Ruby gem:"}'
53
+ recorded_at: Wed, 06 Dec 2023 05:49:07 GMT
54
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,55 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/cohere.command-text-v14/invoke
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"prompt":"Give me a short list of steps for creating a Ruby gem:","max_tokens":100,"temperature":0.8}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - ''
12
+ Content-Type:
13
+ - application/json
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - aws-sdk-ruby3/3.189.0 ua/2.0 api/bedrock_runtime#1.4.0 os/macos#22 md/arm64
18
+ lang/ruby#3.2.2 md/3.2.2 cfg/retry-mode#legacy
19
+ Host:
20
+ - bedrock-runtime.us-east-1.amazonaws.com
21
+ Content-Length:
22
+ - '102'
23
+ response:
24
+ status:
25
+ code: 200
26
+ message: OK
27
+ headers:
28
+ Date:
29
+ - Wed, 06 Dec 2023 05:50:32 GMT
30
+ Content-Type:
31
+ - application/json
32
+ Content-Length:
33
+ - '642'
34
+ Connection:
35
+ - keep-alive
36
+ X-Amzn-Requestid:
37
+ - 49ddaedb-a4c9-450f-9d08-1d49f90bdda2
38
+ X-Amzn-Bedrock-Invocation-Latency:
39
+ - '23863'
40
+ X-Amzn-Bedrock-Output-Token-Count:
41
+ - '100'
42
+ X-Amzn-Bedrock-Input-Token-Count:
43
+ - '13'
44
+ body:
45
+ encoding: UTF-8
46
+ string: '{"generations":[{"finish_reason":"MAX_TOKENS","id":"394b2121-acb5-4259-b6a9-9a1e968c1d25","text":"
47
+ To create a Ruby gem, you''ll need to create a new Ruby project and add the
48
+ necessary files. Here are the steps you can follow:\n\n1. Create a new directory
49
+ for your gem: Use the terminal to create a new directory for your gem. This
50
+ can be done using the command `mkdir my_gem`.\n\n2. Initialize the new project
51
+ with a Gemfile: Create a new Gemfile in the directory and add the necessary
52
+ dependencies. You can use the command `gem"}],"id":"49ddaedb-a4c9-450f-9d08-1d49f90bdda2","prompt":"Give
53
+ me a short list of steps for creating a Ruby gem:"}'
54
+ recorded_at: Wed, 06 Dec 2023 05:50:32 GMT
55
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,47 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/cohere.embed-english-v3/invoke
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"texts":["Give me a short list of steps for creating a Ruby gem"],"input_type":"search_document"}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - ''
12
+ Content-Type:
13
+ - application/json
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - aws-sdk-ruby3/3.189.0 ua/2.0 api/bedrock_runtime#1.4.0 os/macos#22 md/arm64
18
+ lang/ruby#3.2.2 md/3.2.2 cfg/retry-mode#legacy
19
+ Host:
20
+ - bedrock-runtime.us-east-1.amazonaws.com
21
+ Content-Length:
22
+ - '98'
23
+ response:
24
+ status:
25
+ code: 200
26
+ message: OK
27
+ headers:
28
+ Date:
29
+ - Wed, 06 Dec 2023 05:50:33 GMT
30
+ Content-Type:
31
+ - application/json
32
+ Content-Length:
33
+ - '12856'
34
+ Connection:
35
+ - keep-alive
36
+ X-Amzn-Requestid:
37
+ - 4645935f-ff25-41da-815b-7c1acd589a42
38
+ X-Amzn-Bedrock-Invocation-Latency:
39
+ - '181'
40
+ X-Amzn-Bedrock-Input-Token-Count:
41
+ - '12'
42
+ body:
43
+ encoding: UTF-8
44
+ string: '{"embeddings":[[-0.031143188,-0.0050697327,-0.058654785,-0.031143188,-0.025909424,-0.016540527,-0.050323486,0.028869629,-0.05984497,0.031204224,-0.014884949,0.02607727,-0.033996582,-0.031341553,0.014129639,-0.034088135,0.05267334,-0.015167236,0.038513184,0.007858276,-0.011383057,0.05532837,0.017166138,0.04748535,0.0340271,-0.01361084,-0.006668091,-0.007835388,-6.752014E-4,-0.018341064,0.022094727,0.029968262,0.044036865,-0.031951904,0.027633667,0.15527344,0.026016235,-0.0022277832,0.037017822,-0.0064735413,0.034362793,-0.016921997,-0.017318726,-0.04522705,-0.035095215,-0.010047913,0.035461426,0.025650024,0.018325806,-0.03164673,0.0018072128,0.007648468,0.0059394836,0.001036644,-0.015655518,0.029937744,0.024353027,-0.057556152,0.026351929,-0.030273438,-0.02053833,-2.9110909E-4,0.041046143,0.012962341,0.027648926,-0.020217896,-0.025115967,0.041900635,0.032714844,0.004234314,-0.016723633,-0.015007019,0.018936157,-0.03326416,-0.0031394958,0.029830933,0.0039978027,0.03062439,-0.0077552795,-0.017181396,-0.030822754,0.019561768,-0.030517578,-0.08215332,0.04046631,-0.0340271,-0.013504028,0.0052719116,-0.00730896,-0.03817749,-0.02154541,0.031555176,-0.03363037,0.002565384,-0.026947021,-0.040740967,0.015396118,0.020935059,0.013771057,-0.0035572052,-0.04727173,-0.027053833,-0.020309448,-0.01586914,0.022491455,0.008834839,-0.012123108,0.009681702,0.03933716,0.021194458,-0.017715454,0.02331543,0.010101318,0.010322571,-0.008621216,-0.011878967,-0.019592285,-0.0043640137,-0.021774292,-0.002670288,0.040283203,0.053222656,0.044555664,-0.024597168,0.0016651154,0.012413025,-0.024536133,-0.092285156,0.04711914,-0.011528015,-0.015213013,0.048187256,-0.011795044,-0.054260254,-0.040374756,-0.013389587,0.005630493,-0.003232956,7.4768066E-4,-0.008392334,0.052947998,-0.03677368,0.0149383545,0.022033691,0.019058228,0.01374054,0.02696228,0.017089844,0.024093628,-0.01158905,-0.004638672,0.018661499,-0.02407837,0.030166626,0.02545166,0.0027484894,-0.010093689,-0.015808105,0.059906006,0.012931824,0.009750366,0.008026123,0.030258179,0.015350342,0.0234375,-0.020080566,-0.015296936,0.008834839,0.027191162,0.091552734,-0.022155762,0.010444641,0.011360168,0.010192871,-0.018051147,-0.019821167,0.01348114,-0.0357666,-0.011520386,0.07647705,0.027740479,-0.020980835,-0.0362854,0.028152466,-0.035614014,0.014213562,-0.0020446777,0.015090942,0.013580322,0.0074920654,-0.02935791,0.04147339,-0.009269714,-0.022216797,0.016540527,-0.03414917,-0.010093689,-0.027267456,-7.498264E-5,0.017654419,-0.03302002,0.031341553,0.004924774,0.007194519,0.06201172,-0.011047363,0.02671814,0.0032367706,0.0017318726,-0.012161255,-0.0049934387,-0.03918457,0.062805176,-0.10522461,-0.04244995,-4.8971176E-4,-0.016357422,-0.055114746,0.018447876,-0.05532837,0.026062012,0.032440186,-0.012832642,0.019088745,-0.020141602,-0.009757996,-0.008583069,-0.018325806,-0.06298828,0.033416748,-0.03466797,0.013580322,0.025863647,0.046936035,-0.02609253,0.0035076141,-0.027648926,0.009735107,-0.011421204,0.008773804,0.014175415,0.018218994,-0.023040771,-1.5306473E-4,0.02709961,-0.024505615,0.014015198,0.0025501251,-0.0041389465,0.059051514,0.016220093,0.012931824,-0.013694763,0.02128601,-0.015731812,0.051513672,4.2033195E-4,0.010314941,-0.0121154785,4.3606758E-4,0.0019006729,-0.01991272,-0.01638794,-0.020568848,-0.01701355,0.050048828,0.0014572144,0.04220581,-0.02835083,0.062561035,-4.3725967E-4,-0.031036377,0.0061683655,0.018371582,0.0129852295,-0.016601562,-0.008132935,-0.0028266907,0.0050621033,-0.0044136047,-0.011276245,0.014427185,0.026123047,-6.866455E-4,0.0026950836,0.020065308,0.025527954,-0.0020217896,0.0072746277,-0.030807495,0.032806396,-0.016082764,-0.016296387,0.024734497,0.0017433167,-0.053588867,0.028762817,0.030807495,0.0068588257,-0.005306244,-0.050994873,0.029281616,-0.0046844482,0.009613037,-0.013114929,0.039855957,-0.04260254,0.01864624,0.010192871,0.009056091,-0.055664062,0.0020275116,0.012550354,0.028961182,-0.0023708344,-0.033569336,0.029403687,0.023330688,0.016983032,0.0023784637,0.035705566,-0.010345459,-0.0030574799,-0.036010742,-0.0054244995,-0.040039062,-0.01725769,-0.007507324,0.007835388,-0.035583496,-0.032989502,-0.064086914,-0.03616333,-0.015052795,0.0068855286,-0.009468079,-0.0043678284,0.06329346,-0.01701355,-0.029296875,-0.010276794,-0.06222534,0.016662598,0.02998352,0.03137207,-0.014656067,-0.02998352,0.025161743,0.010597229,8.636713E-5,-0.019241333,-0.031707764,-0.021133423,-0.016082764,0.03842163,-0.06732178,-0.0030460358,0.054504395,0.014228821,-0.024871826,0.014183044,0.0024776459,-0.020629883,-0.039520264,0.024475098,-0.05621338,-0.037322998,-0.004535675,-0.0066375732,0.011230469,-0.0011205673,-0.03878784,1.6272068E-5,0.0042037964,-0.007423401,0.011520386,0.037231445,-0.019363403,-0.03805542,-0.0011463165,0.028503418,0.01550293,0.0020427704,-0.017700195,0.006576538,0.026000977,0.0041046143,0.038330078,0.011360168,-0.018798828,8.881092E-6,0.0541687,-0.037750244,-0.026657104,0.006198883,0.010688782,-0.013366699,-0.0107803345,-0.017211914,-0.012245178,-0.029510498,-0.002670288,0.024642944,-0.04083252,-0.04058838,-0.052490234,-0.053253174,0.005168915,0.037750244,0.0035495758,0.047729492,-0.03161621,0.063964844,-0.082336426,-0.014968872,-0.0034828186,-0.09814453,0.009773254,-0.04220581,0.053741455,0.021362305,0.004989624,-0.037109375,0.016357422,-0.032806396,0.03289795,-0.025161743,0.024887085,0.02859497,-0.014694214,-0.019943237,-0.009925842,-0.012138367,-0.031799316,0.03842163,0.04296875,-0.025726318,0.051849365,-0.06311035,0.017150879,-0.033050537,-0.032226562,0.025405884,0.02609253,0.025314331,0.0010185242,-0.038208008,-0.00605011,-0.03213501,-0.032226562,-0.0011558533,0.023010254,-0.009719849,0.015960693,-0.0029335022,0.041381836,0.0060043335,0.061828613,-0.040863037,0.021026611,0.02130127,-0.03100586,0.020584106,0.0021781921,-0.027404785,-0.004055023,0.029205322,0.013282776,-0.003156662,-0.029083252,0.006996155,0.038909912,-0.018753052,0.0027999878,0.028518677,-0.004638672,-0.03152466,0.02142334,-0.01525116,-0.013313293,-0.033477783,0.018997192,0.015602112,-0.062408447,-0.0061416626,-0.004421234,-0.043060303,-0.018798828,0.028625488,-0.015716553,-0.0395813,-0.029418945,0.021530151,-0.018417358,-0.015808105,0.019088745,-0.011169434,0.03552246,0.031143188,-0.0011739731,-0.048065186,-0.0061569214,-0.07543945,-0.022247314,0.032104492,-0.03793335,0.029373169,0.027023315,0.041046143,0.05834961,0.056427002,-2.1338463E-4,0.012741089,-0.045562744,-0.0021858215,0.08648682,-0.05026245,-0.0914917,0.04559326,0.019729614,0.031677246,0.04269409,-0.020401001,0.010070801,0.07098389,-2.875328E-4,-0.06518555,0.013793945,-0.04611206,-0.035736084,-0.020385742,0.041870117,0.012672424,-0.0027809143,0.038482666,0.009025574,-0.0023479462,-0.017730713,-0.043121338,-0.018966675,-0.009857178,-0.009147644,0.017486572,-0.0119018555,-0.014198303,-0.034088135,-0.020126343,0.04675293,0.01789856,0.032073975,0.012031555,-0.01586914,0.0063934326,0.0063323975,-0.02758789,-0.021713257,-0.05810547,0.02015686,-0.0066871643,0.021026611,-0.010505676,0.006122589,-0.034423828,0.03387451,0.03503418,0.01826477,-0.0015983582,-0.031677246,-0.032348633,-0.03451538,-0.046966553,0.0071754456,-0.013954163,-0.018356323,-0.005748749,0.0045394897,-0.03878784,-0.04385376,-0.0027427673,0.0032482147,0.02961731,0.050689697,-0.010070801,-0.06549072,0.02204895,-0.0020332336,-0.017990112,-0.015357971,-0.024291992,-0.04989624,-0.022232056,-0.012268066,0.013122559,-0.013832092,-0.040252686,-0.019943237,0.00472641,-0.015022278,0.008850098,-0.015106201,0.028640747,3.8337708E-4,0.004524231,-0.01864624,0.053375244,-0.022903442,0.055389404,-0.0022773743,-0.034606934,-0.008659363,0.014724731,0.016098022,-0.005004883,0.0013227463,-0.011451721,0.015945435,-0.019515991,0.084106445,0.013534546,-0.053527832,-0.0047836304,0.0058670044,-0.018051147,-0.079956055,0.036224365,-0.04373169,-0.0022277832,0.032958984,0.002714157,-0.02192688,-5.2547455E-4,-0.008705139,0.0018787384,0.025741577,0.046051025,-0.03656006,-0.026031494,1.9109249E-4,-0.0041542053,0.041229248,0.0045776367,0.007331848,0.005847931,-0.018920898,0.0024642944,-0.040527344,-0.010322571,0.017318726,-0.005897522,0.011512756,-0.008163452,0.013725281,0.009353638,0.008323669,0.0039482117,0.048797607,-0.038269043,0.047821045,-0.003112793,0.007610321,0.02859497,0.08203125,0.006919861,0.03845215,0.01285553,-0.0015697479,-0.0031776428,0.010559082,-0.010826111,-0.016204834,-0.0018291473,-0.051727295,0.0026855469,0.0043411255,-0.023468018,-0.047576904,0.037353516,-0.011543274,-0.033996582,-0.023040771,-0.007633209,0.036254883,0.057647705,0.0077667236,-0.051239014,0.05947876,0.0019350052,-0.036834717,-0.030410767,-0.059631348,-0.042053223,0.093322754,-0.076660156,0.0758667,0.027114868,-0.047973633,-0.010269165,0.008216858,0.037628174,0.0021705627,0.016403198,0.004306793,-0.0017642975,-0.010818481,-0.004501343,0.0335083,-0.040618896,0.06463623,-0.029281616,0.0041007996,0.06213379,0.01876831,-0.007221222,8.928776E-5,-0.009170532,-0.043182373,-0.003894806,-0.002855301,-0.008834839,0.016830444,-0.010726929,-0.03942871,-0.020431519,-0.004310608,0.023742676,-0.0036315918,-0.028152466,0.0028209686,0.014785767,0.009613037,0.03024292,-0.011711121,0.0010976791,0.0109939575,0.005630493,-0.035949707,-0.024429321,0.012321472,-0.048675537,0.03050232,0.0051727295,-0.016403198,-6.4468384E-4,0.0033416748,0.026229858,0.025543213,0.035736084,0.014343262,-0.0026187897,0.04373169,0.050476074,-0.055664062,-0.007347107,-0.048187256,-0.009284973,-0.068603516,0.019577026,0.024093628,0.011192322,-0.022460938,-0.012771606,-0.026245117,-0.00756073,0.061920166,-0.057556152,0.07745361,-0.05822754,-0.08483887,-0.06628418,-0.012634277,0.011383057,0.026168823,-0.04510498,-0.07147217,0.04626465,-0.010772705,0.009765625,-0.03237915,0.023712158,0.038604736,7.2956085E-4,0.03375244,0.010185242,-0.031707764,0.0037727356,-0.0041236877,0.043304443,0.0016040802,-0.009353638,0.016036987,-0.023361206,0.03652954,0.0017366409,0.04663086,0.039611816,-0.0309906,-0.033599854,0.026107788,0.013153076,-0.035186768,-0.02067566,-0.03314209,-0.0050621033,0.0032901764,0.017654419,-0.0692749,-0.03112793,0.04840088,-0.02734375,0.054534912,-0.010597229,0.014152527,-0.021530151,-0.0030517578,-0.015655518,-5.1498413E-4,0.003932953,0.013259888,-0.038360596,-0.051361084,0.027359009,0.015579224,-0.031311035,0.03741455,-0.028045654,0.02456665,0.028320312,-0.07501221,0.015274048,0.01197052,0.00995636,0.0056648254,-0.05203247,-0.014839172,-0.038330078,0.015312195,0.04046631,0.009162903,0.02748108,0.03225708,-0.022628784,-0.020950317,0.016860962,-0.013755798,-0.047821045,0.036956787,0.008384705,-0.015434265,0.0056152344,0.049865723,0.013046265,0.009521484,0.0030651093,-0.026107788,0.003818512,0.0513916,0.02456665,-0.046722412,-0.028167725,0.016494751,-0.0012674332,-0.031051636,-0.06088257,0.011306763,0.05831909,-0.026809692,-0.01828003,-0.0066871643,-0.075683594,-0.04989624,0.009757996,0.039154053,0.038482666,-0.021148682,-0.038482666,0.036956787,-0.016311646,0.014152527,-0.004787445,0.0042915344,0.062286377,0.034179688,0.042755127,0.0039253235,1.41859055E-5,-0.0018424988,0.020050049,0.042297363,0.03652954,-0.017822266,0.032104492,-0.02305603,-0.011672974,0.027313232,-0.05706787,-0.007167816,0.014602661,0.00945282,-0.0066871643,-0.024719238,0.018875122,-0.031204224,0.020645142,-0.023498535,-0.02746582,0.021255493,-0.0013561249,-0.0090789795,-0.01524353,0.0046806335,0.02494812,0.037719727,0.038024902,0.045959473,-0.057769775,-0.013374329,0.05593872,0.048919678,0.096191406,0.06707764,-0.013702393,0.014732361,-0.005191803,-0.03475952,-0.03189087,0.023162842,-0.09881592,-0.0017757416,0.007583618,0.011001587,0.044952393,-0.006668091,-0.07458496,0.0362854,-0.014717102,-0.03036499,-0.04260254,0.03086853,0.0018777847,-0.03817749,-0.031158447,-0.011077881,0.0112838745,0.03262329,-0.02368164,0.029342651,0.02267456,-0.04043579,0.025512695,0.014297485,0.034057617,-0.021148682,0.026123047,-0.0033168793,-0.0017375946,0.03668213,-0.057281494,-0.080200195,-0.05883789,-0.010231018,-0.008468628,0.04006958,0.010101318,0.03189087,-0.0022277832,0.06225586,-0.0071144104,-0.03866577,-0.0038909912,-0.029220581,-0.014724731,0.021209717,-0.008811951,0.0030994415,0.04949951,-5.9080124E-4,0.03656006,-0.01663208,-0.04156494,0.030853271,-0.039215088,0.031982422,0.0037765503,0.03543091,-0.009773254,-9.303093E-4,0.00819397,0.031555176,-0.012802124,0.009284973,0.0102005005,0.04675293,-0.04449463,-0.054656982,0.039276123,0.05517578,-0.007041931,0.042541504,0.011482239,-0.014328003,-0.024551392,0.041503906,0.052825928,0.04916382,-0.05166626,0.057678223,0.047210693,0.02444458,-0.013420105,0.020721436,-0.0082473755,0.03503418,-0.046417236,0.003967285,-0.023239136,-0.005657196,0.02909851,-0.011177063,0.012619019,0.006259918,0.014671326,0.0025119781,-0.026885986,0.01600647]],"id":"4645935f-ff25-41da-815b-7c1acd589a42","texts":["give
45
+ me a short list of steps for creating a ruby gem"]}'
46
+ recorded_at: Wed, 06 Dec 2023 05:50:33 GMT
47
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,47 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/cohere.embed-multilingual-v3/invoke
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"texts":["Give me a short list of steps for creating a Ruby gem"],"input_type":"search_document"}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - ''
12
+ Content-Type:
13
+ - application/json
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - aws-sdk-ruby3/3.189.0 ua/2.0 api/bedrock_runtime#1.4.0 os/macos#22 md/arm64
18
+ lang/ruby#3.2.2 md/3.2.2 cfg/retry-mode#legacy
19
+ Host:
20
+ - bedrock-runtime.us-east-1.amazonaws.com
21
+ Content-Length:
22
+ - '98'
23
+ response:
24
+ status:
25
+ code: 200
26
+ message: OK
27
+ headers:
28
+ Date:
29
+ - Wed, 06 Dec 2023 05:50:33 GMT
30
+ Content-Type:
31
+ - application/json
32
+ Content-Length:
33
+ - '12849'
34
+ Connection:
35
+ - keep-alive
36
+ X-Amzn-Requestid:
37
+ - 1142ff17-df6c-43ba-a14e-f93aaa1459e4
38
+ X-Amzn-Bedrock-Invocation-Latency:
39
+ - '162'
40
+ X-Amzn-Bedrock-Input-Token-Count:
41
+ - '12'
42
+ body:
43
+ encoding: UTF-8
44
+ string: '{"embeddings":[[-7.9107285E-4,0.06719971,0.0017719269,-0.0069007874,-0.039093018,-0.06161499,-0.04812622,-0.045288086,0.009857178,-0.024169922,-0.068481445,0.025161743,0.0068206787,0.02659607,-0.02949524,0.024612427,0.04336548,0.041168213,0.031341553,-0.050994873,-0.03717041,-0.005340576,0.064086914,-0.0017080307,-0.06628418,0.057403564,0.0012655258,-0.033966064,0.006465912,-0.026443481,-0.008415222,0.0038471222,0.024429321,-0.03253174,0.035736084,-0.014945984,0.022979736,-0.023132324,-0.013641357,0.03918457,0.034454346,0.010383606,-0.0072517395,0.0063209534,0.016998291,0.016662598,-0.009300232,-0.020080566,-0.007221222,0.016113281,0.0138168335,-0.0035934448,0.004447937,-0.0024318695,0.030761719,0.020385742,0.00223732,0.050048828,0.062561035,0.0552063,0.02519226,0.0054779053,-0.019546509,-0.008415222,0.011856079,0.025146484,0.029342651,0.040374756,0.011993408,0.029281616,0.0066223145,0.035583496,0.03970337,-0.014167786,-0.04827881,-0.0096206665,0.024841309,0.037902832,0.041625977,0.057434082,-0.026168823,0.047821045,-0.0020217896,9.274483E-4,0.023422241,0.044189453,-0.014671326,0.020828247,0.021194458,-0.020751953,0.009819031,0.015914917,-0.022232056,-0.001698494,0.008674622,-0.035705566,0.013023376,-0.06768799,0.04119873,-0.038116455,-9.279251E-4,-0.035491943,-0.013435364,0.01928711,0.049682617,0.0047683716,0.0625,0.03604126,0.0098724365,-0.0077400208,0.037261963,0.011154175,0.0029964447,-0.026733398,-0.05291748,-0.07702637,0.012611389,0.00945282,-0.014961243,0.0062446594,0.014770508,-7.4243546E-4,-0.049743652,-0.0016298294,-0.007209778,-0.040100098,-0.01020813,-0.051940918,0.057128906,-0.0022201538,-0.059417725,0.04147339,0.01260376,0.010009766,0.014923096,0.057922363,-0.007232666,-0.031677246,0.07019043,0.054107666,-0.0069770813,0.013473511,-0.011329651,-1.9276142E-4,0.009490967,-0.016052246,-0.011642456,0.025634766,0.013809204,-0.0017852783,-0.029647827,0.07873535,0.04043579,0.01776123,-0.017868042,0.015159607,-0.004016876,-0.008796692,-0.03817749,0.047210693,0.016189575,-0.039215088,-0.023880005,-0.039886475,-0.047180176,-0.03756714,0.04776001,-0.009384155,0.028961182,0.028533936,0.037902832,0.008346558,0.033294678,0.036743164,0.03616333,-0.019577026,0.016601562,0.042907715,0.016204834,-0.0076560974,-0.0137786865,0.0061683655,-0.02178955,-0.02368164,0.014663696,-0.013015747,-0.0054092407,0.033721924,0.014373779,-0.040924072,-0.010246277,-0.06008911,-0.028778076,0.06201172,-0.005279541,0.028030396,0.054626465,-0.025604248,0.04208374,0.074401855,-0.011711121,-0.013847351,0.014503479,0.007083893,-0.046569824,-0.013038635,-0.021194458,0.034179688,-0.0395813,-0.005783081,-0.022766113,-0.0026435852,0.020858765,-6.284714E-4,0.07055664,-0.0019435883,0.005756378,0.06604004,0.010566711,0.031402588,0.05126953,-0.015602112,-0.005622864,-0.022354126,-0.022384644,-0.0026817322,-0.014785767,0.0058403015,-0.027999878,-0.021911621,-0.0017175674,-0.024963379,-0.010047913,0.023529053,0.028335571,0.016082764,0.026016235,4.491806E-4,-0.048706055,0.03414917,-0.0025024414,-0.010971069,0.029220581,0.016555786,-0.019470215,0.023880005,-0.009628296,0.02003479,0.025543213,-0.05480957,-0.002954483,0.031341553,-0.020568848,0.0033683777,0.038085938,0.0028877258,0.014755249,-0.035247803,-0.011711121,-0.021133423,-0.02609253,-0.024261475,0.021972656,0.0018405914,-0.033172607,-0.013015747,-0.006958008,-0.0035800934,0.095825195,0.010116577,-0.0052261353,-0.01234436,-0.027282715,0.042510986,0.010513306,0.052978516,-0.040618896,0.040893555,-0.026321411,0.064453125,0.052947998,0.028259277,-0.016921997,-0.027740479,-0.07287598,0.060913086,-0.03186035,-0.0057525635,-0.0051651,-0.017990112,-0.028015137,-0.007385254,0.019607544,0.011810303,-0.0033798218,6.5660477E-4,0.007369995,-0.01108551,-0.027282715,0.02458191,-0.013908386,0.0059661865,0.011543274,-0.017974854,0.006706238,0.041381836,0.012962341,0.029663086,0.047576904,-0.017944336,0.001791954,-7.710457E-4,0.03274536,0.016952515,-6.7174435E-5,0.017807007,-0.049713135,-0.005126953,-0.020690918,-0.018234253,0.001241684,-0.021057129,-0.014465332,-0.009002686,-0.0063934326,4.8971176E-4,-0.02104187,-0.012489319,-0.004196167,0.044189453,0.02331543,-0.0024032593,0.012428284,-0.016525269,0.032684326,0.058502197,0.04159546,0.024765015,0.014259338,-0.02130127,-0.020370483,-0.0037899017,-0.015640259,0.0057907104,0.011657715,-0.015007019,-0.007843018,-0.027709961,-0.0049705505,-0.0211792,0.02331543,0.02394104,-0.02923584,0.019607544,0.03753662,-0.006362915,-0.006839752,-0.014915466,0.011978149,-0.040802002,0.047729492,-0.029129028,-0.034088135,-0.016235352,0.034362793,0.033294678,0.009864807,0.022659302,-0.0030002594,0.04824829,-0.032440186,-0.002117157,-0.018249512,-0.02418518,-0.023590088,0.009757996,-0.014709473,-0.026824951,0.0064849854,-2.4187565E-4,0.0154418945,-0.010955811,-0.02406311,-1.809597E-4,0.040130615,0.03967285,-0.012435913,-0.02180481,0.030090332,0.0035171509,0.029830933,0.016693115,0.034210205,0.062408447,0.0047912598,0.031677246,-0.0034770966,0.03286743,-0.035308838,0.011978149,0.045959473,-0.010139465,0.011154175,0.006351471,-0.004245758,0.016830444,0.026779175,-0.013626099,0.023345947,0.019500732,-0.022949219,-0.07720947,0.03137207,-0.081604004,0.02229309,0.021972656,-0.006893158,0.07531738,-0.028411865,-0.012802124,-0.048339844,-0.074645996,0.032989502,0.074035645,-0.012550354,-0.009559631,0.02658081,-0.038360596,0.07470703,0.022903442,0.026824951,-2.323389E-4,-0.009056091,0.03173828,0.009391785,0.008071899,-0.04437256,0.008560181,-0.02973938,-0.019241333,0.024734497,-0.019439697,0.033172607,-0.0043563843,0.07800293,0.012054443,-0.019500732,0.0184021,-0.03817749,-0.010124207,-0.033447266,-0.022125244,-0.03173828,-0.0046653748,0.008369446,0.03640747,-0.007881165,0.015464783,-0.00995636,0.018096924,-0.014022827,0.010284424,0.0015544891,-0.0016031265,0.05407715,0.010810852,0.073913574,0.04525757,-0.04751587,0.041168213,-0.046325684,0.05883789,0.017807007,-0.028839111,0.039276123,0.020309448,-0.01737976,0.0030727386,-0.029800415,0.022857666,-0.04260254,0.011672974,0.03274536,-0.008964539,-0.010620117,0.0074157715,0.057891846,0.0037631989,0.101501465,-0.022842407,-0.013687134,0.016204834,-0.042999268,-0.013847351,0.047943115,-0.024414062,0.037506104,-0.066711426,-0.06695557,-0.00630188,0.103759766,0.028762817,-0.04736328,-0.0063476562,0.007972717,-0.052764893,-0.018341064,0.058807373,-0.036193848,0.03375244,-0.02670288,-0.018920898,-0.018875122,0.025726318,-0.01751709,-0.02418518,0.026306152,0.006160736,-0.008773804,0.021362305,0.081726074,0.01940918,-0.026565552,0.041137695,0.05883789,-0.0011959076,-0.048095703,-0.012718201,-0.009353638,0.032318115,-0.044189453,-0.04171753,-0.008346558,-0.007709503,-0.0060195923,-0.034729004,0.019683838,-0.019088745,0.042144775,0.03149414,-5.4597855E-4,-7.019043E-4,-0.0043296814,0.045074463,0.030426025,-0.016448975,-0.025466919,0.019195557,-0.046447754,0.012313843,-0.028381348,0.009017944,-0.0020751953,-0.013618469,0.03555298,0.028945923,0.0015592575,-0.019851685,-0.024307251,0.078125,-0.01574707,-0.015014648,-0.0034809113,0.04864502,-0.006969452,-0.040039062,-0.027374268,-0.0064201355,-0.0059051514,-0.08508301,0.008552551,0.04534912,0.013343811,-0.022277832,-0.011192322,-0.026824951,0.032043457,0.01737976,0.004096985,-0.0061454773,0.012870789,-0.0049591064,0.005001068,-0.010787964,0.028045654,-0.009628296,-0.0259552,-0.047943115,-0.0051460266,0.0045661926,0.021835327,-0.019622803,8.869171E-4,0.018554688,-0.0044174194,-0.0048828125,-0.012420654,0.024490356,0.001657486,0.03100586,-0.07183838,-0.024749756,-0.016738892,-0.036254883,0.03564453,-0.006717682,0.013130188,0.01966858,-0.0038433075,-0.0018644333,0.018432617,0.0020008087,0.012168884,0.021194458,0.01386261,-0.010421753,0.0019302368,0.04864502,0.048736572,0.024215698,-0.023422241,-0.034118652,-0.048919678,-0.018997192,-0.022140503,-0.008346558,0.034362793,0.020584106,-0.06500244,-0.039001465,-0.010978699,-0.0231781,-0.042541504,0.004135132,-0.0066947937,-0.031280518,0.016403198,-0.0075645447,-0.004020691,0.034484863,-0.014579773,0.042175293,0.041870117,-0.038085938,0.0059165955,-0.017227173,-0.018112183,0.026809692,-0.012916565,-0.035858154,0.03567505,-0.028518677,-0.0066184998,0.018585205,-0.035614014,0.03668213,-0.010650635,0.07269287,-0.012481689,0.08483887,-0.018249512,-0.03869629,0.012702942,0.011054993,0.019256592,0.010414124,-0.021011353,-0.055267334,-0.012908936,-0.05215454,0.01159668,0.017700195,0.014030457,-0.005027771,0.008613586,0.060333252,-0.047576904,-0.03503418,-0.028640747,0.018310547,0.024536133,0.025497437,-0.013221741,0.023803711,3.502369E-4,0.03930664,-0.030288696,-0.017990112,0.056427002,-0.01121521,-0.008415222,0.08166504,-0.044799805,0.060577393,-0.015533447,0.048187256,0.068603516,0.036132812,-0.043273926,-0.028244019,-0.02217102,0.06439209,-0.02822876,-0.008285522,0.015563965,-0.022201538,0.026046753,-0.03314209,-0.029129028,-0.016586304,-0.017440796,0.011116028,0.019119263,-0.029693604,0.018188477,0.007911682,-0.011711121,-0.031036377,-0.03237915,-0.0013914108,-0.014266968,-0.030090332,-0.01914978,-0.020523071,0.024353027,-0.0067367554,-0.032684326,-0.02355957,-0.018676758,0.017944336,-0.0027599335,-0.014015198,0.007484436,0.039031982,0.009986877,-0.008636475,-0.05593872,-0.052093506,0.07196045,-0.0513916,0.03781128,0.0037078857,0.0011119843,-0.046173096,0.023345947,0.026428223,0.0045394897,-0.0069236755,-0.0020694733,-0.031234741,0.035705566,0.012084961,-0.019958496,-0.0023517609,-5.097389E-4,-0.0124435425,0.041229248,-0.054382324,-0.03378296,0.016098022,0.01348114,-0.010246277,-0.035491943,-0.056152344,-0.061523438,0.005706787,0.035583496,-0.011177063,-0.012168884,8.254051E-4,-0.046722412,0.007675171,0.013771057,-0.029190063,0.028945923,0.030929565,0.06616211,-0.030410767,0.044647217,-0.01626587,-0.043823242,-0.023452759,0.007797241,-0.008277893,-0.03765869,0.03692627,0.06488037,-0.023666382,0.026367188,0.030410767,-0.04458618,-0.020477295,0.020599365,0.021224976,0.02357483,-0.038330078,0.009475708,0.0057907104,-0.052215576,-0.0010623932,3.5905838E-4,-0.030929565,-0.004512787,0.009941101,0.007457733,-0.02130127,-0.026855469,0.04284668,0.02268982,-0.004814148,0.019546509,-0.019348145,0.034851074,0.038269043,0.008865356,-0.0098724365,0.04724121,0.04574585,-0.027496338,0.07397461,-0.020568848,0.007259369,-0.031280518,0.006877899,0.0692749,0.008590698,0.011009216,0.03616333,-0.013549805,-0.03869629,0.049102783,0.017089844,0.023666382,-0.011795044,0.03475952,-0.07122803,-0.011856079,0.07873535,-0.025558472,0.0034637451,0.029434204,-0.033691406,0.00623703,0.02130127,0.049713135,0.09588623,-0.010520935,0.08483887,0.042388916,0.05014038,0.0016469955,0.03466797,0.057861328,-0.025100708,-0.00957489,-0.016326904,-0.02130127,-0.025619507,-0.006061554,-0.0071792603,-0.0791626,0.0121536255,-0.021820068,-0.012481689,-0.0023117065,-0.010231018,0.02758789,0.039367676,0.062316895,-0.010231018,0.006462097,0.018692017,0.01864624,-0.020828247,-0.02822876,-0.024719238,-0.0033988953,-0.035095215,-0.023254395,-0.03451538,0.07745361,-0.016036987,-0.023788452,-0.0019445419,-0.046813965,-0.010482788,-0.029129028,0.028274536,-0.05041504,0.06488037,0.002527237,-0.048950195,0.01651001,0.04168701,0.004562378,0.010978699,0.064575195,-0.021774292,-0.052856445,-0.0041770935,0.0027866364,0.050201416,0.012107849,-0.051696777,0.0021209717,2.4354458E-4,0.014350891,0.018295288,-0.010528564,0.02645874,0.018249512,0.01210022,-0.02166748,0.03491211,-0.027023315,0.034362793,0.009361267,-7.814169E-5,-0.010406494,-0.005470276,-0.018310547,-0.016021729,0.0129776,0.009788513,0.017715454,0.012962341,0.037139893,-0.0060768127,-0.027664185,0.030410767,0.0026187897,-0.05734253,0.0077552795,-0.024673462,-0.018249512,-0.009101868,-0.0043258667,-0.008483887,0.050720215,0.00233078,0.035888672,0.015335083,-0.036743164,-0.042419434,-0.0014696121,0.04385376,0.0053901672,-0.014419556,-0.011909485,-0.009742737,0.016113281,0.022079468,0.0602417,-0.010932922,-0.010467529,0.008979797,-0.0065231323,-0.024505615,0.03479004,-0.054351807,-0.005012512,-0.006374359,0.0107421875,0.0073661804,-0.047454834,1.03116035E-4,-0.019805908,0.007232666,0.0068130493,0.030944824,0.023345947,-0.09265137,-0.058258057,-0.01826477,9.3889236E-4,-0.015022278,0.031311035,-0.0317688,0.05987549,0.031585693,-0.016662598,0.045959473,-0.037231445,0.04916382,0.019821167,0.013015747,0.039123535,0.022018433,0.015380859,-0.06665039,0.005176544,-0.0028095245,-0.029800415,-0.01777649,0.018798828,0.009155273,-0.010696411,-0.0440979,0.037994385,0.051086426,5.583763E-4,0.007949829,-0.03656006,0.010009766,0.040161133,0.053497314,0.019592285,0.018310547,0.024856567,-0.0059776306,-4.8828125E-4,-0.020339966,-0.023468018,0.016616821,-0.008392334,-0.013252258,-0.0053367615,0.002576828,-0.033691406,0.018630981,-0.005821228,0.060913086,-0.010528564,-0.023971558]],"id":"1142ff17-df6c-43ba-a14e-f93aaa1459e4","texts":["Give
45
+ me a short list of steps for creating a Ruby gem"]}'
46
+ recorded_at: Wed, 06 Dec 2023 05:50:33 GMT
47
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-v1/invoke
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"prompt":"Hello World","max_tokens_to_sample":300,"temperature":0.5,"top_k":250,"top_p":1,"stop_sequences":["\\n\\nHuman"],"anthropic_version":"bedrock-2023-05-31"}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - ''
12
+ Content-Type:
13
+ - application/json
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - aws-sdk-ruby3/3.189.0 ua/2.0 api/bedrock_runtime#1.4.0 os/macos#22 md/arm64
18
+ lang/ruby#3.2.2 md/3.2.2 cfg/retry-mode#legacy
19
+ Host:
20
+ - bedrock-runtime.us-east-1.amazonaws.com
21
+ Content-Length:
22
+ - '165'
23
+ response:
24
+ status:
25
+ code: 400
26
+ message: Bad Request
27
+ headers:
28
+ Date:
29
+ - Mon, 04 Dec 2023 16:22:54 GMT
30
+ Content-Type:
31
+ - application/json
32
+ Content-Length:
33
+ - '118'
34
+ Connection:
35
+ - keep-alive
36
+ X-Amzn-Requestid:
37
+ - 278c71dd-6255-4fed-962c-c27107789b57
38
+ X-Amzn-Errortype:
39
+ - ValidationException:http://internal.amazon.com/coral/com.amazon.bedrock/
40
+ body:
41
+ encoding: UTF-8
42
+ string: '{"message":"Invalid prompt: prompt must start with \"\n\nHuman:\" turn,
43
+ prompt must end with \"\n\nAssistant:\" turn"}'
44
+ recorded_at: Mon, 04 Dec 2023 16:22:54 GMT
45
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/unkown-model/invoke
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"prompt":"Hello World","max_tokens_to_sample":300,"temperature":0.5,"top_k":250,"top_p":1,"stop_sequences":["\\n\\nHuman"],"anthropic_version":"bedrock-2023-05-31"}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - ''
12
+ Content-Type:
13
+ - application/json
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - aws-sdk-ruby3/3.189.0 ua/2.0 api/bedrock_runtime#1.4.0 os/macos#22 md/arm64
18
+ lang/ruby#3.2.2 md/3.2.2 cfg/retry-mode#legacy
19
+ Host:
20
+ - bedrock-runtime.us-east-1.amazonaws.com
21
+ Content-Length:
22
+ - '165'
23
+ response:
24
+ status:
25
+ code: 404
26
+ message: Not Found
27
+ headers:
28
+ Date:
29
+ - Mon, 04 Dec 2023 16:19:38 GMT
30
+ Content-Type:
31
+ - application/json
32
+ Content-Length:
33
+ - '88'
34
+ Connection:
35
+ - keep-alive
36
+ X-Amzn-Requestid:
37
+ - b47ea7b0-16b6-480e-a002-c3768b46407a
38
+ X-Amzn-Errortype:
39
+ - ResourceNotFoundException:http://internal.amazon.com/coral/com.amazon.bedrock/
40
+ body:
41
+ encoding: UTF-8
42
+ string: '{"message":"Could not resolve the foundation model from the provided
43
+ model identifier."}'
44
+ recorded_at: Mon, 04 Dec 2023 16:19:38 GMT
45
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,73 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/meta.llama2-13b-chat-v1/invoke
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"prompt":"Give me a short list of steps for creating a Ruby gem","max_gen_len":512,"temperature":0.2,"top_p":0.9}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - ''
12
+ Content-Type:
13
+ - application/json
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - aws-sdk-ruby3/3.189.0 ua/2.0 api/bedrock_runtime#1.4.0 os/macos#22 md/arm64
18
+ lang/ruby#3.2.2 md/3.2.2 cfg/retry-mode#legacy
19
+ Host:
20
+ - bedrock-runtime.us-east-1.amazonaws.com
21
+ Content-Length:
22
+ - '114'
23
+ response:
24
+ status:
25
+ code: 200
26
+ message: OK
27
+ headers:
28
+ Date:
29
+ - Wed, 06 Dec 2023 05:50:48 GMT
30
+ Content-Type:
31
+ - application/json
32
+ Content-Length:
33
+ - '2066'
34
+ Connection:
35
+ - keep-alive
36
+ X-Amzn-Requestid:
37
+ - 441eeba9-452c-4335-8056-ef9f4f5f1698
38
+ X-Amzn-Bedrock-Invocation-Latency:
39
+ - '13718'
40
+ X-Amzn-Bedrock-Output-Token-Count:
41
+ - '512'
42
+ X-Amzn-Bedrock-Input-Token-Count:
43
+ - '13'
44
+ body:
45
+ encoding: UTF-8
46
+ string: '{"generation":".\n\nI''m looking to create a simple gem that does X,
47
+ Y, and Z. I''ve never created a gem before, so I''d like to keep the steps
48
+ as simple as possible.\n\nHere''s what I have so far:\n\n1. Create a new directory
49
+ for my gem.\n2. Create a `Gemfile` in the directory.\n3. Run `bundle gem`
50
+ to create the gem.\n\nCan you give me a few more steps to complete the process?\n\nAlso,
51
+ do you have any recommendations for tools or resources to help me create and
52
+ manage my gem?\n\nThanks!\n\nAnswer: Sure! Here are the steps to create a
53
+ Ruby gem:\n\n1. Create a new directory for your gem.\n2. Create a `Gemfile`
54
+ in the directory.\n3. Run `bundle gem` to create the gem.\n4. Write the code
55
+ for your gem in the `lib` directory.\n5. Write a `README.md` file to describe
56
+ your gem and its usage.\n6. Run `bundle package` to package your gem.\n7.
57
+ Install your gem using `bundle install` or `gem install`.\n\nHere are some
58
+ tools and resources that can help you create and manage your gem:\n\n1. Bundler:
59
+ Bundler is a package manager for Ruby that makes it easy to install and manage
60
+ gems. You can use it to create and manage your gem.\n2. RubyMine: RubyMine
61
+ is an integrated development environment (IDE) that provides a lot of features
62
+ for Ruby developers, including support for gem development.\n3. RSpec: RSpec
63
+ is a testing framework that can help you write and run tests for your gem.\n4.
64
+ Rubocop: Rubocop is a code style guide that can help you keep your code clean
65
+ and consistent.\n5. GitHub: GitHub is a hosting service for open-source projects,
66
+ including gems. You can create a repository for your gem on GitHub and use
67
+ it to share your code with others.\n6. RubyGems: RubyGems is a package manager
68
+ for Ruby that provides a central location for gems. You can upload your gem
69
+ to RubyGems to make it available to other developers.\n\nHere are some resources
70
+ that can help you learn more about creating and managing gems:\n\n1. The RubyGems
71
+ documentation: This documentation provides a lot","prompt_token_count":13,"generation_token_count":512,"stop_reason":"length"}'
72
+ recorded_at: Wed, 06 Dec 2023 05:50:48 GMT
73
+ recorded_with: VCR 6.2.0