Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid using puts in README.md examples #9

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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