Replies: 4 comments 4 replies
-
|
I'm busy with some other features, but a PR for this will be welcome. I don't know anything about z.ai. If it offers an OpenAI-compatible API there will be no code needed, just configuration. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
@karthink it offers both the OpenAI and the Anthropic including thinking mode, and with their generous pro plan it is a good and viable option to choose.
I see. Why don't they use an OpenAI-compatible API like all the other providers?
|
Beta Was this translation helpful? Give feedback.
1 reply
-
|
I think their intention is to make their model available for Claude Code, Cline and others like. So it provides an interface for both Anthropic and OpenAi, one just decides which one is beneficial. I configured it as openai variant and it works, hadn't had time to play with other options.
If it offers an OpenAI/Anthropic-compatible API, then there is no need to add any code to gptel. If you can provide a PR with a README instructions section for z.ai I can merge it.
|
Beta Was this translation helpful? Give feedback.
2 replies
-
|
Here's what I'm using: (let ((meta '( :context-window 128
:capabilities (json tool reasoning))))
(gptel-make-openai "zai"
:stream t
:host "api.z.ai"
:endpoint "/api/paas/v4/chat/completions"
:key #'gptel-api-key-from-auth-source
:models
`(( glm-4.6 :input-cost 0.6 :output-cost 2.2
:context-window 200
:capabilities (json tool reasoning))
(glm-4.5 :input-cost 0.6 :output-cost 2.2 ,@meta)
(glm-4.5-x :input-cost 2.2 :output-cost 8.9 ,@meta)
(glm-4.5-air :input-cost 0.2 :output-cost 1.1 ,@meta)
(glm-4.5-air-x :input-cost 1.1 :output-cost 4.5 ,@meta)
(glm-4-32b-0414-128k :input-cost 0.1 :output-cost 0.1 ,@meta)
( glm-4.5v :input-cost 0.6 :output-cost 1.8
:capabilities (media)
:mime-types
("image/jpeg" "image/png"
"application/pdf" "image/gif"))
glm-4.5-flash))) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Couldn't find any reference to it on gptel github page.
Beta Was this translation helpful? Give feedback.
All reactions