Spaces:
Paused
Paused
add missing url params
Browse files
internal/upstream/client.go
CHANGED
|
@@ -56,12 +56,12 @@ func MakeUpstreamRequest(token string, messages []model.Message, modelName strin
|
|
| 56 |
|
| 57 |
signature := auth.GenerateSignature(userID, requestID, latestUserContent, timestamp)
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
enableThinking := model.IsThinkingModel(modelName)
|
| 66 |
autoWebSearch := model.IsSearchModel(modelName)
|
| 67 |
if targetModel == "glm-4.5v" || targetModel == "glm-4.6v" {
|
|
|
|
| 56 |
|
| 57 |
signature := auth.GenerateSignature(userID, requestID, latestUserContent, timestamp)
|
| 58 |
|
| 59 |
+
url := fmt.Sprintf("https://chat.z.ai/api/v2/chat/completions?timestamp=%d&requestId=%s&user_id=%s&version=0.0.1&platform=web&token=%s¤t_url=%s&pathname=%s&signature_timestamp=%d&language=en-US&languages=en-US,en&timezone=America%%2FSantiago&cookie_enabled=true&screen_width=1920&screen_height=1080&screen_resolution=1920x1080&color_depth=24&pixel_ratio=1&browser_name=Chrome&os_name=Windows&is_mobile=false&is_touch=false&max_touch_points=0",
|
| 60 |
+
timestamp, requestID, userID, token,
|
| 61 |
+
fmt.Sprintf("https://chat.z.ai/c/%s", chatID),
|
| 62 |
+
fmt.Sprintf("/c/%s", chatID),
|
| 63 |
+
timestamp)
|
| 64 |
+
|
| 65 |
enableThinking := model.IsThinkingModel(modelName)
|
| 66 |
autoWebSearch := model.IsSearchModel(modelName)
|
| 67 |
if targetModel == "glm-4.5v" || targetModel == "glm-4.6v" {
|