effect-io-ai

Package: @effect/ai
Module: Prompt

Prompt.TextPart

Content part representing plain text.

The most basic content type used for textual information in messages.

Example

import { Prompt } from "@effect/ai"

const textPart: Prompt.TextPart = Prompt.makePart("text", {
  text: "Hello, how can I help you today?",
})

Signature

export interface TextPart extends BasePart<"text", TextPartOptions> {
  /**
   * The text content.
   */
  readonly text: string
}

Source

Since v1.0.0