baerwang commented on code in PR #706:
URL: https://github.com/apache/dubbo-go-pixiu/pull/706#discussion_r2238940469
##########
pkg/filter/llm/tokenizer/tokenizer.go:
##########
@@ -157,6 +173,36 @@ func (f *Filter) logUsage(usage map[string]any) {
}
}
+// getDecompressedReader returns an io.ReadCloser that decompresses the body
based on the encoding.
+func getDecompressedReader(body io.Reader, encoding string) (io.ReadCloser,
error) {
+ switch encoding {
+ case constant.HeaderValueGzip:
+ return gzip.NewReader(body)
+ case constant.HeaderValueDeflate:
+ return flate.NewReader(body), nil
+ case "":
Review Comment:
case "" 删掉然后把`return io.NopCloser(body), nil` 改成default 下面
--
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]