Skip to content

Commit 519bc7e

Browse files
author
moon
committed
add omitted open api url postfix at _generate method
1 parent effccc6 commit 519bc7e

File tree

1 file changed

+2
-0
lines changed
  • api/core/model_runtime/model_providers/openai_api_compatible/llm

1 file changed

+2
-0
lines changed

api/core/model_runtime/model_providers/openai_api_compatible/llm/llm.py

+2
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ def _generate(
333333
endpoint_url = credentials["endpoint_url"]
334334
if not endpoint_url.endswith("/"):
335335
endpoint_url += "/"
336+
if not endpoint_url.endswith("v1/"):
337+
endpoint_url += "v1/"
336338

337339
data = {"model": model, "stream": stream, **model_parameters}
338340

0 commit comments

Comments
 (0)