View Source Ollama.Blob (Ollama v0.7.1)

Module for working for blobs in Ollama.

Currently this module only provides a function for generating a SHA256 digest of a binary blob.

Summary

Types

Blob digest

Functions

Generates a SHA256 digest of a binary blob.

Types

@type digest() :: String.t()

Blob digest

The digest is a hex-encoded SHA256 hash of the binary blob, prefixed with the algorithm.

Example

"sha256:054edec1d0211f624fed0cbca9d4f9400b0e491c43742af2c5b0abebf0c990d8"

Functions

@spec digest(binary()) :: digest()

Generates a SHA256 digest of a binary blob.

Example

iex> Ollama.Blob.digest("hello")
"sha256:2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"