Function
paramsForAttempt
(
input: ChatWithRetryInput,
attempt: number,
maxAttempts: number,
)
Source from the content-addressed store, hash-verified
| 83 | } |
| 84 | |
| 85 | function paramsForAttempt( |
| 86 | input: ChatWithRetryInput, |
| 87 | attempt: number, |
| 88 | maxAttempts: number, |
| 89 | ): LLMChatParams { |
| 90 | const turnStep = `${input.turnId}.${String(input.currentStep)}`; |
| 91 | return { |
| 92 | ...input.params, |
| 93 | requestLogFields: |
| 94 | attempt === 1 |
| 95 | ? { turnStep } |
| 96 | : { turnStep, attempt: `${String(attempt)}/${String(maxAttempts)}` }, |
| 97 | }; |
| 98 | } |
| 99 | |
| 100 | export function retryBackoffDelays(maxAttempts: number): number[] { |
| 101 | return retry.timeouts({ |
Tested by
no test coverage detected