Package: @effect/ai
Module: Chat
Creates a new Chat service with empty conversation history.
This is the most common way to start a fresh chat session without any initial context or system prompts.
Example
import { Chat } from "@effect/ai"
import { Effect } from "effect"
const freshChat = Effect.gen(function* () {
const chat = yield* Chat.empty
const response = yield* chat.generateText({
prompt: "Hello! Can you introduce yourself?"
})
console.log(response.content)
return chat
})
Signature
declare const empty: Effect.Effect<Service, never, never>
Since v1.0.0