typing.ts 577 B

123456789101112131415161718192021222324
  1. export type Updater<T> = (updater: (value: T) => void) => void;
  2. export const ROLES = ["system", "user", "assistant"] as const;
  3. export type MessageRole = (typeof ROLES)[number];
  4. export interface RequestMessage {
  5. role: MessageRole;
  6. content: string;
  7. }
  8. export type DalleSize = "1024x1024" | "1792x1024" | "1024x1792";
  9. export type DalleQuality = "standard" | "hd";
  10. export type DalleStyle = "vivid" | "natural";
  11. export type ModelSize =
  12. | "1024x1024"
  13. | "1792x1024"
  14. | "1024x1792"
  15. | "768x1344"
  16. | "864x1152"
  17. | "1344x768"
  18. | "1152x864"
  19. | "1440x720"
  20. | "720x1440";