Enable the use of AiPersonalities
This commit is contained in:
parent
ea43984ec6
commit
7a9d296530
|
@ -19,12 +19,12 @@ const aiPersonalities: AiPersonalities = {
|
||||||
export const callOpenAiAPI = async ({ prompt, bearer, aiPersonality = "" }: { prompt: string, bearer: string, aiPersonality?: string }) => {
|
export const callOpenAiAPI = async ({ prompt, bearer, aiPersonality = "" }: { prompt: string, bearer: string, aiPersonality?: string }) => {
|
||||||
const messages = [];
|
const messages = [];
|
||||||
|
|
||||||
// if (aiPersonality.length && Object.keys(aiPersonalities).includes(aiPersonality)) {
|
if (aiPersonality.length && Object.keys(aiPersonalities).includes(aiPersonality)) {
|
||||||
// messages.push({
|
messages.push({
|
||||||
// role: "system",
|
role: "system",
|
||||||
// content: aiPersonalities[aiPersonality],
|
content: aiPersonalities[aiPersonality as keyof AiPersonalities],
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
messages.push({ role: "user", content: prompt });
|
messages.push({ role: "user", content: prompt });
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue