aleph-alpha-ruby 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +8 -6
- data/README.md +11 -3
- data/lib/aleph-alpha/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af7b9ee5555b431b4c6c596e2a11c44a832cc2ed4d46ae392d4f2cf8c0dd47b9
|
4
|
+
data.tar.gz: ebb45a0aa3845b43abf1d98b1388ceb7a7570d6484da57bc9d9b97fd3aa5fd84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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: "
|
161
|
-
prompt: "
|
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
|
data/lib/aleph-alpha/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2023-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|