Go: add new provider: google (#14395)

### What problem does this PR solve?

As title.

### Type of change

- [x] New Feature (non-breaking change which adds functionality)

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-04-27 20:35:47 +08:00
committed by GitHub
parent 343bda1119
commit 965717c4fb
15 changed files with 456 additions and 181 deletions

View File

@@ -737,10 +737,10 @@ func (h *ProviderHandler) ChatToModel(c *gin.Context) {
}
// Stream response using sender function (best performance, no channel)
errorCode := h.modelProviderService.ChatToModelStreamWithSender(providerName, instanceName, req.ModelName, userID, req.Message, &apiConfig, &chatConfig, sender)
errorCode, err := h.modelProviderService.ChatToModelStreamWithSender(providerName, instanceName, req.ModelName, userID, req.Message, &apiConfig, &chatConfig, sender)
if errorCode != common.CodeSuccess {
c.SSEvent("error", "stream failed")
c.SSEvent("error", err.Error())
}
return
}