import { FetchEventSourceInit } from '@fortaine/fetch-event-source'

export interface AIOption {
  label: string
  value: string
}

export interface AIMessage {
  id?: string
  role: 'user' | 'assistant' | 'system'
  content: string
  json?: any
}

export interface AIData {
  response_format?: { type: 'text' | 'json_object' }
  model?: string
  messages: AIMessage[]
}

export interface AIResponse {
  id: string
  content: string
  json?: any
}

export interface InitOptions extends FetchEventSourceInit {
  onMessage?: (message: AIMessage) => void
}
