MCPcopy Create free account
hub / github.com/dwgx/WindsurfAPI / normalize

Function normalize

src/cache.js:100–114  ·  view source on GitHub ↗
(body)

Source from the content-addressed store, hash-verified

98}
99
100function normalize(body) {
101 return {
102 model: body.model || '',
103 messages: normalizeBinary(body.messages || []),
104 tools: body.tools || null,
105 tool_choice: body.tool_choice || null,
106 response_format: body.response_format || null,
107 reasoning_effort: body.reasoning_effort ?? null,
108 thinking: body.thinking || null,
109 stream_options: body.stream_options || null,
110 temperature: body.temperature ?? null,
111 top_p: body.top_p ?? null,
112 max_tokens: body.max_tokens ?? null,
113 };
114}
115
116/**
117 * Build a cache key for a chat request.

Callers 1

cacheKeyFunction · 0.85

Calls 1

normalizeBinaryFunction · 0.85

Tested by

no test coverage detected