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: README.md
+27-2
Original file line number
Diff line number
Diff line change
@@ -121,6 +121,31 @@ cmp_ai:setup({
121
121
You will also need to make sure you have the Codestral api key in you
122
122
environment, `CODESTRAL_API_KEY`.
123
123
124
+
You can also use the `suffix` and `prompt` parameters, see [Codestral](https://github.com/codestral/codestral) for more details.
125
+
126
+
```lua
127
+
localcmp_ai=require('cmp_ai.config')
128
+
129
+
cmp_ai:setup({
130
+
max_lines=1000,
131
+
provider='Codestral',
132
+
provider_options= {
133
+
model='codestral-latest',
134
+
prompt=function(lines_before, lines_after)
135
+
returnlines_before
136
+
end,
137
+
suffix=function(lines_after)
138
+
returnlines_after
139
+
end
140
+
},
141
+
notify=true,
142
+
notify_callback=function(msg)
143
+
vim.notify(msg)
144
+
end,
145
+
run_on_every_keystroke=true,
146
+
})
147
+
```
148
+
124
149
To use Google Bard:
125
150
126
151
```lua
@@ -170,7 +195,7 @@ cmp_ai:setup({
170
195
})
171
196
```
172
197
173
-
With Ollama you can also use the `suffix` parameter, typically when you want to use cmp-ai for codecompletion and you want to use the default plugin/prompt.
198
+
With Ollama you can also use the `suffix` parameter, typically when you want to use cmp-ai for code completion and you want to use the default plugin/prompt.
174
199
175
200
If the model you're using has the following template:
0 commit comments