From 37202496303f3872d3b363145404b84bd7754519 Mon Sep 17 00:00:00 2001 From: colin Date: Fri, 13 Mar 2026 11:30:13 +0800 Subject: [PATCH] feat: Improve the localizing documentation --- .../AIManagement/AIManagementErrorCodes.cs | 2 +- .../Localization/Resources/en.json | 35 ++++++++++++++++++- .../Localization/Resources/zh-Hans.json | 35 ++++++++++++++++++- 3 files changed, 69 insertions(+), 3 deletions(-) diff --git a/aspnet-core/modules/ai/LINGYUN.Abp.AIManagement.Domain.Shared/LINGYUN/Abp/AIManagement/AIManagementErrorCodes.cs b/aspnet-core/modules/ai/LINGYUN.Abp.AIManagement.Domain.Shared/LINGYUN/Abp/AIManagement/AIManagementErrorCodes.cs index ae295d8db..253c9467d 100644 --- a/aspnet-core/modules/ai/LINGYUN.Abp.AIManagement.Domain.Shared/LINGYUN/Abp/AIManagement/AIManagementErrorCodes.cs +++ b/aspnet-core/modules/ai/LINGYUN.Abp.AIManagement.Domain.Shared/LINGYUN/Abp/AIManagement/AIManagementErrorCodes.cs @@ -5,7 +5,7 @@ public static class AIManagementErrorCodes public static class Workspace { - public const string Prefix = Namespace + ":100"; + public const string Prefix = Namespace + ":111"; public const string NameAlreadyExists = Prefix + "001"; } diff --git a/aspnet-core/modules/ai/LINGYUN.Abp.AIManagement.Domain.Shared/LINGYUN/Abp/AIManagement/Localization/Resources/en.json b/aspnet-core/modules/ai/LINGYUN.Abp.AIManagement.Domain.Shared/LINGYUN/Abp/AIManagement/Localization/Resources/en.json index d29ec98c1..dbec885cd 100644 --- a/aspnet-core/modules/ai/LINGYUN.Abp.AIManagement.Domain.Shared/LINGYUN/Abp/AIManagement/Localization/Resources/en.json +++ b/aspnet-core/modules/ai/LINGYUN.Abp.AIManagement.Domain.Shared/LINGYUN/Abp/AIManagement/Localization/Resources/en.json @@ -1,7 +1,40 @@ { "culture": "en", "texts": { + "AIManagement:111001": "Workspace {Workspace} already exists!", "DisplayName:MaxLatestHistoryMessagesToKeep": "Carry the recent conversation records", - "Description:MaxLatestHistoryMessagesToKeep": "When a user initiates a conversation with a large model, the upper limit of the user's recent conversation history that is carried along." + "Description:MaxLatestHistoryMessagesToKeep": "When a user initiates a conversation with a large model, the upper limit of the user's recent conversation history that is carried along.", + "Conversations:Delete": "Delete Conversation", + "Conversations:New": "New Conversation", + "Conversations:Edit": "Edit Conversation", + "ConversationsDeleteWarnMessage": "The selected conversation will be deleted. The deleted conversation records cannot be restored.!", + "ConversationsExpiredWarnMessage": "The conversation has expired. Please create a new one.!", + "ChatWelcomeTitle": "Hello, what can I do for you today?", + "ChatWelcomeMessage": "Send your question to start a new AI conversation.", + "ChatSendMessage": "Please click the button or press the Enter key to send the message.", + "Workspaces": "Workspaces", + "Workspaces:New": "New Workspace", + "Workspaces:Edit": "Edit Workspace", + "BasicInfo": "Basic Infomation", + "ModelInfo": "Model", + "DisplayName:Name": "Name", + "DisplayName:Provider": "Provider", + "DisplayName:ModelName": "Model Name", + "DisplayName:ApiBaseUrl": "Api Base Url", + "DisplayName:ApiKey": "Api Key", + "DisplayName:DisplayName": "Display Name", + "DisplayName:Description": "Description", + "DisplayName:SystemPrompt": "System Prompt", + "DisplayName:Instructions": "Instructions", + "DisplayName:Temperature": "Temperature", + "Description:Temperature": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "DisplayName:MaxOutputTokens": "Max Output Tokens", + "Description:MaxOutputTokens": "The maximum number of tokens that can be generated in the chat completion.The total length of input tokens and generated tokens is limited by the model's context length.", + "DisplayName:FrequencyPenalty": "Frequency Penalty", + "Description:FrequencyPenalty": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.", + "DisplayName:PresencePenalty": "Presence Penalty", + "Description:PresencePenalty": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.", + "DisplayName:IsEnabled": "Is Enabled", + "DisplayName:Workspace": "Workspace" } } \ No newline at end of file diff --git a/aspnet-core/modules/ai/LINGYUN.Abp.AIManagement.Domain.Shared/LINGYUN/Abp/AIManagement/Localization/Resources/zh-Hans.json b/aspnet-core/modules/ai/LINGYUN.Abp.AIManagement.Domain.Shared/LINGYUN/Abp/AIManagement/Localization/Resources/zh-Hans.json index 6eb63499b..d749e4ec7 100644 --- a/aspnet-core/modules/ai/LINGYUN.Abp.AIManagement.Domain.Shared/LINGYUN/Abp/AIManagement/Localization/Resources/zh-Hans.json +++ b/aspnet-core/modules/ai/LINGYUN.Abp.AIManagement.Domain.Shared/LINGYUN/Abp/AIManagement/Localization/Resources/zh-Hans.json @@ -1,7 +1,40 @@ { "culture": "zh-Hans", "texts": { + "AIManagement:111001": "工作区 {Workspace} 已存在!", "DisplayName:MaxLatestHistoryMessagesToKeep": "携带最近对话记录", - "Description:MaxLatestHistoryMessagesToKeep": "用户发起与大模型对话时,携带用户最近对话记录的上限." + "Description:MaxLatestHistoryMessagesToKeep": "用户发起与大模型对话时,携带用户最近对话记录的上限.", + "Conversations:Delete": "删除对话", + "Conversations:New": "新对话", + "Conversations:Edit": "编辑对话", + "ConversationsDeleteWarnMessage": "选择的对话将被删除, 已删除的对话记录无法恢复!", + "ConversationsExpiredWarnMessage": "对话已过期, 请重新创建新对话!", + "ChatWelcomeTitle": "您好,今天有什么可以帮到你?", + "ChatWelcomeMessage": "发送您的问题创建一个新AI对话.", + "ChatSendMessage": "请输入消息点击按钮或回车键发送消息.", + "Workspaces": "工作区", + "Workspaces:New": "新工作区", + "Workspaces:Edit": "编辑工作区", + "BasicInfo": "基本信息", + "ModelInfo": "模型", + "DisplayName:Name": "名称", + "DisplayName:Provider": "模型提供者", + "DisplayName:ModelName": "模型名称", + "DisplayName:ApiBaseUrl": "接口地址", + "DisplayName:ApiKey": "Api Key", + "DisplayName:DisplayName": "显示名称", + "DisplayName:Description": "描述", + "DisplayName:SystemPrompt": "系统提示词", + "DisplayName:Instructions": "补充提示", + "DisplayName:Temperature": "温度", + "Description:Temperature": "采样温度,介于 0 和 2 之间.更高的值,如 0.8,会使输出更随机,而更低的值,如 0.2,会使其更加集中和确定.", + "DisplayName:MaxOutputTokens": "Token使用数量", + "Description:MaxOutputTokens": "限制一次请求中模型生成 completion 的最大 token 数,输入 token 和输出 token 的总长度受模型的上下文长度的限制.", + "DisplayName:FrequencyPenalty": "频率惩罚", + "Description:FrequencyPenalty": "介于 -2.0 和 2.0 之间的数字.如果该值为正,那么新 token 会根据其在已有文本中的出现频率受到相应的惩罚,降低模型重复相同内容的可能性.", + "DisplayName:PresencePenalty": "存在惩罚", + "Description:PresencePenalty": "介于 -2.0 和 2.0 之间的数字.如果该值为正,那么新 token 会根据其是否已在已有文本中出现受到相应的惩罚,从而增加模型谈论新主题的可能性.", + "DisplayName:IsEnabled": "启用", + "DisplayName:Workspace": "工作区" } } \ No newline at end of file