Class: GroqRuby::Resources::Chat

Inherits:
Object
  • Object
show all
Defined in:
lib/groq_ruby/resources/chat.rb,
lib/groq_ruby/resources/chat/completions.rb

Overview

Namespace for the chat sub-resources (only ‘completions` for now). Mirrors `client.chat.completions.create(…)` from the python SDK.

Defined Under Namespace

Classes: Completions

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ Chat

Returns a new instance of Chat.



6
7
8
# File 'lib/groq_ruby/resources/chat.rb', line 6

def initialize(transport)
  @transport = transport
end

Instance Method Details

#completionsChat::Completions

Returns:



11
12
13
# File 'lib/groq_ruby/resources/chat.rb', line 11

def completions
  @completions ||= Chat::Completions.new(@transport)
end