Class: Verica::OpenAIWrapper::ChatProxy
- Inherits:
-
Object
- Object
- Verica::OpenAIWrapper::ChatProxy
show all
- Defined in:
- lib/verica/openai_wrapper.rb
Instance Method Summary
collapse
Constructor Details
#initialize(chat) ⇒ ChatProxy
Returns a new instance of ChatProxy.
29
|
# File 'lib/verica/openai_wrapper.rb', line 29
def initialize(chat) = @chat = chat
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name) ⇒ Object
35
36
37
|
# File 'lib/verica/openai_wrapper.rb', line 35
def method_missing(name, ...)
@chat.public_send(name, ...)
end
|
Instance Method Details
#completions ⇒ Object
31
32
33
|
# File 'lib/verica/openai_wrapper.rb', line 31
def completions
CompletionsProxy.new(@chat.completions)
end
|
#respond_to_missing?(name, include_private = false) ⇒ Boolean
39
40
41
|
# File 'lib/verica/openai_wrapper.rb', line 39
def respond_to_missing?(name, include_private = false)
@chat.respond_to?(name, include_private) || super
end
|