mirror of
https://github.com/Iheuzio/gpt-contextfiles.git
synced 2025-07-18 14:00:48 +00:00
18 lines
574 B
JavaScript
18 lines
574 B
JavaScript
const axios = require('axios');
|
|
const { expect } = require('@jest/globals');
|
|
|
|
test('Llama3 Generate Test', () => {
|
|
return axios.post('http://localhost:11434/api/generate', {
|
|
model: "llama3",
|
|
prompt: "Why is the sky blue?"
|
|
})
|
|
.then(response => {
|
|
console.log(response.data); // Log the response data
|
|
|
|
expect(response.data).toBeTruthy();
|
|
// Add more assertions based on the expected structure of the response data
|
|
})
|
|
.catch(error => {
|
|
console.error(error);
|
|
});
|
|
}, 10000); // Increase timeout to 10 seconds
|