Safe Haskell | None |
---|---|
Language | Haskell2010 |
Llama.Internal.Foreign.State
Synopsis
- c_llama_state_get_size :: CLlamaContext -> IO CSize
- c_llama_state_get_data :: CLlamaContext -> Ptr Word8 -> CSize -> IO CSize
- c_llama_state_set_data :: CLlamaContext -> Ptr Word8 -> CSize -> IO CSize
- c_llama_state_load_file :: CLlamaContext -> CString -> Ptr LlamaToken -> CSize -> Ptr CSize -> IO CBool
- c_llama_state_save_file :: CLlamaContext -> CString -> Ptr LlamaToken -> CSize -> IO CBool
- c_llama_state_seq_get_size :: CLlamaContext -> LlamaSeqId -> IO CSize
- c_llama_state_seq_get_data :: CLlamaContext -> Ptr Word8 -> CSize -> LlamaSeqId -> IO CSize
- c_llama_state_seq_set_data :: CLlamaContext -> Ptr Word8 -> CSize -> LlamaSeqId -> IO CSize
- c_llama_state_seq_save_file :: CLlamaContext -> CString -> LlamaSeqId -> Ptr LlamaToken -> CSize -> IO CSize
- c_llama_state_seq_load_file :: CLlamaContext -> CString -> LlamaSeqId -> Ptr LlamaToken -> CSize -> Ptr CSize -> IO CSize
Documentation
c_llama_state_get_size :: CLlamaContext -> IO CSize Source #
LLAMA_API size_t llama_state_get_size(struct llama_context * ctx);
c_llama_state_get_data :: CLlamaContext -> Ptr Word8 -> CSize -> IO CSize Source #
LLAMA_API size_t llama_state_get_data(struct llama_context * ctx, uint8_t * dst, size_t size);
c_llama_state_set_data :: CLlamaContext -> Ptr Word8 -> CSize -> IO CSize Source #
LLAMA_API size_t llama_state_set_data(struct llama_context * ctx, const uint8_t * src, size_t size);
c_llama_state_load_file :: CLlamaContext -> CString -> Ptr LlamaToken -> CSize -> Ptr CSize -> IO CBool Source #
LLAMA_API bool llama_state_load_file(struct llama_context * ctx, const char * path_session, llama_token * tokens_out, size_t n_token_capacity, size_t * n_token_count_out);
c_llama_state_save_file :: CLlamaContext -> CString -> Ptr LlamaToken -> CSize -> IO CBool Source #
LLAMA_API bool llama_state_save_file(struct llama_context * ctx, const char * path_session, const llama_token * tokens, size_t n_token_count);
c_llama_state_seq_get_size :: CLlamaContext -> LlamaSeqId -> IO CSize Source #
LLAMA_API size_t llama_state_seq_get_size(struct llama_context * ctx, llama_seq_id seq_id);
c_llama_state_seq_get_data :: CLlamaContext -> Ptr Word8 -> CSize -> LlamaSeqId -> IO CSize Source #
LLAMA_API size_t llama_state_seq_get_data(struct llama_context * ctx, uint8_t * dst, size_t size, llama_seq_id seq_id);
c_llama_state_seq_set_data :: CLlamaContext -> Ptr Word8 -> CSize -> LlamaSeqId -> IO CSize Source #
LLAMA_API size_t llama_state_seq_set_data(struct llama_context * ctx, const uint8_t * src, size_t size, llama_seq_id dest_seq_id);
c_llama_state_seq_save_file :: CLlamaContext -> CString -> LlamaSeqId -> Ptr LlamaToken -> CSize -> IO CSize Source #
LLAMA_API size_t llama_state_seq_save_file(struct llama_context * ctx, const char * filepath, llama_seq_id seq_id, const llama_token * tokens, size_t n_token_count);
c_llama_state_seq_load_file :: CLlamaContext -> CString -> LlamaSeqId -> Ptr LlamaToken -> CSize -> Ptr CSize -> IO CSize Source #
LLAMA_API size_t llama_state_seq_load_file(struct llama_context * ctx, const char * filepath, llama_seq_id dest_seq_id, llama_token * tokens_out, size_t n_token_capacity, size_t * n_token_count_out);