Qiao-yq commented on code in PR #1567:
URL: https://github.com/apache/dubbo-admin/pull/1567#discussion_r4140226931
##########
ai/component/agent/react/config.go:
##########
@@ -70,6 +73,9 @@ func (c *AgentSpec) Validate() error {
if c.ChannelBufferSize <= 0 {
return fmt.Errorf("channel_buffer_size must be greater than 0")
}
+ if c.ContextWindowTurns <= 0 {
Review Comment:
Thanks.Fixed by applying the default before component validation:
ContextWindowTurns == 0 is normalized to the default value 10 in
NewAgentComponent, while negative values are still rejected. The ReAct
constructor keeps its fallback as an additional safeguard. Added tests covering
zero-value defaulting, negative-value validation, and direct AgentSpec
construction.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]