admin管理员组

文章数量:1123423

I'm making some app using openai API and i need to make messages not in declaration because some elements can be unexisting in prompt. For now concept of my code looks like

const completion = await openai.chatpletions.create({
        model: config.model,
        messages: getMessages(),
    });

But it doesn't works because of i need to guarantee that value returned by getMessages() is in correct format, maybe by some type

本文标签: typescriptMaking message for ai not in its declarationStack Overflow