Skip to content

The value of SYMBOL is NIL, which is not of type (AND SYMBOL (NOT NULL)). #2

@qubit55

Description

@qubit55

Hello, I'm trying to do the following:

(cffi:defcstruct llmodel-prompt-context
  (logits :pointer)
  (logits-size :size)
  (tokens :pointer)
  (tokens-size :size)
  (n-past :int32)
  (n-ctx :int32)
  (n-predict :int32)
  (top-k :int32)
  (top-p :float)
  (min-p :float)
  (temp :float)
  (n-batch :int32)
  (repeat-penalty :float)
  (repeat-last-n :int32)
  (context-erase :float))

(cobj:define-cobject-class (llmodel-prompt-context (:struct llmodel-prompt-context))) 
;; The above line raises: The value of SYMBOL is NIL, which is not of type (AND SYMBOL (NOT NULL)). 

My understanding is that it doesn't work with :pointer field types. Is there a walk-around?

My system:
SBCL 2.3.4
MacOS 11.7.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions