model.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. export type IModelData = {
  2. chat_scene: string;
  3. model_name: string;
  4. model_type: string;
  5. host: string;
  6. port: number;
  7. manager_host: string;
  8. manager_port: number;
  9. healthy: boolean;
  10. check_healthy: boolean;
  11. prompt_template: string;
  12. last_heartbeat: string;
  13. stream_api: string;
  14. nostream_api: string;
  15. };
  16. export type BaseModelParams = {
  17. host: string;
  18. port: number;
  19. model: string;
  20. worker_type: string;
  21. params: any;
  22. };
  23. export type ModelParams = {
  24. model_name: string;
  25. model_path: string;
  26. proxy_api_key: string;
  27. proxy_server_url: string;
  28. model_type: string;
  29. max_context_size: number;
  30. };
  31. export type StartModelParams = {
  32. host: string;
  33. port: number;
  34. model: string;
  35. worker_type: string;
  36. params: ModelParams;
  37. };
  38. interface ExtMetadata {
  39. tags: string;
  40. }
  41. export type SupportModelParams = {
  42. param_class: string;
  43. param_name: string;
  44. param_type: string;
  45. default_value: string | boolean | number;
  46. description: string;
  47. required: boolean;
  48. valid_values: null;
  49. ext_metadata: ExtMetadata;
  50. };
  51. export type SupportModel = {
  52. model: string;
  53. path: string;
  54. worker_type: string;
  55. path_exist: boolean;
  56. proxy: boolean;
  57. enabled: boolean;
  58. host: string;
  59. port: number;
  60. params: SupportModelParams;
  61. };