🔧 refactor(relay): replace UUID generation with helper function for response IDs

This commit is contained in:
CaIon
2025-06-16 21:02:27 +08:00
parent b4b6bd46fe
commit 6b7295bbdf
3 changed files with 6 additions and 7 deletions

View File

@@ -73,7 +73,7 @@ func streamResponsePaLM2OpenAI(palmResponse *PaLMChatResponse) *dto.ChatCompleti
func palmStreamHandler(c *gin.Context, resp *http.Response) (*dto.OpenAIErrorWithStatusCode, string) {
responseText := ""
responseId := fmt.Sprintf("chatcmpl-%s", common.GetUUID())
responseId := helper.GetResponseID(c)
createdTime := common.GetTimestamp()
dataChan := make(chan string)
stopChan := make(chan bool)