Class: AIA::AiClientBackend
- Includes:
- BackendCommon
- Defined in:
- lib/aia/tools/ai_client_backend.rb
Constant Summary collapse
- DEFAULT_PARAMETERS =
''
- DIRECTIVES =
%w[ model temperature max_tokens top_p frequency_penalty presence_penalty ]
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
Instance Method Summary collapse
- #build_command ⇒ Object
-
#initialize(text: "", files: []) ⇒ AiClientBackend
constructor
A new instance of AiClientBackend.
- #run ⇒ 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: []) ⇒ AiClientBackend
Returns a new instance of AiClientBackend.
32 33 34 35 |
# File 'lib/aia/tools/ai_client_backend.rb', line 32 def initialize(text: "", files: []) super @client = AiClient.new end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
20 21 22 |
# File 'lib/aia/tools/ai_client_backend.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/ai_client_backend.rb', line 20 def raw_response @raw_response end |
Instance Method Details
#build_command ⇒ Object
37 38 39 40 |
# File 'lib/aia/tools/ai_client_backend.rb', line 37 def build_command # No-op - ai_client doesn't use command line @parameters = "" end |