Spaces:
Running
Running
Update flare-ui/src/app/services/api.service.ts
Browse files
flare-ui/src/app/services/api.service.ts
CHANGED
@@ -46,20 +46,57 @@ export interface ResponseMapping {
|
|
46 |
json_path: string;
|
47 |
}
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
export interface Version {
|
50 |
id: number;
|
51 |
caption?: string;
|
52 |
description?: string;
|
53 |
-
default_api: string;
|
54 |
published: boolean;
|
55 |
-
general_prompt?: string;
|
56 |
-
llm:
|
57 |
-
|
58 |
-
generation_config: any;
|
59 |
-
use_fine_tune: boolean;
|
60 |
-
fine_tune_zip: string;
|
61 |
-
};
|
62 |
-
intents: any[];
|
63 |
parameters: any[];
|
64 |
last_update_date?: string;
|
65 |
}
|
|
|
46 |
json_path: string;
|
47 |
}
|
48 |
|
49 |
+
export interface IntentParameter {
|
50 |
+
name: string;
|
51 |
+
caption: string;
|
52 |
+
type: 'str' | 'int' | 'float' | 'bool' | 'date';
|
53 |
+
required: boolean;
|
54 |
+
variable_name: string;
|
55 |
+
extraction_prompt?: string;
|
56 |
+
validation_regex?: string;
|
57 |
+
invalid_prompt?: string;
|
58 |
+
type_error_prompt?: string;
|
59 |
+
}
|
60 |
+
|
61 |
+
export interface Intent {
|
62 |
+
name: string;
|
63 |
+
caption: string;
|
64 |
+
locale: string;
|
65 |
+
detection_prompt: string;
|
66 |
+
examples: string[];
|
67 |
+
parameters: IntentParameter[];
|
68 |
+
action: string;
|
69 |
+
fallback_timeout_prompt?: string;
|
70 |
+
fallback_error_prompt?: string;
|
71 |
+
}
|
72 |
+
|
73 |
+
export interface GenerationConfig {
|
74 |
+
max_new_tokens: number;
|
75 |
+
temperature: number;
|
76 |
+
top_p: number;
|
77 |
+
top_k?: number;
|
78 |
+
repetition_penalty?: number;
|
79 |
+
do_sample?: boolean;
|
80 |
+
num_beams?: number;
|
81 |
+
length_penalty?: number;
|
82 |
+
early_stopping?: boolean;
|
83 |
+
}
|
84 |
+
|
85 |
+
export interface LLMConfig {
|
86 |
+
repo_id: string;
|
87 |
+
generation_config: GenerationConfig; // any yerine GenerationConfig
|
88 |
+
use_fine_tune: boolean;
|
89 |
+
fine_tune_zip: string;
|
90 |
+
}
|
91 |
+
|
92 |
export interface Version {
|
93 |
id: number;
|
94 |
caption?: string;
|
95 |
description?: string;
|
|
|
96 |
published: boolean;
|
97 |
+
general_prompt?: string;
|
98 |
+
llm: LLMConfig; // inline yerine LLMConfig
|
99 |
+
intents: Intent[];
|
|
|
|
|
|
|
|
|
|
|
100 |
parameters: any[];
|
101 |
last_update_date?: string;
|
102 |
}
|