Elffuss BraidHub

kikocis/continue public

f433400a74a4 · 2.1 KiBRawPermalink
1---
2title: "Moonshot AI"
3---
4
5[Moonshot AI](https://platform.moonshot.cn/) provides high-quality large language model services with competitive pricing and excellent performance.
6
7## Configuration
8
9To use Moonshot AI models, you need to:
10
111. Get an API key from [Moonshot AI Platform](https://platform.moonshot.cn/)
122. Add the following configuration:
13
14<Tabs>
15 <Tab title="YAML">
16 ```yaml title="config.yaml"
17 models:
18 - name: Moonshot
19 provider: moonshot
20 model: moonshot-v1-8k
21 apiKey: <YOUR_MOONSHOT_API_KEY>
22 ```
23 </Tab>
24 <Tab title="JSON">
25 ```json title="config.json"
26 {
27 "models": [
28 {
29 "title": "Moonshot",
30 "provider": "moonshot",
31 "model": "moonshot-v1-8k",
32 "apiKey": "<YOUR_MOONSHOT_API_KEY>"
33 }
34 ]
35 }
36 ```
37 </Tab>
38</Tabs>
39
40## Available Models
41
42Moonshot AI currently provides the following models:
43
44- `moonshot-v1-8k`: Base model with 8K context window
45- `moonshot-v1-32k`: Base model with 32K context window
46- `moonshot-v1-128k`: Base model with 128K context window
47
48## Configuration Options
49
50| Option | Description | Default |
51| --------- | ----------------- | ----------------------------- |
52| `apiKey` | Moonshot API key | Required |
53| `apiBase` | API base URL | `https://api.moonshot.cn/v1/` |
54| `model` | Model name to use | `moonshot-v1-8k` |
55
56## Example
57
58Here's a complete configuration example:
59
60<Tabs>
61 <Tab title="YAML">
62 ```yaml title="config.yaml"
63 models:
64 - name: Moonshot-8K
65 provider: moonshot
66 model: moonshot-v1-8k
67 apiKey: <YOUR_MOONSHOT_API_KEY>
68 defaultCompletionOptions:
69 temperature: 0.7
70 topP: 0.95
71 maxTokens: 2048
72 ```
73 </Tab>
74 <Tab title="JSON">
75 ```json title="config.json"
76 {
77 "models": [
78 {
79 "title": "Moonshot-8K",
80 "provider": "moonshot",
81 "model": "moonshot-v1-8k",
82 "apiKey": "<YOUR_MOONSHOT_API_KEY>",
83 "completionOptions": {
84 "temperature": 0.7,
85 "topP": 0.95,
86 "maxTokens": 2048
87 }
88 }
89 ]
90 }
91 ```
92 </Tab>
93</Tabs>