Skip to content

Commit

Permalink
Ensure llm-ollama dependency are loaded
Browse files Browse the repository at this point in the history
Ensured that `llm-ollama` is required when constructing Ollama providers,
preventing potential errors due to unloaded modules. Updated function calls and
declarations accordingly.
  • Loading branch information
s-kostyaev committed Feb 26, 2025
1 parent 2b614a1 commit cd001de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.org
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
lambda. Also, updated the header line format to display the correct command
names using ~substitute-command-keys~.
- Removed redisplay call to prevent flickering.
- Ensure ~llm-ollama~ dependency are loaded.
* Version 1.4.2
- Fixed the auto-scroll logic in ~ellama.el~ to ensure it correctly sets and
resets ~stop-scroll~ based on cursor position changes.
Expand Down
3 changes: 3 additions & 0 deletions ellama.el
Original file line number Diff line number Diff line change
Expand Up @@ -2989,6 +2989,7 @@ Call CALLBACK on result list of strings. ARGS contains keys for fine control.
(llm-ollama-host ellama-provider)))
(port (when (llm-ollama-p ellama-provider)
(llm-ollama-port ellama-provider))))
(require 'llm-ollama)
(if host
(make-llm-ollama
:chat-model model-name :embedding-model model-name :host host :port port)
Expand Down Expand Up @@ -3117,6 +3118,8 @@ Call CALLBACK on result list of strings. ARGS contains keys for fine control.

(defun ellama-construct-ollama-provider-from-transient ()
"Make provider with ollama mode in transient menu."
(declare-function make-llm-ollama "ext:llm-ollama")
(require 'llm-ollama)
(make-llm-ollama
:chat-model ellama-transient-ollama-model-name
:default-chat-temperature ellama-transient-temperature
Expand Down

0 comments on commit cd001de

Please sign in to comment.