Skip to content

Commit 120c1d6

Browse files
committed
Supporting directly calling actions
1 parent 1bfebaf commit 120c1d6

File tree

1 file changed

+4
-0
lines changed
  • lib/active_agent/action_prompt

1 file changed

+4
-0
lines changed

lib/active_agent/action_prompt/base.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ def embed
205205

206206
def perform_generation
207207
prompt_context.options.merge(options)
208+
if prompt_context.message.content_type == "application/json" && prompt_context.message.role == :user
209+
prompt_context.message = prompt_context.messages.last
210+
prompt_context.actions = []
211+
end
208212
generation_provider.generate(prompt_context) if prompt_context && generation_provider
209213
handle_response(generation_provider.response)
210214
end

0 commit comments

Comments
 (0)