Skip to content

Commit

Permalink
Avoid using puts in README.md examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ksylvest committed Jun 17, 2024
1 parent ec2ef15 commit 3463960
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
omniai (1.0.7)
omniai (1.0.8)
event_stream_parser
http
zeitwerk
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Clients that support chat (e.g. Anthropic w/ "Claude", Google w/ "Gemini", Mistr

```ruby
completion = client.chat('Tell me a joke.')
puts(completion.choice.message.content) # '...'
completion.choice.message.content # '...'
```

#### w/ a Collection of Messages
Expand All @@ -77,13 +77,10 @@ messages = [
role: 'system',
content: 'You are a helpful assistant with an expertise in geography.',
},
{
role: 'user',
content: 'What is the capital of Canada?',
},
'What is the capital of Canada?'
]
completion = client.chat(messages, model: '...', temperature: 0.7, format: :json)
puts(completion.choice.message.content) # '...'
completion.choice.message.content
```

#### w/ a Collection of Files
Expand All @@ -103,7 +100,7 @@ message = {
}

completion = client.chat(message)
puts(completion.choice.message.content) # '...'
completion.choice.message.content
```

#### Streaming
Expand Down
2 changes: 1 addition & 1 deletion lib/omniai/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module OmniAI
VERSION = '1.0.7'
VERSION = '1.0.8'
end

0 comments on commit 3463960

Please sign in to comment.