(
toolCallName: string,
args: any = {},
overrides: MessageOverrides = {},
)
| 149 | } |
| 150 | |
| 151 | export function createToolCallMessage( |
| 152 | toolCallName: string, |
| 153 | args: any = {}, |
| 154 | overrides: MessageOverrides = {}, |
| 155 | ): Message { |
| 156 | const toolCallId = `tool-call-${Math.random().toString(36).substr(2, 9)}`; |
| 157 | return createAssistantMessage({ |
| 158 | content: "", |
| 159 | toolCalls: [ |
| 160 | { |
| 161 | id: toolCallId, |
| 162 | type: "function", |
| 163 | function: { |
| 164 | name: toolCallName, |
| 165 | arguments: JSON.stringify(args), |
| 166 | }, |
| 167 | }, |
| 168 | ], |
| 169 | ...overrides, |
| 170 | }); |
| 171 | } |
| 172 | |
| 173 | export function createToolResultMessage( |
| 174 | toolCallId: string, |
no test coverage detected
searching dependent graphs…