gpt-contextfiles/test/test.js
iheuzio f0a9044c42 update(llama-api)
Add llama3 support for all calls, rather than openai chatgpt
2024-05-19 17:54:26 -04:00

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