Ollama
build-request
(Fn [(Ref LLMRequest a)] String)
(build-request req)
builds the JSON request body for the Ollama chat API.
build-stream-request
(Fn [(Ref LLMRequest a)] String)
(build-stream-request req)
builds a streaming Ollama chat request.
headers
(Fn [a, Int] (Map String (Array String)))
(headers _config body-len)
returns the HTTP headers for an Ollama request.
parse-delta
(Fn [(Ref String a)] (Maybe String))
(parse-delta line)
extracts content from an Ollama streaming NDJSON line.
parse-response
(Fn [(Ref String a)] (Result LLMResponse String))
(parse-response body)
parses an Ollama chat API response.