| return cast_parameter_value(self, value) | return cast_parameter_value(self, value) | ||||
| type: AgentStrategyParameterType = Field(..., description="The type of the parameter") | type: AgentStrategyParameterType = Field(..., description="The type of the parameter") | ||||
| help: Optional[I18nObject] = None | |||||
| def init_frontend_parameter(self, value: Any): | def init_frontend_parameter(self, value: Any): | ||||
| return init_frontend_parameter(self, self.type, value) | return init_frontend_parameter(self, self.type, value) |
| export type StrategyParamItem = { | export type StrategyParamItem = { | ||||
| name: string | name: string | ||||
| label: Record<Locale, string> | label: Record<Locale, string> | ||||
| human_description: Record<Locale, string> | |||||
| llm_description: string | |||||
| help: Record<Locale, string> | |||||
| placeholder: Record<Locale, string> | placeholder: Record<Locale, string> | ||||
| type: string | type: string | ||||
| scope: string | scope: string |
| variable: param.name, | variable: param.name, | ||||
| show_on: [], | show_on: [], | ||||
| type: toType(param.type), | type: toType(param.type), | ||||
| tooltip: param.help, | |||||
| } | } | ||||
| } | } | ||||
| outputSchema, | outputSchema, | ||||
| handleMemoryChange, | handleMemoryChange, | ||||
| } = useConfig(props.id, props.data) | } = useConfig(props.id, props.data) | ||||
| console.log('currentStrategy', currentStrategy) | |||||
| const { t } = useTranslation() | const { t } = useTranslation() | ||||
| const nodeInfo = useMemo(() => { | const nodeInfo = useMemo(() => { | ||||
| if (!runResult) | if (!runResult) |