MCPcopy
hub / github.com/alibaba/page-agent / agentResponse

Function agentResponse

packages/core/src/PageAgentCore.test.ts:10–31  ·  view source on GitHub ↗
(args: unknown)

Source from the content-addressed store, hash-verified

8type TestFetch = (...args: Parameters<typeof globalThis.fetch>) => Promise<Response>
9
10function agentResponse(args: unknown): Response {
11 return new Response(
12 JSON.stringify({
13 choices: [
14 {
15 finish_reason: 'tool_calls',
16 message: {
17 tool_calls: [
18 {
19 function: {
20 name: 'AgentOutput',
21 arguments: JSON.stringify(args),
22 },
23 },
24 ],
25 },
26 },
27 ],
28 usage: {},
29 })
30 )
31}
32
33function createPageController(): PageController {
34 const browserState: BrowserState = {

Callers 3

doneResponseFunction · 0.85
waitResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected