Elffuss BraidHub

kikocis/continue public

main · 2.8 KiBRawPermalink
1---
2title: "Morph"
3description: "Configure Morph with Continue to access their optimized models for code application, embeddings, and reranking, designed for fast and accurate integration of AI-generated code changes"
4---
5
6Morph 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:
7
8<Tabs>
9 <Tab title="YAML">
10 ```yaml title="config.yaml"
11 models:
12 - uses: morphllm/morph-v0
13 with:
14 MORPH_API_KEY: ${{ secrets.MORPH_API_KEY }}
15```
16or
17```yaml title="config.yaml"
18 - name: Morph Fast Apply
19 provider: openai
20 model: morph-v2
21 apiKey: <YOUR_MORPH_API_KEY>
22 apiBase: https://api.morphllm.com/v1/
23 roles:
24 - apply
25 promptTemplates:
26 apply: "<code>{{{ original_code }}}</code>\n<update>{{{ new_code }}}</update>"
27 ```
28 </Tab>
29 <Tab title="JSON">
30 ```json title="config.json"
31 {
32 "models": [
33 {
34 "title": "Morph Fast Apply",
35 "provider": "openai",
36 "model": "morph-v2",
37 "apiKey": "<YOUR_MORPH_API_KEY>",
38 "apiBase": "https://api.morphllm.com/v1/",
39 "roles": ["apply"],
40 "promptTemplates": {
41 "apply": "<code>{{{ original_code }}}</code>\n<update>{{{ new_code }}}</update>"
42 }
43 }
44 ]
45 }
46 ```
47 </Tab>
48</Tabs>
49
50## Embeddings model
51
52We recommend configuring **morph-embedding-v2** as your embeddings model.
53
54<Tabs>
55 <Tab title="YAML">
56 ```yaml title="config.yaml"
57 models:
58 - name: Morph Embeddings
59 provider: openai
60 model: morph-embedding-v2
61 apiKey: <YOUR_MORPH_API_KEY>
62 apiBase: https://api.morphllm.com/v1/
63 roles:
64 - embed
65 ```
66 </Tab>
67 <Tab title="JSON">
68 ```json title="config.json"
69 {
70 "embeddingsProvider": {
71 "provider": "openai",
72 "model": "morph-embedding-v2",
73 "apiKey": "<YOUR_MORPH_API_KEY>",
74 "apiBase": "https://api.morphllm.com/v1/"
75 }
76 }
77 ```
78 </Tab>
79</Tabs>
80
81## Reranking model
82
83We recommend configuring **morph-rerank-v2** as your reranking model.
84
85<Tabs>
86 <Tab title="YAML">
87 ```yaml title="config.yaml"
88 models:
89 - name: Morph Reranker
90 provider: cohere
91 model: morph-rerank-v2
92 apiKey: <YOUR_MORPH_API_KEY>
93 apiBase: https://api.morphllm.com/v1/
94 roles:
95 - rerank
96 ```
97 </Tab>
98 <Tab title="JSON">
99 ```json title="config.json"
100 {
101 "reranker": {
102 "name": "cohere",
103 "params": {
104 "model": "morph-rerank-v2",
105 "apiKey": "<YOUR_MORPH_API_KEY>",
106 "apiBase": "https://api.morphllm.com/v1/"
107 }
108 }
109 }
110 ```
111 </Tab>
112</Tabs>