Browse Source

fix: resolve header.uid' length must be less or equal than 32 on Spark V1.5 (#2983)

Kenny 1 year ago
parent
commit
13694293e3
1 changed files with 2 additions and 1 deletions
  1. 2 1
      api/core/model_runtime/model_providers/spark/llm/_client.py

+ 2 - 1
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": {