update(llama-api)

Add llama3 support for all calls, rather than openai chatgpt
This commit is contained in:
iheuzio
2024-05-19 17:54:26 -04:00
parent a1a8c44824
commit f0a9044c42
5 changed files with 3508 additions and 101 deletions
-23
View File
@@ -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();
+18
View File
@@ -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