MCPcopy Create free account
hub / github.com/Noumena-Network/code / createBaseUsage

Function createBaseUsage

src/services/api/openAICompatInferenceClient.ts:256–272  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

254}
255
256function createBaseUsage() {
257 return {
258 input_tokens: 0,
259 output_tokens: 0,
260 cache_creation_input_tokens: 0,
261 cache_read_input_tokens: 0,
262 server_tool_use: { web_search_requests: 0, web_fetch_requests: 0 },
263 service_tier: null,
264 cache_creation: {
265 ephemeral_1h_input_tokens: 0,
266 ephemeral_5m_input_tokens: 0,
267 },
268 inference_geo: null,
269 iterations: null,
270 speed: null,
271 }
272}
273
274function mapUsage(usage: OpenAIChatCompletionResponse['usage']) {
275 const base = createBaseUsage()

Callers 3

mapUsageFunction · 0.85
ensureMessageStartFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected