Skip to content

Commit

Permalink
Use "chat-model" as the name for llm-open-compatible
Browse files Browse the repository at this point in the history
For example, after this change, the below provider gives
"deepseek-chat" instead of "Open AI" as the name.

```elisp
(make-llm-openai-compatible
  :url "https://api.deepseek.com/v1/"
  :chat-model "deepseek-chat"
  :key "...")
```
  • Loading branch information
whhone committed Jan 31, 2025
1 parent 1aafa60 commit e64bffb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions llm-openai.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)))

Expand Down

0 comments on commit e64bffb

Please sign in to comment.