|
38 | 38 | end |
39 | 39 |
|
40 | 40 | let(:classification_response) do |
41 | | - { answer: "Hello!", confidence: 0.85 } |
| 41 | + { answer: "Hello!", confidence: 0.85 }.to_json |
42 | 42 | end |
43 | 43 |
|
44 | 44 | let(:expected_message_history) do |
|
113 | 113 | expected_message_history, |
114 | 114 | tools:, |
115 | 115 | function_name: "genuine_rag", |
116 | | - function_arguments: { answer: "Generic answer", confidence: 0.9 }, |
| 116 | + function_arguments: { answer: "Generic answer", confidence: 0.9 }.to_json, |
117 | 117 | ) |
118 | 118 | end |
119 | 119 |
|
|
144 | 144 | expected_message_history, |
145 | 145 | tools:, |
146 | 146 | function_name: "vague_acronym_grammar", |
147 | | - function_arguments: { |
148 | | - answer: "A long answer that is terminated mid senten", |
149 | | - confidence: 0.99, |
150 | | - }, |
| 147 | + function_arguments: '{"answer": "A long answer that is terminated mid senten', |
151 | 148 | finish_reason: "length", |
152 | 149 | ) |
153 | 150 | end |
|
184 | 181 | expected_message_history, |
185 | 182 | tools:, |
186 | 183 | function_name: "multi_questions", |
187 | | - function_arguments: { answer: answer_message, confidence: 0.9 }, |
| 184 | + function_arguments: { answer: answer_message, confidence: 0.9 }.to_json, |
188 | 185 | ) |
189 | 186 | end |
190 | 187 |
|
|
211 | 208 | expected_message_history, |
212 | 209 | tools:, |
213 | 210 | function_name: "harmful_vulgar_controversy", |
214 | | - function_arguments: { answer: "Ignored", confidence: 0.9 }, |
| 211 | + function_arguments: { answer: "Ignored", confidence: 0.9 }.to_json, |
215 | 212 | ) |
216 | 213 | end |
217 | 214 |
|
|
0 commit comments