From 5eb5a257491d66948d935cfbeddc57d86511786b Mon Sep 17 00:00:00 2001 From: Kenny Date: Tue, 26 Mar 2024 16:28:37 +0800 Subject: [PATCH 1/4] Update spark-1.5.yaml --- api/core/model_runtime/model_providers/spark/llm/spark-1.5.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/api/core/model_runtime/model_providers/spark/llm/spark-1.5.yaml b/api/core/model_runtime/model_providers/spark/llm/spark-1.5.yaml index effbe45e27e8c..c2759e9328fbb 100644 --- a/api/core/model_runtime/model_providers/spark/llm/spark-1.5.yaml +++ b/api/core/model_runtime/model_providers/spark/llm/spark-1.5.yaml @@ -1,4 +1,5 @@ model: spark-1.5 +deprecated: true label: en_US: Spark V1.5 model_type: llm From dc3401d4cec7dad7ca69563927ba21542160907e Mon Sep 17 00:00:00 2001 From: Kenny Date: Tue, 26 Mar 2024 19:41:44 +0800 Subject: [PATCH 2/4] Update _client.py --- api/core/model_runtime/model_providers/spark/llm/_client.py | 4 +++- 1 file changed, 3 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 a4659454eed30..ffe990da6bc7e 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,9 @@ def gen_params(self, messages: list, user_id: str, data = { "header": { "app_id": self.app_id, - "uid": user_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": { From 77df07a5e2ae379a017874daac59e9da3a4a3595 Mon Sep 17 00:00:00 2001 From: Kenny Date: Tue, 26 Mar 2024 19:42:24 +0800 Subject: [PATCH 3/4] Update spark-1.5.yaml --- api/core/model_runtime/model_providers/spark/llm/spark-1.5.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/api/core/model_runtime/model_providers/spark/llm/spark-1.5.yaml b/api/core/model_runtime/model_providers/spark/llm/spark-1.5.yaml index c2759e9328fbb..effbe45e27e8c 100644 --- a/api/core/model_runtime/model_providers/spark/llm/spark-1.5.yaml +++ b/api/core/model_runtime/model_providers/spark/llm/spark-1.5.yaml @@ -1,5 +1,4 @@ model: spark-1.5 -deprecated: true label: en_US: Spark V1.5 model_type: llm From 273153e6e36c43284dd9198a64f47571e267ab8f Mon Sep 17 00:00:00 2001 From: Kenny Date: Wed, 27 Mar 2024 09:40:41 +0800 Subject: [PATCH 4/4] Update _client.py --- api/core/model_runtime/model_providers/spark/llm/_client.py | 1 - 1 file changed, 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 ffe990da6bc7e..4c8790141d26a 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,6 @@ def gen_params(self, messages: list, user_id: str, 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 },