cl-openai/list-models.lisp
2024-09-09 20:58:41 -04:00

12 lines
352 B
Common Lisp

(in-package #:cl-openai)
;;;; https://platform.openai.com/docs/api-reference/models/list
;;;; https://github.com/edicl/drakma/issues/136
(defun models/list ()
(json-decode-http-request-to-string
(server-path "v1/models")))
(defun models/retrieve (model)
(json-decode-http-request-to-string
(server-path (format nil "v1/models/~a" model))))