kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
old-agentic-v1^2
rodzic
e4f9a4ed7f
commit
6df60ab2d3
|
@ -41,7 +41,7 @@ export class Agentic {
|
|||
modelParams: {},
|
||||
timeoutMs: 2 * 60000,
|
||||
retryConfig: {
|
||||
attempts: 3,
|
||||
retries: 3,
|
||||
strategy: 'heal',
|
||||
...opts.openaiModelDefaults?.retryConfig
|
||||
},
|
||||
|
|
|
@ -318,6 +318,7 @@ export abstract class BaseChatModel<
|
|||
}
|
||||
|
||||
const safeResult = outputSchema.safeParse(output)
|
||||
|
||||
if (!safeResult.success) {
|
||||
throw new errors.ZodOutputValidationError(safeResult.error)
|
||||
}
|
||||
|
|
|
@ -72,6 +72,7 @@ export abstract class BaseTask<
|
|||
: z.object(this.inputSchema)
|
||||
|
||||
const safeInput = inputSchema.safeParse(input)
|
||||
|
||||
if (!safeInput.success) {
|
||||
throw new Error(`Invalid input: ${safeInput.error.message}`)
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue