Skip to content

Commit af29521

Browse files
WIP
1 parent 7ada4b1 commit af29521

File tree

5 files changed

+42
-14
lines changed

5 files changed

+42
-14
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,40 @@ client = Cohere::Client.new(
2828
api_key: ENV['COHERE_API_KEY']
2929
)
3030
```
31+
### Generate
32+
```ruby
33+
client.generate()
34+
```
35+
36+
### Embed
37+
```ruby
38+
client.embed()
39+
```
40+
41+
### Classify
42+
```ruby
43+
client.classify()
44+
```
45+
46+
### Tokenize
47+
```ruby
48+
client.tokenize()
49+
```
50+
51+
### Detokenize
52+
```ruby
53+
client.detokenize()
54+
```
55+
56+
### Detect language
57+
```ruby
58+
client.detect_language()
59+
```
60+
61+
### Summarize
62+
```ruby
63+
client.summarize()
64+
```
3165

3266
## Development
3367

lib/cohere.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ module Cohere
66
class Error < StandardError; end
77
# Your code goes here...
88

9-
autoload :Base, "cohere/base"
109
autoload :Client, "cohere/client"
1110
end

lib/cohere/base.rb

Lines changed: 0 additions & 11 deletions
This file was deleted.

lib/cohere/client.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# frozen_string_literal: true
22

33
require "faraday"
4-
require "graphlient"
54

65
module Weaviate
76
class Client
8-
attr_reader :api_key
7+
attr_reader :api_key, :connection
98

109
ENDPOINT_URL = "https://api.cohere.ai/v1"
1110

spec/cohere/client_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
require "spec_helper"
4+
5+
RSpec.describe Cohere::Client do
6+
let(:instance) { described_class.new(api_key: "123") }
7+
end

0 commit comments

Comments
 (0)