Elffuss BraidHub

kikocis/continue public

627d7d0d1f85 · 2.6 KiBRawPermalink
1---
2title: "Morph"
3---
4
5Morph provides a fast apply model that helps you quickly and accurately apply code changes from chat suggestions to your files. It's optimized for speed and precision when integrating generated code into your existing codebase. You can sign up for Morph's generous free tier [here](https://morphllm.com/dashboard). Then, update your configuration file as follows:
6
7<Tabs>
8 <Tab title="YAML">
9 ```yaml title="config.yaml"
10 models:
11 - uses: morphllm/morph-v0
12 with:
13 MORPH_API_KEY: ${{ secrets.MORPH_API_KEY }}
14```
15or
16```yaml title="config.yaml"
17 - name: Morph Fast Apply
18 provider: openai
19 model: morph-v2
20 apiKey: <YOUR_MORPH_API_KEY>
21 apiBase: https://api.morphllm.com/v1/
22 roles:
23 - apply
24 promptTemplates:
25 apply: "<code>{{{ original_code }}}</code>\n<update>{{{ new_code }}}</update>"
26 ```
27 </Tab>
28 <Tab title="JSON">
29 ```json title="config.json"
30 {
31 "models": [
32 {
33 "title": "Morph Fast Apply",
34 "provider": "openai",
35 "model": "morph-v2",
36 "apiKey": "<YOUR_MORPH_API_KEY>",
37 "apiBase": "https://api.morphllm.com/v1/",
38 "roles": ["apply"],
39 "promptTemplates": {
40 "apply": "<code>{{{ original_code }}}</code>\n<update>{{{ new_code }}}</update>"
41 }
42 }
43 ]
44 }
45 ```
46 </Tab>
47</Tabs>
48
49## Embeddings model
50
51We recommend configuring **morph-embedding-v2** as your embeddings model.
52
53<Tabs>
54 <Tab title="YAML">
55 ```yaml title="config.yaml"
56 models:
57 - name: Morph Embeddings
58 provider: openai
59 model: morph-embedding-v2
60 apiKey: <YOUR_MORPH_API_KEY>
61 apiBase: https://api.morphllm.com/v1/
62 roles:
63 - embed
64 ```
65 </Tab>
66 <Tab title="JSON">
67 ```json title="config.json"
68 {
69 "embeddingsProvider": {
70 "provider": "openai",
71 "model": "morph-embedding-v2",
72 "apiKey": "<YOUR_MORPH_API_KEY>",
73 "apiBase": "https://api.morphllm.com/v1/"
74 }
75 }
76 ```
77 </Tab>
78</Tabs>
79
80## Reranking model
81
82We recommend configuring **morph-rerank-v2** as your reranking model.
83
84<Tabs>
85 <Tab title="YAML">
86 ```yaml title="config.yaml"
87 models:
88 - name: Morph Reranker
89 provider: cohere
90 model: morph-rerank-v2
91 apiKey: <YOUR_MORPH_API_KEY>
92 apiBase: https://api.morphllm.com/v1/
93 roles:
94 - rerank
95 ```
96 </Tab>
97 <Tab title="JSON">
98 ```json title="config.json"
99 {
100 "reranker": {
101 "name": "cohere",
102 "params": {
103 "model": "morph-rerank-v2",
104 "apiKey": "<YOUR_MORPH_API_KEY>",
105 "apiBase": "https://api.morphllm.com/v1/"
106 }
107 }
108 }
109 ```
110 </Tab>
111</Tabs>