bruh
This commit is contained in:
parent
b308a75452
commit
8ec04d2fcb
1 changed files with 6 additions and 9 deletions
15
index.mjs
15
index.mjs
|
@ -39,18 +39,18 @@ async function runPublishCommands() {
|
|||
try {
|
||||
// Execute the 'ollama create' command
|
||||
const createCommand = `ollama create ${modelID} -f ${modelfilePath}`;
|
||||
console.log(`Running command: ${createCommand}`);
|
||||
//console.log(`Running command: ${createCommand}`);
|
||||
const { stdout: createStdout, stderr: createStderr } = await execPromise(createCommand);
|
||||
console.log('Create Command Output:', createStdout);
|
||||
//console.log('Create Command Output:', createStdout);
|
||||
if (createStderr) {
|
||||
console.error('Create Command Error:', createStderr);
|
||||
}
|
||||
|
||||
// Execute the 'ollama push' command
|
||||
const pushCommand = `ollama push ${modelID}`;
|
||||
console.log(`Running command: ${pushCommand}`);
|
||||
//console.log(`Running command: ${pushCommand}`);
|
||||
const { stdout: pushStdout, stderr: pushStderr } = await execPromise(pushCommand);
|
||||
console.log('Push Command Output:', pushStdout);
|
||||
//console.log('Push Command Output:', pushStdout);
|
||||
if (pushStderr) {
|
||||
console.error('Push Command Error:', pushStderr);
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ async function siteCrawler(hostname) {
|
|||
webContents.forEach(content => contexts.push(content));
|
||||
return webContents;
|
||||
} catch (error) {
|
||||
console.error(`Failed to crawl site ${hostname}:`, error);
|
||||
//console.error(`Failed to crawl site ${hostname}:`, error);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
@ -196,9 +196,7 @@ async function generateModelfile(c) {
|
|||
}
|
||||
ags_modelfile += createUserContextPart(userAGIInput);
|
||||
await writeFile(systemSavePath, ags_modelfile)
|
||||
.then(() => {
|
||||
console.log('File written successfully!');
|
||||
})
|
||||
.then(() => {})
|
||||
.catch(err => {
|
||||
console.error('Error writing file:', err);
|
||||
});
|
||||
|
@ -217,7 +215,6 @@ async function learner() {
|
|||
await contextAdd(["68k.news"]);
|
||||
await contextAdd(["old.reddit.com"]);
|
||||
const modelfile = await generateModelfile(contexts);
|
||||
console.log(modelfile);
|
||||
await runPublishCommands();
|
||||
return 0;
|
||||
} catch (error) {
|
||||
|
|
Loading…
Reference in a new issue