branch: externals/llm commit 41bdeef9c53954940ac7170d5e11b2b9b8899cbe Author: Wai Hon Law <whh...@gmail.com> Commit: GitHub <nore...@github.com>
Use "chat-model" as the name for "llm-open-compatible" (#148) Consider this `llm-openai-compatible`. `(llm-name provider)` gives "Open AI" which is very confusing, especially when I have another Open AI provider. ```elisp (make-llm-openai-compatible :url "https://api.deepseek.com/v1/" :chat-model "deepseek-chat" :key "...") ``` After this change, the below provider gives "deepseek-chat" instead of "Open AI" as the name. --- llm-openai.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llm-openai.el b/llm-openai.el index c0fdb66071..a0d37b519e 100644 --- a/llm-openai.el +++ b/llm-openai.el @@ -357,6 +357,11 @@ RESPONSE can be nil if the response is complete." "Return the name of the provider." "Open AI") +(cl-defmethod llm-name ((provider llm-openai-compatible)) + "Return the name of the `llm-openai-compatible' PROVIDER." + (or (llm-openai-compatible-chat-model provider) + "Open AI Compatible")) + (cl-defmethod llm-chat-token-limit ((provider llm-openai)) (llm-provider-utils-model-token-limit (llm-openai-chat-model provider)))