Elffuss BraidHub

kikocis/continue public

19cfb6ec829a · 4.0 KiBRawPermalink
1---
2title: "How to Configure Ollama with Continue"
3slug: ../ollama
4description: "Configure Ollama with Continue to run powerful open source models locally including Llama3.1 for chat, Qwen2.5-Coder for autocomplete, and Nomic Embed Text for embeddings"
5sidebarTitle: "Ollama"
6---
7
8Ollama is an open-source tool that allows to run large language models (LLMs) locally on their own computers. To use Ollama, you can install it [here](https://ollama.ai/download) and download the model you want to run with the `ollama run` command.
9
10## How to Set Up Ollama Chat Models
11
12We recommend configuring **Llama3.1 8B** as your chat model.
13
14<Tabs>
15 <Tab title="YAML">
16 ```yaml title="config.yaml"
17 models:
18 - name: Llama3.1 8B
19 provider: ollama
20 model: llama3.1:8b
21 ```
22 </Tab>
23 <Tab title="JSON">
24 ```json title="config.json"
25 {
26 "models": [
27 {
28 "title": "Llama3.1 8B",
29 "provider": "ollama",
30 "model": "llama3.1:8b"
31 }
32 ]
33 }
34 ```
35 </Tab>
36</Tabs>
37
38## How to Configure Ollama Autocomplete Models
39
40We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model.
41
42<Tabs>
43 <Tab title="YAML">
44 ```yaml title="config.yaml"
45 models:
46 - name: Qwen2.5-Coder 1.5B
47 provider: ollama
48 model: qwen2.5-coder:1.5b-base
49 roles:
50 - autocomplete
51 ```
52 </Tab>
53 <Tab title="JSON">
54 ```json title="config.json"
55 {
56 "tabAutocompleteModel": {
57 "title": "Qwen2.5-Coder 1.5B",
58 "provider": "ollama",
59 "model": "qwen2.5-coder:1.5b-base"
60 }
61 }
62 ```
63 </Tab>
64</Tabs>
65
66## How to Set Up Ollama Embeddings Models
67
68We recommend configuring **Nomic Embed Text** as your embeddings model.
69
70<Tabs>
71 <Tab title="YAML">
72 ```yaml title="config.yaml"
73 models:
74 - name: Nomic Embed Text
75 provider: ollama
76 model: nomic-embed-text
77 roles:
78 - embed
79 ```
80 </Tab>
81 <Tab title="JSON">
82 ```json title="config.json"
83 {
84 "embeddingsProvider": {
85 "provider": "ollama",
86 "model": "nomic-embed-text"
87 }
88 }
89 ```
90 </Tab>
91</Tabs>
92
93## Ollama Reranking Model Availability
94
95Ollama currently does not offer any reranking models.
96
97[Click here](../../model-roles/reranking) to see a list of reranking model providers.
98
99## How to Configure Remote Ollama Instance
100
101To configure a remote instance of Ollama, add the `"apiBase"` property to your model in config.json:
102
103<Tabs>
104 <Tab title="YAML">
105 ```yaml title="config.yaml"
106 models:
107 - name: Llama3.1 8B
108 provider: ollama
109 model: llama3.1:8b
110 apiBase: http://<my endpoint>:11434
111 ```
112 </Tab>
113 <Tab title="JSON">
114 ```json title="config.json"
115 {
116 "models": [
117 {
118 "title": "Llama3.1 8B",
119 "provider": "ollama",
120 "model": "llama3.1:8b",
121 "apiBase": "http://<my endpoint>:11434"
122 }
123 ]
124 }
125 ```
126 </Tab>
127</Tabs>
128
129## How to Configure Model Capabilities in Ollama
130
131Ollama models usually have their capabilities auto-detected correctly. However, if you're using custom model names or experiencing issues with tools/images not working, you can explicitly set capabilities:
132
133<Tabs>
134 <Tab title="YAML">
135 ```yaml title="config.yaml"
136 models:
137 - name: Custom Vision Model
138 provider: ollama
139 model: my-custom-llava
140 capabilities:
141 - tool_use # Enable if your model supports function calling
142 - image_input # Enable for vision models like llava
143 ```
144 </Tab>
145 <Tab title="JSON">
146 ```json title="config.json"
147 {
148 "models": [
149 {
150 "title": "Custom Vision Model",
151 "provider": "ollama",
152 "model": "my-custom-llava",
153 "capabilities": {
154 "tools": true,
155 "uploadImage": true
156 }
157 }
158 ]
159 }
160 ```
161 </Tab>
162</Tabs>
163
164<Note>
165 Most standard Ollama models (like llama3.1, mistral, etc.) support tool use by
166 default. Vision models (like llava) also support image input.
167</Note>