@@ -48,7 +48,10 @@ def execute
48
48
expect ( response . content ) . to include ( '15' )
49
49
expect ( response . content ) . to include ( '10' )
50
50
end
51
+ end
51
52
53
+ chat_models . each do |model | # rubocop:disable Style/CombinableLoops
54
+ provider = RubyLLM ::Models . provider_for ( model ) . slug
52
55
it "#{ provider } /#{ model } can use tools in multi-turn conversations" do # rubocop:disable RSpec/ExampleLength,RSpec/MultipleExpectations
53
56
chat = RubyLLM . chat ( model : model )
54
57
. with_tool ( Weather )
@@ -61,13 +64,19 @@ def execute
61
64
expect ( response . content ) . to include ( '15' )
62
65
expect ( response . content ) . to include ( '10' )
63
66
end
67
+ end
64
68
69
+ chat_models . each do |model | # rubocop:disable Style/CombinableLoops
70
+ provider = RubyLLM ::Models . provider_for ( model ) . slug
65
71
it "#{ provider } /#{ model } can use tools without parameters" do
66
72
chat = RubyLLM . chat ( model : model ) . with_tool ( BestLanguageToLearn )
67
73
response = chat . ask ( "What's the best language to learn?" )
68
74
expect ( response . content ) . to include ( 'Ruby' )
69
75
end
76
+ end
70
77
78
+ chat_models . each do |model | # rubocop:disable Style/CombinableLoops
79
+ provider = RubyLLM ::Models . provider_for ( model ) . slug
71
80
it "#{ provider } /#{ model } can use tools without parameters in multi-turn streaming conversations" do # rubocop:disable RSpec/ExampleLength,RSpec/MultipleExpectations
72
81
chat = RubyLLM . chat ( model : model ) . with_tool ( BestLanguageToLearn )
73
82
chunks = [ ]
@@ -88,7 +97,10 @@ def execute
88
97
expect ( chunks . first ) . to be_a ( RubyLLM ::Chunk )
89
98
expect ( response . content ) . to include ( 'Ruby' )
90
99
end
100
+ end
91
101
102
+ chat_models . each do |model | # rubocop:disable Style/CombinableLoops
103
+ provider = RubyLLM ::Models . provider_for ( model ) . slug
92
104
it "#{ provider } /#{ model } can use tools with multi-turn streaming conversations" do # rubocop:disable RSpec/ExampleLength,RSpec/MultipleExpectations
93
105
chat = RubyLLM . chat ( model : model )
94
106
. with_tool ( Weather )
0 commit comments