Class: Xeno::Chat
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Xeno::Chat
- Defined in:
- app/models/xeno/chat.rb
Overview
The persisted RubyLLM chat backing one session's transcript, owned by xeno — host apps with their own acts_as chat classes are unaffected. Models, tool calls, usage, and batches are RubyLLM library records (ruby_llm_* tables), polymorphic toward this class.
Instance Method Summary collapse
-
#apply_runtime_options!(model_options) ⇒ Object
assume_model_exists and protocol are runtime attributes, not columns, so a freshly loaded record loses them and the first to_llm build resolves the model strictly — ModelNotFoundError on the session's second message for a custom model.
Instance Method Details
#apply_runtime_options!(model_options) ⇒ Object
assume_model_exists and protocol are runtime attributes, not columns, so a freshly loaded record loses them and the first to_llm build resolves the model strictly — ModelNotFoundError on the session's second message for a custom model. Every entry point re-applies them from the definition.
14 15 16 17 18 |
# File 'app/models/xeno/chat.rb', line 14 def () self.assume_model_exists = [:assume_model_exists] if .key?(:assume_model_exists) self.protocol = [:protocol] if .key?(:protocol) self end |