fix(core): update

This commit is contained in:
2024-05-17 17:38:35 +02:00
parent be53225bb1
commit 32f12c67cf
6 changed files with 4910 additions and 2946 deletions

View File

@@ -28,8 +28,8 @@ export class Readme {
console.log(error);
}
let result = await this.aiDocsRef.openaiInstance.chat(
`
let result = await this.aiDocsRef.openaiInstance.chat({
systemMessage: `
You create markdown readmes for npm projects. You only output the markdown readme.
The Readme should follow the following template:
@@ -63,24 +63,24 @@ The Readme should follow the following template:
* npmextra.json contains overall module information.
* readme.hints.md provides valuable hints about module ideas.
]
`,
contextString,
[]
);
`,
messageHistory: [],
userMessage: contextString,
});
finalReadmeString += result.message.content + '\n' + legalInfo;
finalReadmeString += result.message + '\n' + legalInfo;
console.log(`\n======================\n`);
console.log(result.message.content);
console.log(result.message);
console.log(`\n======================\n`);
const readme = (await projectContext.gatherFiles()).smartfilesReadme;
readme.contents = Buffer.from(finalReadmeString);
await readme.write();
return result.message.content;
return result.message;
}
}