From 13694293e3ba33d75dbbb14258fd9cfb685f538f Mon Sep 17 00:00:00 2001 From: Kenny Date: Wed, 27 Mar 2024 09:58:41 +0800 Subject: [PATCH] fix: resolve header.uid' length must be less or equal than 32 on Spark V1.5 (#2983) --- api/core/model_runtime/model_providers/spark/llm/_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/core/model_runtime/model_providers/spark/llm/_client.py b/api/core/model_runtime/model_providers/spark/llm/_client.py index a4659454e..4c8790141 100644 --- a/api/core/model_runtime/model_providers/spark/llm/_client.py +++ b/api/core/model_runtime/model_providers/spark/llm/_client.py @@ -148,7 +148,8 @@ class SparkLLMClient: data = { "header": { "app_id": self.app_id, - "uid": user_id + # resolve this error message => $.header.uid' length must be less or equal than 32 + "uid": user_id[:32] if user_id else None }, "parameter": { "chat": {