chatglm add API URL #4532
Replies: 1 comment
-
To address the issue of changing the API URL path from Here's a concise guide on what to do:
if completion_type is LLMMode.CHAT:
endpoint_url = urljoin(endpoint_url, 'chat/completions')
if completion_type is LLMMode.CHAT:
endpoint_url = urljoin(endpoint_url, 'v2/chat/completions') This change ensures that all chat completion requests are directed to the correct Make sure your chatglm setup is configured to handle requests at this new endpoint. After making this modification, your self-hosted Dify application should correctly interact with the chatglm API at the updated path.
|
Beta Was this translation helpful? Give feedback.
-
Self Checks
Dify version
0.6.8
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
i want to add API URL to chatglm
but occur a 404
log show
HTTP Request: POST http://10.15.12.xxx:18504/v1/chat/completions "HTTP/1.1 404 Not Found"
i just input http://10.15.12.xxx:18504
where add the suffix URL like /v1/chat/completions?
our local chatglm llm api like /v2/chat/completions
so i must find the code replace /v1/chat/completions to /v2/chat/completions
where the code?
✔️ Expected Behavior
none
❌ Actual Behavior
none
Beta Was this translation helpful? Give feedback.
All reactions