Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

410 B
Raw Blame
import { isRecord } from '@/util/is-record'

export type Hint = {
  summary: string
  op: string
  input?: Record<string, unknown>
  form?: unknown
}

function isHint(value: unknown): value is Hint {
  return isRecord(value) && typeof value.op === 'string' && typeof value.summary === 'string'
}

export function parseHints(value: unknown): Hint[] {
  return Array.isArray(value) ? value.filter(isHint) : []
}