( options: ExecutePromptOptions, )
| 34 | } |
| 35 | |
| 36 | export 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 | } |
nothing calls this directly
no test coverage detected