test(captain): simplify classifier model spec
This commit is contained in:
@@ -67,15 +67,15 @@ RSpec.describe Captain::Llm::AssistantActionClassifierService do
|
||||
)
|
||||
end
|
||||
|
||||
it 'uses the configured Captain model from the base LLM service' do
|
||||
create(:installation_config, name: 'CAPTAIN_OPEN_AI_MODEL', value: 'provider/custom-model')
|
||||
it 'uses the configured Captain model' do
|
||||
create(:installation_config, name: 'CAPTAIN_OPEN_AI_MODEL', value: 'gpt-4.1-nano')
|
||||
|
||||
expect(RubyLLM).to receive(:chat).with(model: 'provider/custom-model').and_return(mock_chat)
|
||||
expect(RubyLLM).to receive(:chat).with(model: 'gpt-4.1-nano').and_return(mock_chat)
|
||||
allow(mock_chat).to receive(:ask).and_return(mock_response)
|
||||
|
||||
result = service.classify(message_history: message_history, assistant_response: 'Would you like to talk to support?')
|
||||
|
||||
expect(result).to include('model' => 'provider/custom-model')
|
||||
expect(result).to include('model' => 'gpt-4.1-nano')
|
||||
end
|
||||
|
||||
context 'when the assistant has no custom instructions' do
|
||||
|
||||
Reference in New Issue
Block a user