INNER CODE UNIT · TypeScript

chatStream

apache/kyuubi · kyuubi-server/web-ui/src/api/data-agent/index.ts:76

export function chatStream(
  sessionHandle: string,
  text: string,
  onEvent: (event: SseEvent) => void,
  signal?: AbortSignal,
  approvalMode?: string,
  model?: string
): Promise<void> {
  const body: Record<string, string> = { text }
  if (approvalMode) body.approvalMode = approvalMode
  if (model) body.model = model

  const authStore = useAuthStore()
  const headers: Record<string, string> = {
    'Content-Type': 'application/json'
  }
  if (authStore.isAuthenticated && authStore.authToken) {
    headers['Authorization'] = authStore.authToken

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…