Package: @effect/ai
Module: Prompt
Creates a new message with the specified role.
Example
import { Prompt } from "@effect/ai"
const textPart = Prompt.makePart("text", {
text: "Hello, world!"
})
const filePart = Prompt.makeMessage("user", {
content: [textPart]
})
Signature
declare const makeMessage: <const Role extends Message["role"]>(role: Role, params: Omit<Extract<Message, { role: Role; }>, MessageTypeId | "role" | "options"> & { readonly options?: Extract<Message, { role: Role; }>["options"]; }) => Extract<Message, { role: Role; }>
Since v1.0.0