mirror of
https://github.com/Iheuzio/gpt-contextfiles.git
synced 2026-06-25 22:31:01 +00:00
update(llama-api)
Add llama3 support for all calls, rather than openai chatgpt
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
const path = require('path');
|
||||
|
||||
const { runTests } = require('@vscode/test-electron');
|
||||
|
||||
async function main() {
|
||||
try {
|
||||
// The folder containing the Extension Manifest package.json
|
||||
// Passed to `--extensionDevelopmentPath`
|
||||
const extensionDevelopmentPath = path.resolve(__dirname, '../');
|
||||
|
||||
// The path to the extension test script
|
||||
// Passed to --extensionTestsPath
|
||||
const extensionTestsPath = path.resolve(__dirname, './suite/index');
|
||||
|
||||
// Download VS Code, unzip it and run the integration test
|
||||
await runTests({ extensionDevelopmentPath, extensionTestsPath });
|
||||
} catch (err) {
|
||||
console.error('Failed to run tests', err);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
@@ -0,0 +1,18 @@
|
||||
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
|
||||
Reference in New Issue
Block a user