Skip to content

Commit 0defa2d

Browse files
committed
Remove proxy URL and cleanup logging in ChatGPT adapter
The proxy URL for the ChatGPT adapter was set to an empty value in the configuration to disable proxy usage. Excessive and redundant logging statements were removed from the adapter code to improve readability and reduce noise.
1 parent b4e9bba commit 0defa2d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

internal/proxy/adapter/chatgpt.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ outLoop:
8383
}
8484
responseBody = responseBody[lengthCrlfIdx+2+int(length)+2:]
8585
dataBuffer = append(dataBuffer, chunkedData...)
86-
log.Infof("Buffer length: %d", len(dataBuffer))
86+
8787
result, err := g.createResponse(dataBuffer, false)
8888
if err == nil {
8989
if *sniffing {
9090
queue.Enqueue(result)
9191
}
9292
}
93-
log.Infof("result: %v, %v, %v", result, err == nil, *sniffing)
93+
9494
}
9595
}
9696
}
@@ -105,7 +105,7 @@ outLoop:
105105
queue.Enqueue(result)
106106
}
107107
}
108-
log.Infof("result: %v, %v, %v", result, err == nil, *sniffing)
108+
109109
}
110110

111111
func (g *ChatGPTAdapter) createResponse(dataBuffer []byte, done bool) (*model.ProxyResponse, error) {
@@ -117,7 +117,7 @@ func (g *ChatGPTAdapter) createResponse(dataBuffer []byte, done bool) (*model.Pr
117117
if len(matches) == 0 {
118118
return nil, fmt.Errorf("no match data")
119119
}
120-
log.Infof("All matches: %v", matches)
120+
121121
for i := 0; i < len(matches); i++ {
122122
match := matches[i]
123123
log.Infof("Buffer 1: %s", match[0])

runner

Submodule runner updated 1 file

0 commit comments

Comments
 (0)