You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: daprdocs/content/en/reference/components-reference/supported-conversation/ollama.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,26 @@ The above example uses secrets as plain strings. It is recommended to use a secr
34
34
| `model` | N | The Ollama LLM to use. Defaults to `llama3.2:latest`. | `phi4:latest` |
35
35
| `cacheTTL` | N | A time-to-live value for a prompt cache to expire. Uses Golang duration format. | `10m` |
36
36
37
+
### OpenAI Compatibility
38
+
39
+
Ollama is compatible with [OpenAI's API](https://ollama.com/blog/openai-compatibility). You can use the OpenAI component with Ollama models with the following changes:
40
+
41
+
```yaml
42
+
apiVersion: dapr.io/v1alpha1
43
+
kind: Component
44
+
metadata:
45
+
name: ollama-openai
46
+
spec:
47
+
type: conversation.openai # use the openai component type
48
+
metadata:
49
+
- name: key
50
+
value: 'ollama' # just any non-empty string
51
+
- name: model
52
+
value: gpt-oss:20b # an ollama model (https://ollama.com/search) in this case openai open source model. See https://ollama.com/library/gpt-oss
0 commit comments