README.md in cohere-ai-1.0.2 vs README.md in cohere-ai-1.1.0
- old
+ new
@@ -7,11 +7,11 @@
> _This Gem is designed to provide low-level access to Cohere AI, enabling people to build abstractions on top of it. If you are interested in more high-level abstractions or more user-friendly tools, you may want to consider [Nano Bots](https://github.com/icebaker/ruby-nano-bots) 💎 🤖._
## TL;DR and Quick Start
```ruby
-gem 'cohere-ai', '~> 1.0.2'
+gem 'cohere-ai', '~> 1.1.0'
```
```ruby
require 'cohere-ai'
@@ -44,56 +44,57 @@
## Index
- [TL;DR and Quick Start](#tldr-and-quick-start)
- [Index](#index)
- [Setup](#setup)
- - [Installing](#installing)
- - [Credentials](#credentials)
+ - [Installing](#installing)
+ - [Credentials](#credentials)
- [Usage](#usage)
- - [Client](#client)
- - [Custom Address](#custom-address)
- - [Methods](#methods)
- - [chat](#chat)
- - [Without Streaming Events](#without-streaming-events)
- - [Receiving Stream Events](#receiving-stream-events)
- - [generate](#generate)
- - [embed](#embed)
- - [rerank](#rerank)
- - [classify](#classify)
- - [detect_language](#detect_language)
- - [summarize](#summarize)
- - [tokenize](#tokenize)
- - [detokenize](#detokenize)
- - [Datasets](#datasets)
- - [Connectors](#connectors)
- - [Streaming and Server-Sent Events (SSE)](#streaming-and-server-sent-events-sse)
- - [Server-Sent Events (SSE) Hang](#server-sent-events-sse-hang)
- - [Back-and-Forth Conversations](#back-and-forth-conversations)
- - [New Functionalities and APIs](#new-functionalities-and-apis)
- - [Request Options](#request-options)
- - [Timeout](#timeout)
- - [Error Handling](#error-handling)
- - [Rescuing](#rescuing)
- - [For Short](#for-short)
- - [Errors](#errors)
+ - [Client](#client)
+ - [Custom Address](#custom-address)
+ - [Methods](#methods)
+ - [chat](#chat)
+ - [Without Streaming Events](#without-streaming-events)
+ - [Receiving Stream Events](#receiving-stream-events)
+ - [generate](#generate)
+ - [embed](#embed)
+ - [rerank](#rerank)
+ - [classify](#classify)
+ - [detect_language](#detect_language)
+ - [summarize](#summarize)
+ - [tokenize](#tokenize)
+ - [detokenize](#detokenize)
+ - [Datasets](#datasets)
+ - [Connectors](#connectors)
+ - [Streaming and Server-Sent Events (SSE)](#streaming-and-server-sent-events-sse)
+ - [Server-Sent Events (SSE) Hang](#server-sent-events-sse-hang)
+ - [Back-and-Forth Conversations](#back-and-forth-conversations)
+ - [New Functionalities and APIs](#new-functionalities-and-apis)
+ - [Request Options](#request-options)
+ - [Adapter](#adapter)
+ - [Timeout](#timeout)
+ - [Error Handling](#error-handling)
+ - [Rescuing](#rescuing)
+ - [For Short](#for-short)
+ - [Errors](#errors)
- [Development](#development)
- - [Purpose](#purpose)
- - [Publish to RubyGems](#publish-to-rubygems)
- - [Updating the README](#updating-the-readme)
+ - [Purpose](#purpose)
+ - [Publish to RubyGems](#publish-to-rubygems)
+ - [Updating the README](#updating-the-readme)
- [Resources and References](#resources-and-references)
- [Disclaimer](#disclaimer)
## Setup
### Installing
```sh
-gem install cohere-ai -v 1.0.2
+gem install cohere-ai -v 1.1.0
```
```sh
-gem 'cohere-ai', '~> 1.0.2'
+gem 'cohere-ai', '~> 1.1.0'
```
### Credentials
You can obtain your API key from the [Cohere AI Platform](https://dashboard.cohere.com).
@@ -615,10 +616,25 @@
)
```
### Request Options
+#### Adapter
+
+The gem uses [Faraday](https://github.com/lostisland/faraday) with the [Typhoeus](https://github.com/typhoeus/typhoeus) adapter by default.
+
+You can use a different adapter if you want:
+
+```ruby
+require 'faraday/net_http'
+
+client = Cohere.new(
+ credentials: { api_key: ENV['COHERE_API_KEY'] },
+ options: { connection: { adapter: :net_http } }
+)
+```
+
#### Timeout
You can set the maximum number of seconds to wait for the request to complete with the `timeout` option:
```ruby
@@ -717,10 +733,10 @@
```bash
gem build cohere-ai.gemspec
gem signin
-gem push cohere-ai-1.0.2.gem
+gem push cohere-ai-1.1.0.gem
```
### Updating the README
Install [Babashka](https://babashka.org):