chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -28,7 +28,7 @@ interface FieldInitStrategy {
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户修改模型“生成多样性”参数时,切换为“自定义”模式
|
||||
* Switch to "Custom" mode when the user modifies the model "Generate Diversity" parameter
|
||||
*/
|
||||
class CustomModelStyleStrategy implements FieldInitStrategy {
|
||||
handler: (_field: DataField, form: Form) => void = (_field, form) =>
|
||||
@@ -49,7 +49,7 @@ function isDataField(field: GeneralField): field is DataField {
|
||||
}
|
||||
|
||||
/**
|
||||
* 当某个字段值小于阈值时,使用 field.feedbacks 显示提示文案
|
||||
* When a field value is less than the threshold, use field.feedbacks to display prompt text
|
||||
* https://core.formilyjs.org/zh-CN/api/models/field#ifieldfeedback
|
||||
*/
|
||||
class MinimumValueStrategy implements FieldInitStrategy {
|
||||
@@ -80,8 +80,8 @@ class MinimumValueStrategy implements FieldInitStrategy {
|
||||
|
||||
export const fieldInitStrategies = [
|
||||
new CustomModelStyleStrategy(),
|
||||
// 重复语句惩罚 < 0 时,显示提示文案
|
||||
// When the repeated sentence penalty is < 0, the prompt copy is displayed
|
||||
new MinimumValueStrategy('frequency_penalty', 0, 'model_setting_alert'),
|
||||
// 最大回复长度 < 100 时,显示提示文案
|
||||
// When the maximum reply length is < 100, the prompt copy is displayed
|
||||
new MinimumValueStrategy('max_tokens', 100, 'model_setting_alert_2'),
|
||||
];
|
||||
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
} from '@coze-arch/bot-api/developer_api';
|
||||
|
||||
interface AgentModelFuncConfigCheckContext {
|
||||
// agent 中的 dataset 可能缺少元信息,需要获取完整数据的方法
|
||||
// The dataset in the agent may lack meta information and require a way to obtain the complete data
|
||||
getDatasetById: (id: string) => Dataset | undefined;
|
||||
config: Model['func_config'];
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ export const convertFormValueToModelInfo = (
|
||||
values: Record<string, unknown>,
|
||||
): ModelInfo => {
|
||||
const { HistoryRound, ContextContentType, ...rest } = values;
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention -- 不适用这个 case
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention -- not applicable to this case
|
||||
const ShortMemPolicy: ShortMemPolicy = {};
|
||||
|
||||
if (typeof HistoryRound === 'number') {
|
||||
|
||||
@@ -38,8 +38,8 @@ export const getFixedModelFormValues = (
|
||||
const parameterType = targetParameter.type;
|
||||
const { options } = targetParameter;
|
||||
|
||||
// 修正 枚举 类型的参数不在枚举范围内
|
||||
// IDL 无法写范型 转换成 string 比较
|
||||
// Fixed that parameters of type enumeration are not in the scope of enumeration
|
||||
// IDL cannot write paradigm, converted to string comparison
|
||||
if (options?.length) {
|
||||
if (options.findIndex(option => option.value === String(value)) >= 0) {
|
||||
return;
|
||||
@@ -50,7 +50,7 @@ export const getFixedModelFormValues = (
|
||||
);
|
||||
}
|
||||
|
||||
// 修正 number 类型的参数超过最大、最小值
|
||||
// Fixed number type parameters exceeding maximum and minimum values
|
||||
if (
|
||||
parameterType === ModelParamType.Float ||
|
||||
parameterType === ModelParamType.Int
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import { uniq } from 'lodash-es';
|
||||
/**
|
||||
* 以 class id 首次出现的顺序进行排序
|
||||
* Sort in the order in which the class id first appears
|
||||
*/
|
||||
export const getModelClassSortList = (classIdList: string[]) =>
|
||||
uniq(classIdList);
|
||||
|
||||
Reference in New Issue
Block a user