docs: add Chinese README
This commit is contained in:
57
README.md
57
README.md
@@ -1,5 +1,7 @@
|
||||
# lingma-ipc-proxy
|
||||
|
||||
[English](./README.md) | [简体中文](./README.zh-CN.md)
|
||||
|
||||
A standalone Go backend that talks to Lingma over Windows named-pipe IPC and exposes:
|
||||
|
||||
- `GET /v1/models`
|
||||
@@ -8,7 +10,7 @@ A standalone Go backend that talks to Lingma over Windows named-pipe IPC and exp
|
||||
|
||||
Current scope:
|
||||
|
||||
- non-streaming only
|
||||
- supports both non-streaming and streaming responses
|
||||
- one request at a time
|
||||
- Windows only
|
||||
- directly uses Lingma IPC, not DOM/CDP
|
||||
@@ -145,7 +147,7 @@ go run .\cmd\lingma-ipc-proxy --port 8095 --session-mode auto
|
||||
|
||||
## Examples
|
||||
|
||||
Anthropic:
|
||||
Anthropic non-streaming:
|
||||
|
||||
```powershell
|
||||
$body = @{
|
||||
@@ -163,7 +165,24 @@ Invoke-RestMethod `
|
||||
-Body $body
|
||||
```
|
||||
|
||||
OpenAI:
|
||||
Anthropic streaming:
|
||||
|
||||
```powershell
|
||||
$body = @{
|
||||
model = "dashscope_qwen3_coder"
|
||||
messages = @(
|
||||
@{ role = "user"; content = "请只回复:ANTHROPIC_STREAM_OK" }
|
||||
)
|
||||
stream = $true
|
||||
} | ConvertTo-Json -Depth 8
|
||||
|
||||
curl.exe -N `
|
||||
-H "Content-Type: application/json" `
|
||||
-d $body `
|
||||
http://127.0.0.1:8095/v1/messages
|
||||
```
|
||||
|
||||
OpenAI non-streaming:
|
||||
|
||||
```powershell
|
||||
$body = @{
|
||||
@@ -180,3 +199,35 @@ Invoke-RestMethod `
|
||||
-ContentType "application/json" `
|
||||
-Body $body
|
||||
```
|
||||
|
||||
OpenAI streaming:
|
||||
|
||||
```powershell
|
||||
$body = @{
|
||||
model = "dashscope_qwen3_coder"
|
||||
messages = @(
|
||||
@{ role = "user"; content = "请只回复:OPENAI_STREAM_OK" }
|
||||
)
|
||||
stream = $true
|
||||
} | ConvertTo-Json -Depth 8
|
||||
|
||||
curl.exe -N `
|
||||
-H "Content-Type: application/json" `
|
||||
-d $body `
|
||||
http://127.0.0.1:8095/v1/chat/completions
|
||||
```
|
||||
|
||||
## Streaming shape
|
||||
|
||||
Anthropic streaming emits SSE events compatible with the `messages` API shape:
|
||||
|
||||
- `message_start`
|
||||
- `content_block_start`
|
||||
- `content_block_delta`
|
||||
- `content_block_stop`
|
||||
- `message_delta`
|
||||
- `message_stop`
|
||||
|
||||
OpenAI streaming emits `chat.completion.chunk` payloads as `data:` lines and ends with:
|
||||
|
||||
- `data: [DONE]`
|
||||
|
||||
Reference in New Issue
Block a user