🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
🌐 chore: translate non-English comments to English in model-bank (#10488)
LobeHub Bot766a2616c08e
diff --git a/packages/model-bank/src/standard-parameters/index.ts b/packages/model-bank/src/standard-parameters/index.tsindex c3dfc0ebfb3..ea57bef4e98 100644--- a/packages/model-bank/src/standard-parameters/index.ts+++ b/packages/model-bank/src/standard-parameters/index.ts@@ -5,18 +5,18 @@ import { z } from 'zod';export const MAX_SEED = 2 ** 31 - 1;/**- * 默认宽高比,当模型不支持原生宽高比时使用+ * Default aspect ratio, used when the model doesn't support native aspect ratio*/export const DEFAULT_ASPECT_RATIO = '1:1';export const PRESET_ASPECT_RATIOS = [- DEFAULT_ASPECT_RATIO, // '1:1' - 正方形,最常用- '16:9', // 现代显示器/电视/视频标准- '9:16', // 手机竖屏/短视频- '4:3', // 传统显示器/照片- '3:4', // 传统竖屏照片- '3:2', // 经典照片比例横屏- '2:3', // 经典照片比例竖屏+ DEFAULT_ASPECT_RATIO, // '1:1' - Square, most commonly used+ '16:9', // Modern monitors/TVs/video standard+ '9:16', // Mobile portrait/short videos+ '4:3', // Traditional monitors/photos+ '3:4', // Traditional portrait photos+ '3:2', // Classic photo ratio landscape+ '2:3', // Classic photo ratio portrait];/**@@ -52,10 +52,10 @@ export const CHAT_MODEL_IMAGE_GENERATION_PARAMS: ModelParamsSchema = {prompt: { default: '' },};-// 定义顶层的元规范 - 平铺结构+// Define top-level meta specification - flat structureexport const ModelParamsMetaSchema = z.object({/**- * Prompt 是唯一一个每个模型都有的参数+ * Prompt is the only parameter that every model has*/prompt: z.object({default: z.string().optional().default(''),@@ -213,7 +213,7 @@ export const ModelParamsMetaSchema = z.object({}).optional(),});-// 导出推断出的类型,供定义对象使用+// Export inferred type for use in defining objectsexport type ModelParamsSchema = z.input<typeof ModelParamsMetaSchema>;export type ModelParamsOutputSchema = z.output<typeof ModelParamsMetaSchema>;export type ModelParamsKeys = Simplify<keyof ModelParamsOutputSchema>;@@ -244,16 +244,16 @@ export type RuntimeImageGenParams = Pick<_StandardImageGenerationParameters, 'prexport type RuntimeImageGenParamsKeys = keyof RuntimeImageGenParams;export type RuntimeImageGenParamsValue = RuntimeImageGenParams[RuntimeImageGenParamsKeys];-// 验证函数+// Validation functionexport function validateModelParamsSchema(paramsSchema: unknown): ModelParamsOutputSchema {return ModelParamsMetaSchema.parse(paramsSchema);}/**- * 从参数定义对象提取默认值+ * Extract default values from parameter definition object*/export function extractDefaultValues(paramsSchema: ModelParamsSchema) {- // 部分默认值从 ModelParamsMetaSchema 中获取+ // Some default values are obtained from ModelParamsMetaSchemaconst schemaWithDefault = ModelParamsMetaSchema.parse(paramsSchema);return Object.fromEntries(Object.entries(schemaWithDefault).map(([key, value]) => {