MCPcopy Create free account
hub / github.com/alibaba/open-code-review / testTaskResponse

Function testTaskResponse

internal/llmloop/task_test.go:26–33  ·  view source on GitHub ↗
(name, arguments string)

Source from the content-addressed store, hash-verified

24}
25
26func testTaskResponse(name, arguments string) *llm.ChatResponse {
27 return &llm.ChatResponse{
28 Choices: []llm.Choice{{Message: llm.ResponseMessage{
29 ToolCalls: []llm.ToolCall{{ID: name, Type: "function", Function: llm.FunctionCall{Name: name, Arguments: arguments}}},
30 }}},
31 Usage: &llm.UsageInfo{PromptTokens: 10, CompletionTokens: 5, TotalTokens: 15},
32 }
33}
34
35func testTask() Task {
36 submit := llm.ToolDef{Type: "function", Function: llm.FunctionDef{Name: "submit_test_result"}}

Calls

no outgoing calls

Tested by

no test coverage detected