ollama-haskell
Industry-grade Haskell client for Ollama local LLMs
https://github.com/tusharad/ollama-haskell
| LTS Haskell 24.65: | 0.2.1.0@rev:2 |
| Stackage Nightly 2026-10-26: | 0.4.2.0 |
| Latest on Hackage: | 0.4.2.0 |
ollama-haskell-0.4.2.0@sha256:b99db8b70752cad0f9a96dc3823d61b2a67e297ff4368b53986f7c343737b55b,7854Module documentation for 0.4.2.0
ollama-haskell
Modern Haskell client library for the Ollama local LLM engine.
Features
- Client-Centric Architecture: Thread-safe
OllamaClienthandle with connection pooling and resource management (newClient,defaultClient,clientFromEnv,withClient). - First-Class Streaming:
conduit-based response streaming (chatStream,generateStream,pullStream,pushStream,createModelStream). - Model Context Protocol (MCP) Bridge: Bidirectional integration with
mcp-serverfor converting between Ollama tools and MCP tools, running MCP servers via stdio or HTTP (Ollama.MCP). - Generic JSON Schema Derivation: Automatically derive JSON schemas from Haskell data types via
GHC.GenericswithToSchemaandformatFor. - Complete API Surface: Text generation, chat completions, vector embeddings, model management (list, show, copy, delete, pull, push, create), system endpoints, and System One decision evaluation.
- System One Decision Models: Native support for
/v1/systemonefast classification, binary probability (noul), and scoring (choiceQuestion,noulQuestion,scoreQuestion). - Structured Outputs DSL: Powerful
SchemaBuilderDSL (|+,|++,|!,|!!) for type-safe JSON Schema structured responses. - Function / Tool Calling: Full support for tool definitions (
Tool), tool calls (ToolCall), and execution results (toolResultMessage). - Thinking Models & Logprobs: Native support for reasoning models (
Think/ThinkingLevelwith custom model-defined levels) and token log probabilities (Logprob/TokenLogprob). - Environment & Auth Integration: Robust URL normalization for
OLLAMA_HOSTand bearer token support forOLLAMA_API_KEY. - Configurable Resilience: Flexible retry policies (
NoRetry,ConstantRetry,ExponentialRetry), custom timeouts, lifecycle callbacks, and structured logging. - Conversation Store: Transactional STM-backed
InMemoryStoreandConversationStoretypeclass for managing multi-turn chat sessions. - SDK Comparison Matrix: Detailed feature comparison against Python, JS/TS, and Go SDKs in COMPARISON.md.
Installation
Add ollama-haskell to your .cabal file:
build-depends:
base >= 4.17 && < 5
, ollama-haskell >= 0.4.2.0
Or using Stack in package.yaml:
dependencies:
- ollama-haskell >= 0.4.2.0
Quick Start (5 Lines)
import Data.List.NonEmpty (NonEmpty ((:|)))
import Data.Text.IO qualified as TIO
import Ollama
main :: IO ()
main = do
client <- defaultClient
res <- chat client $ chatRequest "qwen3.5:2b" (userMessage "Why is the sky blue?" :| [])
case res of
Left err -> print err
Right resp -> mapM_ (TIO.putStrLn . messageContent) (crMessage resp)
Streaming Responses with Conduit
Stream LLM responses token-by-token in real time:
import Conduit (mapM_C, runConduit, (.|))
import Control.Monad.IO.Class (liftIO)
import Data.List.NonEmpty (NonEmpty ((:|)))
import Data.Text.IO qualified as TIO
import Ollama
import System.IO (hFlush, stdout)
main :: IO ()
main = do
client <- defaultClient
let req = chatRequest "qwen3.5:2b" (userMessage "Count from 1 to 5." :| [])
-- Stream tokens to stdout as they arrive
runConduit $
chatStream client req .| mapM_C (\chunk -> liftIO $ do
mapM_ (TIO.putStr . messageContent) (crMessage chunk)
hFlush stdout
)
putStrLn ""
You can also accumulate all chunks at once with collectStream, or fold text with foldStream:
-- Collect all chunks:
chunks <- collectStream (chatStream client req)
-- Or fold into a single Text value:
fullText <- foldStream (\acc c -> acc <> maybe "" messageContent (crMessage c)) "" (chatStream client req)
Function & Tool Calling
Define function signatures with zero boilerplate using toolDef, objectParams, and typed parameters:
import Data.List.NonEmpty (NonEmpty ((:|)))
import qualified Data.Map.Strict as Map
import Ollama
calculatorTool :: Tool
calculatorTool =
toolDef "add" "Add two numbers" $
objectParams
[ ("a", numberParam (Just "First number"))
, ("b", numberParam (Just "Second number"))
]
["a", "b"]
main :: IO ()
main = do
client <- defaultClient
let req = (chatRequest "llama3.2:latest" (userMessage "What is 25 + 17?" :| []))
{ chatTools = Just [calculatorTool] }
res <- chat client req
case res of
Left err -> print err
Right resp -> case crMessage resp of
Just msg -> case messageToolCalls msg of
Just (call : _) -> do
putStrLn $ "Tool called: " <> show (tcfName (tcFunction call))
putStrLn $ "Arguments: " <> show (tcfArguments (tcFunction call))
_ -> putStrLn "No tool called."
Nothing -> putStrLn "No message returned."
Multimodal Vision
Load local images directly and send them to vision models (gemma3, qwen3.5:2b, etc.):
main :: IO ()
main = do
client <- defaultClient
img <- readImageBase64 "chart.png"
let msg = imageMessage "Describe the chart in 2 sentences." [img]
res <- chat client (chatRequest "gemma3:latest" (msg :| []))
case res of
Right resp -> mapM_ (putStrLn . messageFullText) (crMessage resp)
Left err -> print err
Thinking / Reasoning Models
Control chain-of-thought tokens on reasoning models (e.g. DeepSeek-R1, Qwen 3.5):
let req = (chatRequest "qwen3.5:2b" (userMessage "Which is larger: 9.11 or 9.9?" :| []))
{ chatThink = Just ThinkEnabled } -- or ThinkDisabled, ThinkLevel ThinkHigh, ThinkCustom "..."
res <- chat client req
case res of
Right resp -> case crMessage resp of
Just msg -> do
case messageThinking msg of
Just th -> putStrLn $ "Thinking trace:\n" <> th
Nothing -> pure ()
putStrLn $ "Answer:\n" <> messageContent msg
Nothing -> pure ()
Left err -> print err
System One Decision Models
Evaluate high-speed classification, probability (noul), and scoring with /v1/systemone:
let q1 = choiceQuestion "Customer eligibility" (Map.fromList [("eligible", Just "Standard"), ("ineligible", Nothing)])
q2 = noulQuestion "Will this cause churn?"
req = systemOneRequest "nimble" "Customer account history..." (Map.fromList [("q1", q1), ("q2", q2)])
res <- systemOne client req
Structured Outputs (JSON Schema DSL)
Enforce structured JSON output formats using SchemaBuilder (re-exported directly from Ollama):
import Data.Text.IO qualified as TIO
import Ollama
personSchema :: Schema
personSchema = buildSchema $ emptyObject
|+ ("name", JString)
|+ ("age", JInteger)
|! "name"
main :: IO ()
main = do
client <- defaultClient
let req = (generateRequest "qwen3.5:2b" "Generate a person profile.")
{ genFormat = Just (SchemaFormat personSchema) }
res <- generate client req
case res of
Left err -> print err
Right resp -> TIO.putStrLn (grResponse resp)
Environment Variables & Configuration
Construct a client using environment variables (OLLAMA_HOST, OLLAMA_API_KEY):
main :: IO ()
main = do
client <- clientFromEnv
-- Automatically connects to OLLAMA_HOST with optional Authorization: Bearer header
...
Or configure custom retry policies and loggers:
customConfig :: OllamaClientConfig
customConfig = defaultConfig
{ configBaseUrl = "http://my-ollama-server:11434"
, configTimeout = 120
, configRetry = ExponentialRetry 3 1000000 -- 3 retries with exponential backoff
, configLogger = Just (\level msg -> putStrLn $ "[" <> show level <> "] " <> show msg)
}
main :: IO ()
main = withClient customConfig $ \client -> do
...
Runnable Examples
The repository includes complete, tested runnable examples for every library feature:
| Target | Source File | Description |
|---|---|---|
ollama-example-basic-chat |
examples/BasicChat.hs |
Non-streaming chat, system messages, and throughput metrics. |
ollama-example-streaming-chat |
examples/StreamingChat.hs |
Conduit-based real-time response streaming. |
ollama-example-tool-calling |
examples/ToolCalling.hs |
Multi-turn tool execution loop with toolDef and objectParams. |
ollama-example-structured-output |
examples/StructuredOutput.hs |
Typed record JSON schema derivation via ToSchema and formatFor. |
ollama-example-embeddings |
examples/Embeddings.hs |
Modern batch embeddings (/api/embed) and legacy embeddings. |
ollama-example-model-management |
examples/ModelManagement.hs |
Version inspection, model listing, details, and active VRAM ps. |
ollama-example-generate |
examples/GenerateText.hs |
Single-turn text completion, streaming, and throughput metrics. |
ollama-example-vision |
examples/Vision.hs |
Multimodal chat and generation with local images (readImageBase64). |
ollama-example-logprobs |
examples/Logprobs.hs |
Token log probability inspection and alternative candidate analysis. |
ollama-example-thinking |
examples/Thinking.hs |
Reasoning models with ThinkDisabled, ThinkEnabled, and ThinkCustom. |
ollama-example-model-lifecycle |
examples/ModelLifecycle.hs |
Model copying, creation, blob checking, and deletion lifecycle. |
ollama-example-conversation-store |
examples/ConversationStore.hs |
STM-backed in-memory multi-turn conversation persistence. |
ollama-example-client-lifecycle |
examples/ClientLifecycle.hs |
clientFromEnv, withClient, retry backoff, and error taxonomy. |
ollama-example-mcp-bridge |
examples/MCPBridge.hs |
Bidirectional conversion between Ollama tools and MCP definitions. |
ollama-example-system-one |
examples/SystemOne.hs |
Specialized decision evaluation questions (/v1/systemone). |
ollama-example-mock-testing |
examples/MockTesting.hs |
Offline unit testing with withMockClient without a running server. |
ollama-example-all-features |
examples/AllFeatures.hs |
End-to-end showcase combining multiple library features. |
Run any example with Stack:
stack run ollama-example-tool-calling
Feature Matrix
| Feature | Haskell (ollama-haskell) |
Official Python (ollama-python) |
Official JS/TS (ollama-js) |
Community Go (ollama/ollama) |
|---|---|---|---|---|
| Strict Type Safety | ✅ Compile-time (PVP, Smart Constructors) | ⚠️ Type hints (Runtime) | ⚠️ TypeScript (Erased at runtime) | ✅ Go Structs |
| Response Streaming | ✅ conduit ($O(1)$ constant memory) |
⚠️ Python Generator | ⚠️ Async Iterator | ⚠️ Go Channels |
| Structured Output Derivation | ✅ GHC.Generics (ToSchema) |
⚠️ Pydantic BaseModel | ⚠️ Zod / JSON Schema | ⚠️ Manual JSON Schema |
| Model Context Protocol (MCP) | ✅ Native mcp-server Bridge |
❌ Manual | ❌ Manual | ❌ Manual |
| System One Decision Models | ✅ Full ADT (/v1/systemone) |
✅ Supported | ❌ None | ❌ None |
| Token Logprobs Support | ✅ Logprob / TokenLogprob |
✅ Supported | ❌ None | ❌ None |
| Thinking / Reasoning Models | ✅ Dedicated Think ADT |
⚠️ Dict parameters | ⚠️ Object properties | ⚠️ Raw parameters |
| Transactional Chat Store | ✅ STM InMemoryStore |
❌ None | ❌ None | ❌ None |
| Built-in Mock Testing | ✅ Ollama.Testing (Pure) |
❌ None | ❌ None | ❌ None |
| Configurable Retry & Backoff | ✅ Exponential & Constant ADT | ❌ Manual | ❌ Manual | ❌ Manual |
| Token Throughput Metrics | ✅ Native Calculation Helpers | ⚠️ Raw nanoseconds | ⚠️ Raw nanoseconds | ⚠️ Raw nanoseconds |
| Environment Auto-Discovery | ✅ clientFromEnv |
✅ Default client | ✅ Default client | ✅ Default client |
Documentation & References
- Comparison Deep Dive — Detailed architectural comparison across language ecosystems.
- CONTRIBUTING.md — Development setup, testing guidelines, and code style.
- CHANGELOG.md — Release notes and version changelog.
- Hackage Documentation — Full Haddock API reference.
License
MIT © 2024–2026 Tushar Adhatrao
Changes
Changelog
All notable changes to ollama-haskell will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to PVP (Haskell Package Versioning Policy).
[0.4.2.0] - 2026-10-25
Added
- Ergonomic Tool Calling & Parameter DSL (
Ollama.Types.Tool):- Added smart constructors for zero-boilerplate tool and schema definitions:
toolDef,functionDef,objectParams,stringParam,numberParam,intParam,boolParam, andenumParam. - Added
tcId :: Maybe TextandtcType :: Maybe TexttoToolCallwith backwards-compatible pattern synonyms (pattern ToolCall) and constructors (mkToolCall,toolCallWithId). - Added
tcfIndex :: Maybe InttoToolCallFunctionwith backwards-compatible pattern synonyms (pattern ToolCallFunction) and constructor (mkToolCallFunction). - Added
messageToolCallId :: Maybe TextandtoolResultMessageWithId :: Text -> Text -> Text -> MessagetoMessagefor multi-turn tool calling correlation.
- Added smart constructors for zero-boilerplate tool and schema definitions:
- Multimodal Image Helpers (
Ollama.Types.Common):- Added
readImageBase64 :: FilePath -> IO Base64Imageto read local image files from disk and encode them as base64 without third-party boilerplate. - Added
encodeBase64Image :: ByteString -> Base64Imageto encode raw byte buffers.
- Added
- Reasoning Model Response Helpers:
- Added
messageFullText :: Message -> TexttoOllama.Types.Message(re-exported inOllama). - Added
generateFullText :: GenerateResponse -> TexttoOllama.API.Generate(re-exported inOllama). - Both safely combine reasoning/thinking tokens (
messageThinking/grThinking) and final content (messageContent/grResponse), preventing empty strings when all tokens are consumed in the thinking phase.
- Added
- Top-Level Umbrella Re-exports (
Ollama):- Re-exported
ModelDetails (..),ShowRequest (..),readImageBase64,encodeBase64Image,messageFullText,generateFullText, and all tool smart constructors directly fromOllama.
- Re-exported
- System One Decision API (
Ollama.API.SystemOne):- Added native client support for Ollama’s high-speed decision evaluation endpoint (
POST /v1/systemone), matchingollama-pythonandollama-rs. - Supported question formats:
ChoiceQuestion(multiple choice with class probabilities and confidence),NoulQuestion(binary true/false probability), andScoreQuestion(ordinal scoring with expected fractional score, legend, and confidence). - Provided ergonomic smart constructors (
choiceQuestion,noulQuestion,noulQuestionWithCriteria,scoreQuestion,systemOneRequest) and flexible state input viaSystemOneContent(text or JSONValue).
- Added native client support for Ollama’s high-speed decision evaluation endpoint (
- Logprobs Support:
- Added
TokenLogprobandLogprobdomain types inOllama.Types.Common(re-exported inOllama). - Added
chatLogprobs :: Maybe BoolandchatTopLogprobs :: Maybe InttoChatRequest, andcrLogprobs :: Maybe [Logprob]toChatResponse. - Added
genLogprobs :: Maybe BoolandgenTopLogprobs :: Maybe InttoGenerateRequest, andgrLogprobs :: Maybe [Logprob]toGenerateResponse.
- Added
- Extended Request Convenience Methods:
- Added
showModelWithtoOllama.API.Modelsto support verbose model inspection (srqVerbose = Just True). - Added
pullWithandpullStreamWithtoOllama.API.Models.Pullfor custom pull options (insecure, etc.). - Added
pushWithandpushStreamWithtoOllama.API.Models.Pushfor custom push options (insecure, etc.).
- Added
- Model-Defined Custom Thinking Levels:
- Added
ThinkCustom !Textconstructor toThinkingLevelto support arbitrary reasoning effort levels (e.g."xhigh","ultra", or model-defined strings) matching officialollama-pythonv0.6.3 behavior.
- Added
- Image Generation Diffusion Progress Tracking:
- Added
grCompleted :: Maybe IntandgrTotal :: Maybe InttoGenerateResponseto monitor diffusion step progression during image generation streaming.
- Added
- Comprehensive Runnable Examples:
- Added 10 new runnable example executables (
ollama-example-generate,ollama-example-vision,ollama-example-logprobs,ollama-example-thinking,ollama-example-model-lifecycle,ollama-example-conversation-store,ollama-example-client-lifecycle,ollama-example-mcp-bridge,ollama-example-system-one,ollama-example-mock-testing), ensuring every single library API and type is verified running against a live Ollama server.
- Added 10 new runnable example executables (
Fixed
- Image Generation
GenerateResponseJSON Parsing:- Fixed a critical crash where image generation progress updates (
{ "completed": 5, "total": 20 }) and final responses ({ "image": "..." }) fail to decode withkey "response" not found. Maderesponsegracefully default to empty string (.!= "") when omitted by the server.
- Fixed a critical crash where image generation progress updates (
- Tool Call
MessageJSON Parsing:- Fixed JSON decoding failure when the assistant returns tool calls without a
"content"field (or with null content) by defaultingcontentto"".
- Fixed JSON decoding failure when the assistant returns tool calls without a
Changed
- Model Context Protocol (
Ollama.MCP):- Enforced
mcp-server >= 0.3 && < 0.4dependency bounds (addressing Stackage issue #8143). - Supported
SchemaRawconstructor introduced inmcp-server-0.3.0.0withinmcpDefinitionToTool. - Updated all Stack snapshots (
stack.yaml,stack-nightly.yaml,stack-lts-24.52.yaml,stack-lts-23.28.yaml,stack-lts-22.44.yaml,stack-lts-21.25.yaml) tomcp-server-0.3.0.0.
- Enforced
[0.4.1.0] - 2026-08-25
Fixed
- Conduit Streaming Socket Lifetime (
Ollama.Client.Internal):- Fixed premature connection closure in
requestStreamingby replacingtransPipe runResourceTwith exception-safe generator cleanup, ensuring streaming responses stream token-by-token across the full response without truncation.
- Fixed premature connection closure in
- Documentation & Tutorial Code Snippets:
- Corrected STM conversation storage documentation in
docs/tutorials/chat.markdownanddocs/motivation.markdownto align with the actualConversationAPI. - Replaced
runConduitReswithrunConduitin streaming examples. - Fixed missing
toolNameparameter intoolResultMessageindocs/tutorials/tool-calling.markdown. - Corrected field names (
models/runningModels) indocs/tutorials/model-management.markdown. - Fixed lazy/strict text encoding in
docs/tutorials/structured-outputs.markdown. - Corrected
newMockClientserializedByteStringusage indocs/tutorials/testing.markdown. - Replaced
collectStreamwith genuine real-time Conduit streaming inREADME.md.
- Corrected STM conversation storage documentation in
Added
- Model Capabilities Field (
Ollama.Types.Model):- Added
capabilities :: !(Maybe [Text])toModelInfoand updatedFromJSON/ToJSONinstances to support capability discovery from/api/tags(e.g.["completion", "tools", "thinking"]).
- Added
- Direct SchemaBuilder Re-export (
Ollama):- Re-exported the full
SchemaBuilderDSL (buildSchema,emptyObject,|+,|++,|!,|!!,JsonType(..),Property,Schema,objectOf,arrayOf,printSchema) directly from the top-levelOllamaumbrella module.
- Re-exported the full
- End-to-End Live LLM Integration Test Suite:
- 15 comprehensive live test cases in
test-integration/Main.hscovering version, model inspection, non-streaming & streaming chat, structured JSON verification, tool calling round-trip, thinking models, embeddings, model lifecycle, and multi-turn STM memory persistence.
- 15 comprehensive live test cases in
- SDK Feature Matrix:
- Multi-language SDK feature matrix embedded directly in
README.md.
- Multi-language SDK feature matrix embedded directly in
Changed
- Dependency Cleanliness:
- Removed unused
resourcetpackage from librarybuild-depends.
- Removed unused
- Documentation Redesign:
- Completely restyled Hakyll documentation site with a minimal, restrained engineering aesthetic.
[0.4.0.0] - 2026-08-20
Added
- Model Context Protocol (MCP) Integration (
Ollama.MCP):- Full bidirectional integration with the Hackage
mcp-serverpackage (mcp-server >= 0.2 && < 0.3). - Seamless conversion between Ollama function calling definitions (
Tool,ToolCall) and MCP definitions (ToolDefinition,ArgumentDefinition,Content,McpSchema). - Bridge functions:
toolToMcpDefinition,mcpDefinitionToTool,toolCallToMcpArgs,mcpContentToToolOutput. - Re-exported MCP server runners (
runMcpServerStdio,runMcpServerHttp,runMcpServerHttpWithConfig). - Dedicated unit test suite in
Test.Ollama.Unit.MCP.
- Full bidirectional integration with the Hackage
- Automatic JSON Schema Derivation (
Ollama.Types.Format.SchemaDerive):- Typeclasses
ToSchemaandToJsonTypeenabling generic derivation of JSON schemas directly from Haskell record types viaGHC.Generics. - Smart handling of optional fields (
Maybe aomitted fromrequired), nested records (JObject), lists (JArray), and simple sum enums (stringenum). - Helper functions
schemaForandformatForfor effortless integration withchat/generatestructured outputs. - Dedicated unit test suite in
Test.Ollama.Unit.SchemaDerive.
- Typeclasses
- Configurable Client Timeout:
- Support for custom request timeout intervals in
OllamaClientConfig(configTimeout).
- Support for custom request timeout intervals in
Changed
- PVP Compliance & Upper Bounds:
- Added strict upper bounds for
network-uri(>= 2.6 && < 2.8) andmcp-server(>= 0.2 && < 0.3). - Upgraded Stack resolvers and snapshot dependencies (
lts-21.25,lts-22.44,lts-23.28,lts-24.52,nightly).
- Added strict upper bounds for
[0.3.0.0] - 2026-08-04
Added
OllamaClientCore: Thread-safe client handle with automatic connection manager lifecycle management (newClient,defaultClient,clientFromEnv,withClient).- First-Class Streaming Pipeline:
conduit-based response streaming (chatStream,generateStream,pullStream,pushStream,createModelStream). - Stream Combinators:
collectStreamandfoldStreaminOllama.Streaming. - Structured Output DSL: Type-safe
SchemaBuilderDSL inOllama.Types.Format.SchemaBuilder(|+,|++,|!,|!!) for constructing JSON Schemas. - Thinking / Reasoning Models Support:
ThinkADT (ThinkEnabled,ThinkDisabled,ThinkLevel) andThinkingLevel(ThinkLow,ThinkMedium,ThinkHigh,ThinkMax) supporting models such asqwen3.5anddeepseek-r1. - Function / Tool Calling:
Tool,FunctionDef,FunctionParameters,ToolCall, andtoolResultMessagehelper. - Environment Resolution: Automatic
OLLAMA_HOSTparsing and normalization inclientFromEnvsupportinghost:port,http://host:port, and barehost. - Authorization & Headers: Support for
OLLAMA_API_KEYbearer tokens and customconfigHeaders. - Configurable Resilience:
RetryPolicyADT (NoRetry,ConstantRetry,ExponentialRetry), lifecycle callbacks (configOnStart,configOnSuccess,configOnError), and structured loggerconfigLogger. - Token Throughput Metrics: Metrics helpers
chatEvalTokensPerSecond,chatPromptEvalTokensPerSecond,evalTokensPerSecond,promptEvalTokensPerSecond,tokensPerSecond. - Testing Infrastructure: Built-in mock testing module
Ollama.Testing(newMockClient,withMockClient,mockGenerateResponse,mockChatResponse,mockEmbedResponse,mockListModelsResponse). - Conversation Store: Transactional STM-backed
InMemoryStoreandConversationStoretypeclass. - New API Endpoints:
Ollama.API.Embed(/api/embed),Ollama.API.Blobs(/api/blobs),Ollama.API.Ps(/api/ps),Ollama.API.Version(/api/version). - Benchmark Suite: Criterion/tasty-bench suite in
bench/Main.hsmeasuring serialization and throughput.
Changed
- MonadIO / MonadUnliftIO Polymorphism: All API functions use
MonadIO m =>/MonadUnliftIO m =>signatures instead of dual*Mvariants. - Typed Newtypes:
ModelName,Digest,Base64Image,Duration,Versionreplace primitive string types. - Unified Error Type:
OllamaErrorsum type with structured constructors andExceptioninstance.
Deprecated
embeddingsendpoint (/api/embeddings) marked deprecated in favor of/api/embed.