ai21 0.2.0 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c3de47196822dfd0be6702f363cf4e662891f5ad9398064cdb2eee45d91756d
4
- data.tar.gz: bbb4dd92c5ab9f023b3113b9f1b1ecdad55839c2f9ffc26acef1d3eb536fe7f8
3
+ metadata.gz: 5215852a66432ed4fd3f8f1577e01f92aaccc2afd141728ef1b26a694c4c018b
4
+ data.tar.gz: 5adfec11c0ab7504bce0d31816228678f4f32573be47c167acdf622f0521adf4
5
5
  SHA512:
6
- metadata.gz: b2218a7c4179ba7e3d9cc2d4c3168c9b83b11cf983d37e1b28bc13108d06a315656e493d9a2f8d1971a54eaa49d32362bf89f9741dcd16e9d8709fa7585b6564
7
- data.tar.gz: 4854f7b1c1323f7b8155c32cc0e9292411e5bdded311160038bba3b6a6b127ab69aeeff0fc4c162ca77af4ab033f297036556ad80a03c9979a3a58ac89ab8eac
6
+ metadata.gz: 6ff6db10c500f5f770ad45f6dbc05b03afce008b7ce0f0c062077d3e500295a57a818547223067adc2475165d7e86b39ff3b915cb65c7379f24c5acc1fd4ee44
7
+ data.tar.gz: 9f0eda1cd97e621d7237d1fef349cda23b4047a0a7bf4c0706f3482df2bd32e44669bf6aeb39f131f0ad5b4063bf074d3b521f1ec0980330f39a5a43bfbdefd7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ai21 (0.2.0)
4
+ ai21 (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -78,6 +78,11 @@ client.summarize("Long text that requires summarization ...")
78
78
  client.answer("what is the capital of France?", "Capital of France is the city called Paris")
79
79
  ```
80
80
 
81
+ #### Tokenize
82
+ ```ruby
83
+ client.tokenize("Lorem ipsum long long tokens!")
84
+ ```
85
+
81
86
  ## Development
82
87
 
83
88
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/lib/ai21/client.rb CHANGED
@@ -48,6 +48,10 @@ module AI21
48
48
  AI21::Client.post("/experimental/answer", {question: question, context: context})
49
49
  end
50
50
 
51
+ def tokenize(text)
52
+ AI21::Client.post("/tokenize", {text: text})
53
+ end
54
+
51
55
  def dataset
52
56
  @dataset ||= AI21::Dataset.new
53
57
  end
data/lib/ai21/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AI21
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ai21
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Chaplinsky
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-01 00:00:00.000000000 Z
11
+ date: 2023-06-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby client for AI21 Studio API.
14
14
  email: