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