prompt.ts 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. export type PromptParams = {
  2. prompt_type: string;
  3. current: number;
  4. pageSize: number;
  5. hideOnSinglePage: boolean;
  6. showQuickJumper: boolean;
  7. };
  8. export interface UpdatePromptParams extends IPrompt {
  9. prompt_type: string;
  10. }
  11. export interface IPrompt {
  12. chat_scene: string;
  13. content: string;
  14. gmt_created: string;
  15. gmt_modified: string;
  16. id: number;
  17. prompt_name: string;
  18. prompt_type: string;
  19. sub_chat_scene: string;
  20. user_name?: string;
  21. user_id?: string;
  22. }
  23. export interface PromptTemplateProps {
  24. prompt_type: string;
  25. target: string;
  26. }
  27. // eslint-disable-next-line @typescript-eslint/no-empty-object-type
  28. export interface PromptTemplateLoadProps extends PromptTemplateProps {}
  29. // eslint-disable-next-line @typescript-eslint/no-empty-object-type
  30. export interface PromptResponseVerifyProps {}
  31. export interface PromptTemplateLoadResponse {
  32. input_variables: string[];
  33. response_format: string;
  34. template: string;
  35. [key: string]: any;
  36. }
  37. export interface OperatePromptParams {
  38. chat_scene: string;
  39. sub_chat_scene: string;
  40. prompt_type: string;
  41. prompt_name: string;
  42. content: string;
  43. prompt_desc: string;
  44. response_schema: string;
  45. input_variables: string;
  46. model: string;
  47. prompt_language: 'en' | 'zh';
  48. user_name: string;
  49. }
  50. export interface DebugParams {
  51. chat_scene: string;
  52. sub_chat_scene: string;
  53. prompt_code: string;
  54. prompt_type: string;
  55. prompt_name: string;
  56. content: string;
  57. prompt_desc: string;
  58. response_schema: string;
  59. input_variables: string;
  60. model: string;
  61. prompt_language: 'en';
  62. input_values: Record<string, any>;
  63. temperature: number;
  64. debug_model: string;
  65. user_input: string;
  66. }
  67. export interface LlmOutVerifyParams {
  68. llm_out: string;
  69. prompt_type: string;
  70. chat_scene: string;
  71. }
  72. export interface PromptListResponse {
  73. items: IPrompt[];
  74. page: number;
  75. page_size: number;
  76. total_count: number;
  77. total_pages: number;
  78. }