ThisaraWeerakoon commented on code in PR #826:
URL: https://github.com/apache/dubbo-go-samples/pull/826#discussion_r2041106377


##########
llm/config/config.go:
##########
@@ -94,6 +95,17 @@ func Load(envFile string) (*Config, error) {
                        return
                }
                config.NacosURL = nacosURL
+               maxContextStr := os.Getenv("MAX_CONTEXT_COUNT")
+               if maxContextStr == "" {
+                       config.MaxContextCount = 3 // Default to 3 for backward 
compatibility
+               } else {
+                       maxContext, err := strconv.Atoi(maxContextStr)
+                       if err != nil {
+                               configErr = fmt.Errorf("invalid 
MAX_CONTEXT_COUNT value: %v", err)
+                               return
+                       }
+                       config.MaxContextCount = maxContext
+               }
        })

Review Comment:
   > > @ThisaraWeerakoon TIME_OUT_SECOND has the same problen, can u help solve 
it as well?
   > 
   > sure. I created a new issue - just to keep things clear and organized. I 
will work on it. Thanks.
   
    I initially created a new issue to keep things organized, but I’ve applied 
the fix in this same PR since it’s a minor change. I think opening a separate 
PR is unnecessary, so I’ve gone ahead and closed the issue. Thanks!
   



-- 
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]

Reply via email to