Module: Raix::ChatCompletion
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/raix/chat_completion.rb
Overview
The ‘ChatCompletion“ module is a Rails concern that provides a way to interact with the OpenRouter Chat Completion API via its client. The module includes a few methods that allow you to build a transcript of messages and then send them to the API for completion. The API will return a response that you can use however you see fit. If the response includes a function call, the module will dispatch the function call and return the result. Which implies that function calls need to be defined on the class that includes this module. (Note: You should probably use the `FunctionDispatch` module to define functions instead of doing it manually.)