1.8 KiB
1.8 KiB
lingma-ipc-proxy
A standalone Go backend that talks to Lingma over Windows named-pipe IPC and exposes:
GET /v1/modelsPOST /v1/messagesPOST /v1/chat/completions
Current scope:
- non-streaming only
- one request at a time
- Windows only
- directly uses Lingma IPC, not DOM/CDP
Run
cd C:\Workspace\Personal\lingma-ipc-proxy
go run .\cmd\lingma-ipc-proxy
Flags
go run .\cmd\lingma-ipc-proxy --port 8095 --session-mode auto
--host--port--pipe--cwd--current-file-path--mode--shell-type--session-modereuse: keep using the sticky Lingma sessionfresh: create a temporary session for the request and delete it after completionauto: single-turn requests reuse; requests with system/history use a temporary fresh session and delete it after completion
--timeout
Environment
LINGMA_IPC_PIPELINGMA_PROXY_HOSTLINGMA_PROXY_PORTLINGMA_PROXY_CWDLINGMA_PROXY_CURRENT_FILE_PATHLINGMA_PROXY_MODELINGMA_PROXY_SHELL_TYPELINGMA_PROXY_SESSION_MODELINGMA_PROXY_TIMEOUT_SECONDS
Examples
Anthropic:
$body = @{
model = "dashscope_qwen3_coder"
messages = @(
@{ role = "user"; content = "请只回复:ANTHROPIC_OK" }
)
stream = $false
} | ConvertTo-Json -Depth 8
Invoke-RestMethod `
-Method Post `
-Uri http://127.0.0.1:8095/v1/messages `
-ContentType "application/json" `
-Body $body
OpenAI:
$body = @{
model = "dashscope_qwen3_coder"
messages = @(
@{ role = "user"; content = "请只回复:OPENAI_OK" }
)
stream = $false
} | ConvertTo-Json -Depth 8
Invoke-RestMethod `
-Method Post `
-Uri http://127.0.0.1:8095/v1/chat/completions `
-ContentType "application/json" `
-Body $body