Skip to content

useAI

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/web/src/components/AI/useAI.ts

Custom hook for AI operations with SSE streaming support

Handles:

  • Multiple AI providers (Azure Claude, Azure OpenAI)
  • Streaming responses via Server-Sent Events
  • Document enhancement, outline generation, text improvement, summarization
  • Error handling and loading states
  • Provider selection

Signature

ts
function useAI(options: UseAIOptions): UseAIReturn

Parameters

NameType
optionsUseAIOptions

Returns: UseAIReturn

Was this page helpful?

Download as PDF