old-agentic-v1^2
Travis Fischer 2023-06-12 17:25:19 -07:00
rodzic d10778fae2
commit acbcb654eb
3 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -54,7 +54,7 @@ export abstract class BaseTask<TInput = void, TOutput = string> {
throw new Error(`clone not implemented for task "${this.name}"`)
}
public retryConfig(retryConfig: types.RetryConfig) {
public retryConfig(retryConfig: types.RetryConfig): this {
this._retryConfig = retryConfig
return this
}
@ -82,7 +82,8 @@ export abstract class BaseTask<TInput = void, TOutput = string> {
attemptNumber: 0,
metadata: {
taskName: this.name,
taskId: this.id
taskId: this.id,
callId: this._agentic.idGeneratorFn()
}
}

Wyświetl plik

@ -104,6 +104,7 @@ export interface TaskResponseMetadata extends Record<string, any> {
success?: boolean
error?: Error
numRetries?: number
callId?: string
}
export interface LLMTaskResponseMetadata<

Wyświetl plik

@ -17,8 +17,9 @@ test('CalculatorTool', async (t) => {
t.is(res2.result, 1)
expectTypeOf(res2.result).toMatchTypeOf<number>()
const { taskId, ...metadata } = res2.metadata
const { taskId, callId, ...metadata } = res2.metadata
t.true(typeof taskId === 'string')
t.true(typeof callId === 'string')
t.deepEqual(metadata, {
success: true,
taskName: 'calculator',