We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec4a33d commit 2ee1d0dCopy full SHA for 2ee1d0d
lib/ruby_llm/active_record/acts_as.rb
@@ -133,6 +133,11 @@ def with_temperature(...)
133
self
134
end
135
136
+ def with_context(...)
137
+ to_llm.with_context(...)
138
+ self
139
+ end
140
+
141
def on_new_message(...)
142
to_llm.on_new_message(...)
143
lib/ruby_llm/chat.rb
@@ -71,6 +71,13 @@ def with_temperature(temperature)
71
72
73
74
+ def with_context(context)
75
+ @context = context
76
+ @config = context.config
77
+ with_model(@model.id, provider: @provider.slug, assume_exists: true)
78
79
80
81
def on_new_message(&block)
82
@on[:new_message] = block
83
0 commit comments