Class: AIA::Client
- Includes:
- BackendCommon
- Defined in:
- lib/aia/tools/client.rb
Constant Summary collapse
- DEFAULT_PARAMETERS =
''
- DIRECTIVES =
[]
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#raw_response ⇒ Object
readonly
Returns the value of attribute raw_response.
Attributes included from BackendCommon
#command, #files, #parameters, #text
Class Method Summary collapse
Instance Method Summary collapse
- #build_command ⇒ Object
-
#initialize(text: "", files: []) ⇒ Client
constructor
A new instance of Client.
- #run ⇒ Object
- #speak(what = @text) ⇒ Object
Methods included from BackendCommon
#sanitize, #set_parameter_from_directives
Methods inherited from Tools
catalog, get_meta, inherited, load_tools, #meta, meta, search_for, setup_backend, validate_tools
Constructor Details
#initialize(text: "", files: []) ⇒ Client
Returns a new instance of Client.
25 26 27 28 29 |
# File 'lib/aia/tools/client.rb', line 25 def initialize(text: "", files: []) super @client = OpenAI::Client.new end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
20 21 22 |
# File 'lib/aia/tools/client.rb', line 20 def client @client end |
#raw_response ⇒ Object (readonly)
Returns the value of attribute raw_response.
20 21 22 |
# File 'lib/aia/tools/client.rb', line 20 def raw_response @raw_response end |
Class Method Details
.list_models ⇒ Object
175 176 177 |
# File 'lib/aia/tools/client.rb', line 175 def list_models new.client.model.list end |
Instance Method Details
#build_command ⇒ Object
31 32 33 |
# File 'lib/aia/tools/client.rb', line 31 def build_command # No-Op end |