Skip to content

Commit

Permalink
Fix various byte compilation errors, with one actual issue in Vertex
Browse files Browse the repository at this point in the history
  • Loading branch information
ahyatt committed May 5, 2024
1 parent 4771614 commit 66de85d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion NEWS.org
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
* Veresion 0.14
* Veresion 0.14.1
- Fix various issues with the 0.14 release
* Version 0.14
- Introduce new way of creating prompts: llm-make-chat-prompt, deprecating the older ways.
- Improve Vertex error handling
* Version 0.13
Expand Down
2 changes: 1 addition & 1 deletion llm-gemini.el
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ You can get this at https://makersuite.google.com/app/apikey."
`((model . ,(llm-gemini-embedding-model provider))
(content . ((parts . (((text . ,string))))))))

(cl-defmethod llm-provider-embedding-extract-result ((provider llm-gemini) response)
(cl-defmethod llm-provider-embedding-extract-result ((_ llm-gemini) response)
(assoc-default 'values (assoc-default 'embedding response)))

;; from https://ai.google.dev/tutorials/rest_quickstart
Expand Down
2 changes: 1 addition & 1 deletion llm-provider-utils.el
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ CALLS are a list of `llm-provider-utils-function-call'.")
:data (llm-provider-embedding-request provider string)
:on-success (lambda (data)
(if-let ((err-msg (llm-provider-embedding-extract-error provider data)))
(llm-request-callback-in-buffer
(llm-provider-utils-callback-in-buffer
buf error-callback 'error
err-msg)
(llm-provider-utils-callback-in-buffer
Expand Down
6 changes: 3 additions & 3 deletions llm-vertex.el
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,16 @@ KEY-GENTIME keeps track of when the key was generated, because the key must be r
(format "Could not finish due to detected Gemini safety violations: %s"
(assoc-default 'safetyRatings (aref candidates 0))))))))

(cl-defmethod llm-provider-embedding-request ((provider llm-vertex) string)
(cl-defmethod llm-provider-embedding-request ((_ llm-vertex) string)
`(("instances" . [(("content" . ,string))])))

(cl-defmethod llm-provider-headers ((provider llm-vertex))
`(("Authorization" . ,(format "Bearer %s" (llm-vertex-key provider)))))

(cl-defmethod llm-provider-chat-extract-result ((_ llm-google) response)
(cl-defmethod llm-provider-chat-extract-result ((provider llm-google) response)
(pcase (type-of response)
('vector (when (> (length response) 0)
(let ((parts (mapcar #'llm-provider-chat-extract-response response)))
(let ((parts (mapcar #'llm-provider-chat-extract-result provider response)))

Check warning on line 143 in llm-vertex.el

View workflow job for this annotation

GitHub Actions / test-melpa (29.1, false, false, byte-compile, *.el)

‘mapcar’ called with 3 arguments, but accepts only 2

Check warning on line 143 in llm-vertex.el

View workflow job for this annotation

GitHub Actions / test-melpa (28.1, false, false, byte-compile, *.el)

mapcar called with 3 arguments, but accepts only 2

Check warning on line 143 in llm-vertex.el

View workflow job for this annotation

GitHub Actions / test-melpa (28.2, false, false, byte-compile, *.el)

mapcar called with 3 arguments, but accepts only 2

Check warning on line 143 in llm-vertex.el

View workflow job for this annotation

GitHub Actions / test-melpa (29.2, false, false, byte-compile, *.el)

‘mapcar’ called with 3 arguments, but accepts only 2
(if (stringp (car parts))
(mapconcat #'identity parts "")
(car parts)))))
Expand Down

0 comments on commit 66de85d

Please sign in to comment.