shitton
This commit is contained in:
@@ -65,26 +65,5 @@ export function asMistralChatMessage(message: ChatMessage): MistralChatMessage {
|
||||
// }
|
||||
// }
|
||||
|
||||
/*
|
||||
const messages: any[] = ordered.map(part => {
|
||||
const content: any[] = [{
|
||||
type: "input_text",
|
||||
text: (Environment.USE_NAMES_IN_PROMPT && !part.bot ? `MESSAGE FROM USER \"${part.name}\":\n` : "") + part.content,
|
||||
}];
|
||||
|
||||
if (!part.bot) {
|
||||
for (const image of part.images ?? []) {
|
||||
content.push({type: "input_image", image_url: `data:image/jpeg;base64,${image}`, detail: "auto"});
|
||||
}
|
||||
}
|
||||
|
||||
return {role: part.bot ? "assistant" : "user", content};
|
||||
});
|
||||
|
||||
if (Environment.SYSTEM_PROMPT && Environment.USE_SYSTEM_PROMPT) {
|
||||
messages.unshift({role: "system", content: Environment.SYSTEM_PROMPT});
|
||||
}
|
||||
return {parts: messages, imageCount};
|
||||
*/
|
||||
|
||||
export type AiChatMessage = | OpenAIChatMessage | OllamaChatMessage | MistralChatMessage | GeminiMessage;
|
||||
|
||||
Reference in New Issue
Block a user