Skip to content

Commit c8ad270

Browse files
committed
fix(docs): correct custom request format documentation
- Clarify the number of request parameters supported and the compatibility of messageKey with OpenAI. - Update the example of custom request format to include the correct syntax for custom fields and headers. - Add an example of how to use custom headers and fix the Moonshot AI example link.
1 parent 089afdc commit c8ad270

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

docs/customize/custom-llm-server.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,14 @@ $.choices[0].message.delta.content
7171

7272
## Custom request format
7373

74-
Only support amount of request parameters like OpenAI does.
75-
Only support http request that don't need encryption keys(like websocket)
76-
74+
Only support number of request parameters like OpenAI does.
75+
Only support http request that doesn't need encryption keys(like websocket)
7776

7877
### Custom Request (header/body/message-keys)
7978

8079
**BE CAREFUL: In this project, messageKey is not compatible with openAI: messageKeys: `{ { "content": "content" } }`is REQUIRED** *maybe we will fix this in the future.*
8180

82-
If your llm server has custom request format, you can:
81+
If your llm server has a custom request format, you can:
8382

8483
- Add top level field to the request body via `customFields`
8584
- Add custom headers to the request via `customHeaders`
@@ -91,7 +90,7 @@ For example:
9190
{ "customFields": {"user": "12345", "model":"model-name", "stream": true}, "messageKeys": { "content": "content" }}
9291
```
9392

94-
93+
Or with custom headers:
9594

9695
```json
9796
{
@@ -125,7 +124,7 @@ And the request body will be:
125124
}
126125
```
127126

128-
### Moonshot AI example
127+
### Moonshot AI examples
129128

130129
Official Moonshot AI doc: https://platform.moonshot.cn/docs/api-reference
131130

@@ -165,4 +164,4 @@ Response format:
165164

166165
```
167166
$.choices[0].delta.content
168-
```
167+
```

0 commit comments

Comments
 (0)