diff --git a/src/dotnet/Common/Models/ResourceProviders/Agent/AgentBase.cs b/src/dotnet/Common/Models/ResourceProviders/Agent/AgentBase.cs index c6dc5b9a6..e93052520 100644 --- a/src/dotnet/Common/Models/ResourceProviders/Agent/AgentBase.cs +++ b/src/dotnet/Common/Models/ResourceProviders/Agent/AgentBase.cs @@ -97,6 +97,24 @@ public class AgentBase : ResourceBase [JsonPropertyName("virtual_security_group_id")] public string? VirtualSecurityGroupId { get; set; } + /// + /// Indicates whether to show a token count on the messages. + /// + [JsonPropertyName("show_message_tokens")] + public bool? ShowMessageTokens { get; set; } = true; + + /// + /// Indicates whether to show rating options on the messages. + /// + [JsonPropertyName("show_message_rating")] + public bool? ShowMessageRating { get; set; } = true; + + /// + /// Indicates whether to show a view prompt option on agent messages. + /// + [JsonPropertyName("show_view_prompt")] + public bool? ShowViewPrompt { get; set; } = true; + /// /// The object type of the agent. /// diff --git a/src/ui/ManagementPortal/js/types.ts b/src/ui/ManagementPortal/js/types.ts index ce20edff0..03c56bbb1 100644 --- a/src/ui/ManagementPortal/js/types.ts +++ b/src/ui/ManagementPortal/js/types.ts @@ -58,6 +58,10 @@ export type Agent = ResourceBase & { type: 'knowledge-management' | 'analytics'; inline_context: boolean; + show_message_tokens?: boolean; + show_message_rating?: boolean; + show_view_prompt?: boolean; + ai_model_object_id: string; vectorization: { diff --git a/src/ui/ManagementPortal/pages/agents/create.vue b/src/ui/ManagementPortal/pages/agents/create.vue index dbd8cffed..9a3c573b7 100644 --- a/src/ui/ManagementPortal/pages/agents/create.vue +++ b/src/ui/ManagementPortal/pages/agents/create.vue @@ -700,6 +700,45 @@ type="text" /> + + +
Would you like to show the message tokens?
+
+ +
+ + +
Would you like to allow the user to rate the agent responses?
+
+ +
+ + +
Would you like to allow the user to see the message prompts?
+
+ +
@@ -853,6 +892,10 @@ const getDefaultFormValues = () => { orchestration_settings: { orchestrator: 'LangChain' as string, }, + + showMessageTokens: false as Boolean, + showMessageRating: false as Boolean, + showViewPrompt: false as Boolean, }; }; @@ -1139,6 +1182,10 @@ export default { agent.capabilities?.includes(localOption.code), ) || this.selectedAgentCapabilities; } + + this.showMessageTokens = agent.properties?.show_message_tokens ?? false; + this.showMessageRating = agent.properties?.show_message_rating ?? false; + this.showViewPrompt = agent.properties?.show_view_prompt ?? false; }, updateAgentWelcomeMessage(newContent: string) { @@ -1342,7 +1389,12 @@ export default { type: this.agentType, name: this.agentName, description: this.agentDescription, - properties: { welcome_message: this.agentWelcomeMessage }, + properties: { + welcome_message: this.agentWelcomeMessage, + show_message_tokens: this.showMessageTokens, + show_message_rating: this.showMessageRating, + show_view_prompt: this.showViewPrompt, + }, object_id: this.object_id, inline_context: this.inline_context, cost_center: this.cost_center, diff --git a/src/ui/UserPortal/components/ChatMessage.vue b/src/ui/UserPortal/components/ChatMessage.vue index 79740dead..a4481f776 100644 --- a/src/ui/UserPortal/components/ChatMessage.vue +++ b/src/ui/UserPortal/components/ChatMessage.vue @@ -16,7 +16,7 @@ -