SPB Git

spb/uqo-chat

Public
2.1 KB · 104 lines typescript
1export type Role = 'student' | 'professor' | 'admin';23export interface User {4  id: string;5  email: string;6  role: Role;7  display_name: string | null;8  preferences: { tutoiement?: boolean; course?: string; deep?: boolean; locale?: string; font_scale?: number };9  consent_at: string | null;10}1112export interface Course {13  code: string;14  title: string;15  term: string;16  modules: string[];17  suggestions: string[];18  site: string;19  deadlines: { label: string; date: string }[];20  announcement: string;21}2223export interface Conversation {24  id: string;25  title: string;26  course: string;27  pinned: boolean;28  archived: boolean;29  created_at: string;30  updated_at: string;31}3233export interface Artifact {34  type: string;35  file_id: string | null;36  filename: string | null;37  preview?: unknown;38  url?: string | null;39}4041export interface ToolCallView {42  id: string;43  name: string;44  arguments: Record<string, unknown>;45  args_preview?: string;46  summary: string;47  payload: Record<string, unknown>;48  artifacts?: Artifact[];49  status: 'running' | 'ok' | 'error';50  progress?: string;51  duration_ms: number;52}5354export interface Message {55  id: string;56  role: 'user' | 'assistant' | 'system';57  content: string;58  model?: string | null;59  created_at: string;60  feedback?: string | null;61  attachments?: string[];62  tool_calls?: ToolCallView[];63  cost_usd?: number;64  streaming?: boolean;65  error?: string;66  latency_ms?: number;67}6869export interface UploadedFile {70  file_id: string;71  filename: string;72  type: string;73  size: number;74  url: string;75  kind?: string;76  pinned?: boolean;77  created_at?: string;78}7980export interface QuizQuestion {81  id: string;82  type: 'mcq' | 'true_false' | 'numeric';83  prompt: string;84  choices?: string[];85  unit?: string;86}8788export interface QuizPayload {89  quiz_id: string;90  title: string;91  course: string;92  topic: string;93  difficulty: string;94  questions: QuizQuestion[];95  sources?: { module: string; section: string; url: string }[];96}9798export interface QuizResult {99  score: number;100  correct: number;101  total: number;102  results: { id: string; correct: boolean; given: unknown; answer: unknown; explanation: string; unit?: string }[];103}104
Files · cd08d441f7c277e8fedd6f3d3be82f02b44553ba
Menu

Theme