()
| 2 | |
| 3 | // Test function calling |
| 4 | const testFunctionCalling = async () => { |
| 5 | const messages = [ |
| 6 | { role: 'user', content: 'Create a bar chart showing sales data for January, February, and March with values 100, 150, 200' } |
| 7 | ]; |
| 8 | |
| 9 | console.log('Testing function calling...'); |
| 10 | |
| 11 | await sendMessage( |
| 12 | messages, |
| 13 | (chunk, fullContent, error) => { |
| 14 | console.log('Chunk received:', chunk); |
| 15 | }, |
| 16 | (finalContent, error) => { |
| 17 | console.log('Final content:', finalContent); |
| 18 | console.log('Error:', error); |
| 19 | }, |
| 20 | (error) => { |
| 21 | console.error('Error:', error); |
| 22 | }, |
| 23 | 'openai-large', |
| 24 | { maxTokens: 1000, temperature: 0.7 } |
| 25 | ); |
| 26 | }; |
| 27 | |
| 28 | testFunctionCalling(); |
no test coverage detected