MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / makeChatCompletionResponse

Function makeChatCompletionResponse

packages/kosong/test/kimi.test.ts:8–23  ·  view source on GitHub ↗
(model: string = 'test-model')

Source from the content-addressed store, hash-verified

6import { describe, it, expect, vi } from 'vitest';
7
8function makeChatCompletionResponse(model: string = 'test-model') {
9 return {
10 id: 'chatcmpl-test123',
11 object: 'chat.completion',
12 created: 1234567890,
13 model,
14 choices: [
15 {
16 index: 0,
17 message: { role: 'assistant', content: 'Hello' },
18 finish_reason: 'stop',
19 },
20 ],
21 usage: { prompt_tokens: 10, completion_tokens: 5, total_tokens: 15 },
22 };
23}
24
25function createProvider(
26 stream: boolean = false,

Callers 2

captureRequestBodyFunction · 0.70
kimi.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected