Class: AIRecordFinder::Client
- Inherits:
-
Object
- Object
- AIRecordFinder::Client
- Defined in:
- lib/ai_record_finder/client.rb
Overview
Transport facade. Selects the provider configured via ‘configuration.provider` and delegates chat completion to it.
Kept as a stable entry point so callers (and AIAdapter) depend on a single ‘#chat_completion(system_prompt:, user_prompt:)` interface regardless of whether the backing provider is OpenAI, Anthropic, or another vendor.
Instance Method Summary collapse
- #chat_completion(system_prompt:, user_prompt:) ⇒ Object
-
#initialize(configuration:, connection: nil) ⇒ Client
constructor
A new instance of Client.
Constructor Details
Instance Method Details
#chat_completion(system_prompt:, user_prompt:) ⇒ Object
17 18 19 |
# File 'lib/ai_record_finder/client.rb', line 17 def chat_completion(system_prompt:, user_prompt:) @provider.chat_completion(system_prompt: system_prompt, user_prompt: user_prompt) end |