Skip to content

Commit 2a75afe

Browse files
Merge pull request #2190 from solliancenet/sc-add-text-rewrite-and-cache-settings-to-agent-form
Add text rewrite and cache settings to agent form
2 parents 27e7506 + 2f17d01 commit 2a75afe

File tree

6 files changed

+993
-757
lines changed

6 files changed

+993
-757
lines changed

src/ui/ManagementPortal/js/types.ts

Lines changed: 59 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export type Agent = ResourceBase & {
8686
show_file_upload?: boolean;
8787

8888
ai_model_object_id: string;
89+
prompt_object_id: string;
8990

9091
vectorization: {
9192
dedicated_pipeline: boolean;
@@ -106,14 +107,17 @@ export type Agent = ResourceBase & {
106107
orchestration_settings: {
107108
orchestrator: string;
108109
};
110+
109111
conversation_history_settings: {
110112
enabled: boolean;
111113
max_history: number;
112114
};
115+
113116
gatekeeper_settings: {
114117
use_system_setting: boolean;
115118
options: string[];
116119
};
120+
117121
language_model: {
118122
type: string;
119123
provider: string;
@@ -125,7 +129,24 @@ export type Agent = ResourceBase & {
125129
version: string;
126130
deployment: string;
127131
};
128-
prompt_object_id: string;
132+
133+
text_rewrite_settings?: {
134+
user_prompt_rewrite_enabled: boolean;
135+
user_prompt_rewrite_settings: {
136+
user_prompt_rewrite_ai_model_object_id: string;
137+
user_prompt_rewrite_prompt_object_id: string;
138+
user_prompts_window_size: number;
139+
};
140+
};
141+
142+
cache_settings?: {
143+
semantic_cache_enabled: boolean;
144+
semantic_cache_settings: {
145+
embedding_ai_model_object_id: string;
146+
embedding_dimensions: number;
147+
minimum_similarity_threshold: number;
148+
};
149+
};
129150
};
130151

131152
export type AgentAccessToken = ResourceBase & {
@@ -357,21 +378,7 @@ export type CreateAgentRequest = ResourceBase & {
357378
show_file_upload?: boolean;
358379

359380
ai_model_object_id: string;
360-
361-
language_model: {
362-
type: string;
363-
provider: string;
364-
temperature: number;
365-
use_chat: boolean;
366-
api_endpoint: string;
367-
api_key: string;
368-
api_version: string;
369-
version: string;
370-
deployment: string;
371-
};
372-
373-
capabilities: string[];
374-
tools: AgentTool[];
381+
prompt_object_id: string;
375382

376383
vectorization: {
377384
dedicated_pipeline: boolean;
@@ -384,19 +391,54 @@ export type CreateAgentRequest = ResourceBase & {
384391
trigger_cron_schedule: string;
385392
};
386393

394+
capabilities: string[];
395+
tools: AgentTool[];
396+
workflow: AgentWorkflow;
397+
387398
sessions_enabled: boolean;
388399
orchestration_settings: {
389400
orchestrator: string;
390401
};
402+
391403
conversation_history_settings: {
392404
enabled: boolean;
393405
max_history: number;
394406
};
407+
395408
gatekeeper_settings: {
396409
use_system_setting: boolean;
397410
options: string[];
398411
};
399-
prompt_object_id: string;
412+
413+
language_model: {
414+
type: string;
415+
provider: string;
416+
temperature: number;
417+
use_chat: boolean;
418+
api_endpoint: string;
419+
api_key: string;
420+
api_version: string;
421+
version: string;
422+
deployment: string;
423+
};
424+
425+
text_rewrite_settings?: {
426+
user_prompt_rewrite_enabled: boolean;
427+
user_prompt_rewrite_settings: {
428+
user_prompt_rewrite_ai_model_object_id: string;
429+
user_prompt_rewrite_prompt_object_id: string;
430+
user_prompts_window_size: number;
431+
};
432+
};
433+
434+
cache_settings?: {
435+
semantic_cache_enabled: boolean;
436+
semantic_cache_settings: {
437+
embedding_ai_model_object_id: string;
438+
embedding_dimensions: number;
439+
minimum_similarity_threshold: number;
440+
};
441+
};
400442
};
401443

402444
export type CreatePromptRequest = ResourceBase & {

0 commit comments

Comments
 (0)