fix: tighten captain v2 (#14883)
# Pull Request Template ## Description Tightens v2 prompt and config to match v1 ## Type of change Please delete options that are not relevant. - [x] Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. locally ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] Any dependent changes have been merged and published in downstream modules
This commit is contained in:
@@ -93,7 +93,7 @@ RSpec.describe Captain::Assistant::AgentRunnerService do
|
||||
expect(mock_runner).to receive(:run).with(
|
||||
'I need help with my account',
|
||||
context: expected_context,
|
||||
max_turns: 100
|
||||
max_turns: 10
|
||||
)
|
||||
|
||||
service.generate_response(message_history: message_history)
|
||||
@@ -119,7 +119,7 @@ RSpec.describe Captain::Assistant::AgentRunnerService do
|
||||
expect(input.text).to eq('What does this error mean?')
|
||||
expect(input.attachments.first.source.to_s).to eq('https://example.com/error.png')
|
||||
expect(context[:conversation_history]).to eq([{ role: :assistant, content: 'Please share a screenshot', agent_name: nil }])
|
||||
expect(max_turns).to eq(100)
|
||||
expect(max_turns).to eq(10)
|
||||
end
|
||||
|
||||
service.generate_response(message_history: multimodal_message_history)
|
||||
@@ -147,7 +147,7 @@ RSpec.describe Captain::Assistant::AgentRunnerService do
|
||||
{ type: 'text', text: 'Here is my error screenshot' },
|
||||
{ type: 'image_url', image_url: { url: 'https://example.com/error.png' } }
|
||||
)
|
||||
expect(max_turns).to eq(100)
|
||||
expect(max_turns).to eq(10)
|
||||
end
|
||||
|
||||
service.generate_response(message_history: history_with_prior_image)
|
||||
@@ -157,7 +157,7 @@ RSpec.describe Captain::Assistant::AgentRunnerService do
|
||||
expect(mock_runner).to receive(:run) do |_input, context:, max_turns:|
|
||||
expect(context[:captain_v2_trace_input]).to include('image_url')
|
||||
expect(context[:captain_v2_trace_current_input]).to include('image_url')
|
||||
expect(max_turns).to eq(100)
|
||||
expect(max_turns).to eq(10)
|
||||
end
|
||||
|
||||
service.generate_response(message_history: multimodal_message_history)
|
||||
|
||||
Reference in New Issue
Block a user