aleph-alpha-ruby 0.0.1 → 0.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e249112ecb4fc8fd2f5e03c38011c806b663bbc73cf057205976a71ba7962cd3
4
- data.tar.gz: e929f9628d68a6dc53d63dc25cd0ba7b193a48adb1fe398e7425b77b11540f1e
3
+ metadata.gz: 2fe5c71bccb2e073f1a1e3e5645670c0d2574c597861951d0d408ba4d87ef71c
4
+ data.tar.gz: 29aa2c172537f3b00ee61aaa8a8bc4d581cbddb0012d80a24e6c6710c7ca0fea
5
5
  SHA512:
6
- metadata.gz: 02a9ddf75c2b9f79fe44d161af033b1d24111201a6e186f8e42540ace2442556301fd0a2e43f25911473f585dc1c3a484fd20ca351f158eb619711a007b8c3a9
7
- data.tar.gz: c8e4161f1b032561b2e3c1a650e672d66d3aacab0315764288c8d95e4ee4ba0b6f0f4e21652db48285b024349e60d2211eb2ed8578f71eba1fc89cef01c628eb
6
+ metadata.gz: 3d85a3450a420623f410b50b345851f50c9b7ac066024a4eea1e3fb83a573672e96fce58126324efcec1bee39dfcd12b0af80ddcf0fcf7f794c1e413a21e57d2
7
+ data.tar.gz: 97273015c5c9dc4e9a12c2798079ad98169741b26efc1e404908013c3ccfcbfbb6faecf1df8e4c2058d823c2307ecd976c148f064ebaa1424ba90884d877391a
data/CHANGELOG.md CHANGED
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.0.3] - 2023-10-29
9
+
10
+ ### Added
11
+
12
+ - Update dependencies
13
+ - Update fixtures and tests
14
+
15
+ ## [0.0.2] - 2023-06-10
16
+
17
+ ### Added
18
+
19
+ - Update dependencies
20
+ - Update fixtures and tests
21
+
8
22
  ## [0.0.1] - 2023-05-21
9
23
 
10
24
  ### Added
data/Gemfile.lock CHANGED
@@ -1,33 +1,38 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aleph-alpha-ruby (0.0.1)
4
+ aleph-alpha-ruby (0.0.2)
5
5
  faraday (>= 1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- addressable (2.8.4)
10
+ addressable (2.8.5)
11
11
  public_suffix (>= 2.0.2, < 6.0)
12
12
  ast (2.4.2)
13
+ base64 (0.1.1)
13
14
  crack (0.4.5)
14
15
  rexml
15
16
  diff-lcs (1.5.0)
16
17
  dotenv (2.8.1)
17
- faraday (2.7.4)
18
+ faraday (2.7.11)
19
+ base64
18
20
  faraday-net_http (>= 2.0, < 3.1)
19
21
  ruby2_keywords (>= 0.0.4)
20
22
  faraday-net_http (3.0.2)
21
23
  hashdiff (1.0.1)
22
24
  json (2.6.3)
25
+ language_server-protocol (3.17.0.3)
23
26
  parallel (1.23.0)
24
- parser (3.2.2.1)
27
+ parser (3.2.2.4)
25
28
  ast (~> 2.4.1)
26
- public_suffix (5.0.1)
29
+ racc
30
+ public_suffix (5.0.3)
31
+ racc (1.7.1)
27
32
  rainbow (3.1.1)
28
- rake (13.0.6)
29
- regexp_parser (2.8.0)
30
- rexml (3.2.5)
33
+ rake (13.1.0)
34
+ regexp_parser (2.8.2)
35
+ rexml (3.2.6)
31
36
  rspec (3.12.0)
32
37
  rspec-core (~> 3.12.0)
33
38
  rspec-expectations (~> 3.12.0)
@@ -37,25 +42,26 @@ GEM
37
42
  rspec-expectations (3.12.3)
38
43
  diff-lcs (>= 1.2.0, < 2.0)
39
44
  rspec-support (~> 3.12.0)
40
- rspec-mocks (3.12.5)
45
+ rspec-mocks (3.12.6)
41
46
  diff-lcs (>= 1.2.0, < 2.0)
42
47
  rspec-support (~> 3.12.0)
43
- rspec-support (3.12.0)
44
- rubocop (1.51.0)
48
+ rspec-support (3.12.1)
49
+ rubocop (1.57.2)
45
50
  json (~> 2.3)
51
+ language_server-protocol (>= 3.17.0)
46
52
  parallel (~> 1.10)
47
- parser (>= 3.2.0.0)
53
+ parser (>= 3.2.2.4)
48
54
  rainbow (>= 2.2.2, < 4.0)
49
55
  regexp_parser (>= 1.8, < 3.0)
50
56
  rexml (>= 3.2.5, < 4.0)
51
- rubocop-ast (>= 1.28.0, < 2.0)
57
+ rubocop-ast (>= 1.28.1, < 2.0)
52
58
  ruby-progressbar (~> 1.7)
53
59
  unicode-display_width (>= 2.4.0, < 3.0)
54
- rubocop-ast (1.28.1)
60
+ rubocop-ast (1.30.0)
55
61
  parser (>= 3.2.1.0)
56
62
  ruby-progressbar (1.13.0)
57
63
  ruby2_keywords (0.0.5)
58
- unicode-display_width (2.4.2)
64
+ unicode-display_width (2.5.0)
59
65
  vcr (6.1.0)
60
66
  webmock (3.18.1)
61
67
  addressable (>= 2.8.0)
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Aleph Alpha Ruby Client
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/aleph-alpha-ruby.svg)](https://badge.fury.io/rb/aleph-alpha-ruby)
4
+
3
5
  <p align="center">
4
6
  <img src="https://i.imgur.com/FSM2NNV.png" width="50%" />
5
7
  </p>
@@ -155,10 +157,10 @@ client.completions(
155
157
  #### Embeddings
156
158
 
157
159
  ```ruby
158
- client.embeddings(
160
+ response = client.embeddings(
159
161
  parameters: {
160
- model: "model name",
161
- prompt: "some text",
162
+ model: "luminous-base",
163
+ prompt: "An apple a day keeps the doctor away.",
162
164
  layers: [
163
165
  0,
164
166
  1
@@ -169,6 +171,12 @@ client.embeddings(
169
171
  ]
170
172
  }
171
173
  )
174
+
175
+ # => Index 0 corresponds to the word embeddings used as input to the first transformer layer
176
+ puts response.dig("embeddings", "layer_0", "max")
177
+
178
+ # => Index 1 corresponds to the hidden state as output by the first transformer layer
179
+ puts response.dig("embeddings", "layer_1", "max")
172
180
  ```
173
181
 
174
182
  #### Semantic Embeddings
@@ -1,3 +1,3 @@
1
1
  module AlephAlpha
2
- VERSION = "0.0.1".freeze
2
+ VERSION = "0.0.3".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aleph-alpha-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sascha Korth
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-21 00:00:00.000000000 Z
11
+ date: 2023-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday