aleph-alpha-ruby 0.0.1 → 0.0.2

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: af7b9ee5555b431b4c6c596e2a11c44a832cc2ed4d46ae392d4f2cf8c0dd47b9
4
+ data.tar.gz: ebb45a0aa3845b43abf1d98b1388ceb7a7570d6484da57bc9d9b97fd3aa5fd84
5
5
  SHA512:
6
- metadata.gz: 02a9ddf75c2b9f79fe44d161af033b1d24111201a6e186f8e42540ace2442556301fd0a2e43f25911473f585dc1c3a484fd20ca351f158eb619711a007b8c3a9
7
- data.tar.gz: c8e4161f1b032561b2e3c1a650e672d66d3aacab0315764288c8d95e4ee4ba0b6f0f4e21652db48285b024349e60d2211eb2ed8578f71eba1fc89cef01c628eb
6
+ metadata.gz: a0bd39fef2873004aa4b5fb15d0f0427d296db28b1780a6d72ab34351dea04bfa299b3ebae927a7f7c8b88c88697bfd8d71ef7a36a3faa723d33384e26fa8f9c
7
+ data.tar.gz: e884b1a3201df383cdbf69641cb4a6738c10696a35f92326ea5c4d4b333236ef603773eac8f00a3f0bcce1ec9a98895683b80605797c4b2082f242a860c29fdc
data/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ 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.2] - 2023-06-10
9
+
10
+ ### Added
11
+
12
+ - Update dependencies
13
+ - Update fixtures and tests
14
+
8
15
  ## [0.0.1] - 2023-05-21
9
16
 
10
17
  ### Added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
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
@@ -14,19 +14,21 @@ GEM
14
14
  rexml
15
15
  diff-lcs (1.5.0)
16
16
  dotenv (2.8.1)
17
- faraday (2.7.4)
17
+ faraday (2.7.6)
18
18
  faraday-net_http (>= 2.0, < 3.1)
19
19
  ruby2_keywords (>= 0.0.4)
20
20
  faraday-net_http (3.0.2)
21
21
  hashdiff (1.0.1)
22
22
  json (2.6.3)
23
23
  parallel (1.23.0)
24
- parser (3.2.2.1)
24
+ parser (3.2.2.3)
25
25
  ast (~> 2.4.1)
26
+ racc
26
27
  public_suffix (5.0.1)
28
+ racc (1.7.0)
27
29
  rainbow (3.1.1)
28
30
  rake (13.0.6)
29
- regexp_parser (2.8.0)
31
+ regexp_parser (2.8.1)
30
32
  rexml (3.2.5)
31
33
  rspec (3.12.0)
32
34
  rspec-core (~> 3.12.0)
@@ -41,7 +43,7 @@ GEM
41
43
  diff-lcs (>= 1.2.0, < 2.0)
42
44
  rspec-support (~> 3.12.0)
43
45
  rspec-support (3.12.0)
44
- rubocop (1.51.0)
46
+ rubocop (1.52.0)
45
47
  json (~> 2.3)
46
48
  parallel (~> 1.10)
47
49
  parser (>= 3.2.0.0)
@@ -51,7 +53,7 @@ GEM
51
53
  rubocop-ast (>= 1.28.0, < 2.0)
52
54
  ruby-progressbar (~> 1.7)
53
55
  unicode-display_width (>= 2.4.0, < 3.0)
54
- rubocop-ast (1.28.1)
56
+ rubocop-ast (1.29.0)
55
57
  parser (>= 3.2.1.0)
56
58
  ruby-progressbar (1.13.0)
57
59
  ruby2_keywords (0.0.5)
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.2".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.2
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-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday