Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix:delete the slash at the end of xinference provider server_url (#2730)

taokuizu405a00bb2cc5
diff --git a/api/core/model_runtime/model_providers/xinference/rerank/rerank.py b/api/core/model_runtime/model_providers/xinference/rerank/rerank.py
index 1399e9ccd2f..dd25037d348 100644
--- a/api/core/model_runtime/model_providers/xinference/rerank/rerank.py
+++ b/api/core/model_runtime/model_providers/xinference/rerank/rerank.py
@@ -44,6 +44,9 @@ class XinferenceRerankModel(RerankModel):
docs=[]
)
+ if credentials['server_url'].endswith('/'):
+ credentials['server_url'] = credentials['server_url'][:-1]
+
# initialize client
client = Client(
base_url=credentials['server_url']