Ollama provider implementation for LiteLLM
Ollama provider implementation for LiteLLM
Default cost per token for Ollama models (in USD) Note: These are approximate and may vary as Ollama is typically run locally
Default cost per token for Ollama models (in USD) Note: These are approximate and may vary as Ollama is typically run locally
(extract-model-name model)Extract actual model name from model string
Extract actual model name from model string
(get-cost-per-token-impl provider-name model)Ollama-specific get-cost-per-token implementation
Ollama-specific get-cost-per-token implementation
(get-rate-limits-impl provider-name)Ollama-specific get-rate-limits implementation
Ollama-specific get-rate-limits implementation
(handle-error-response provider response)Handle Ollama API error responses
Handle Ollama API error responses
(handle-streaming-response response callback)Handle streaming response from Ollama
Handle streaming response from Ollama
(health-check-impl provider-name thread-pool config)Ollama-specific health-check implementation
Ollama-specific health-check implementation
(list-models provider)List available Ollama models
List available Ollama models
(make-request-impl provider-name
                   transformed-request
                   thread-pool
                   telemetry
                   config)Ollama-specific make-request implementation
Ollama-specific make-request implementation
(parse-streaming-chunk chunk request-type)Parse a streaming chunk from Ollama
Parse a streaming chunk from Ollama
(supports-function-calling-impl provider-name)Ollama-specific supports-function-calling? implementation
Ollama-specific supports-function-calling? implementation
(supports-streaming-impl provider-name)Ollama-specific supports-streaming? implementation
Ollama-specific supports-streaming? implementation
(test-ollama-connection provider thread-pool telemetry)Test Ollama connection with a simple request
Test Ollama connection with a simple request
(transform-chat-response response)Transform Ollama chat response to standard format
Transform Ollama chat response to standard format
(transform-generate-response response)Transform Ollama generate response to standard format
Transform Ollama generate response to standard format
(transform-messages-for-chat messages)Transform messages to Ollama chat format
Transform messages to Ollama chat format
(transform-messages-for-generate messages)Transform messages to Ollama generate format (single prompt)
Transform messages to Ollama generate format (single prompt)
(transform-request-impl provider-name request config)Ollama-specific transform-request implementation
Ollama-specific transform-request implementation
(transform-response-impl provider-name response)Ollama-specific transform-response implementation
Ollama-specific transform-response implementation
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |