MCPcopy Index your code
hub / github.com/TanStack/ai / executePrompt

Function executePrompt

examples/ts-code-mode-web/src/lib/execute-prompt.ts:36–66  ·  view source on GitHub ↗
(
  options: ExecutePromptOptions,
)

Source from the content-addressed store, hash-verified

34}
35
36export function executePrompt(
37 options: ExecutePromptOptions,
38): Promise<ExecutePromptResult> {
39 const {
40 prompt,
41 adapter,
42 tools,
43 driver,
44 system,
45 maxTokens,
46 timeout,
47 memoryLimit,
48 getSkillBindings,
49 onEvent,
50 } = options
51
52 const { tool } = createExecutePromptTool({
53 adapter,
54 system,
55 maxTokens,
56 onEvent,
57 inner: createCodeMode({
58 driver,
59 tools,
60 timeout,
61 memoryLimit,
62 getSkillBindings,
63 }),
64 })
65 return Promise.resolve(tool.execute!({ prompt }))
66}

Callers

nothing calls this directly

Calls 3

createExecutePromptToolFunction · 0.90
createCodeModeFunction · 0.90
resolveMethod · 0.80

Tested by

no test coverage detected