feat: make options object optional

old-agentic-v1^2
Philipp Burckhardt 2023-07-09 17:40:09 -04:00
rodzic a5adc08ad0
commit a62c41afe1
1 zmienionych plików z 15 dodań i 13 usunięć

Wyświetl plik

@ -29,19 +29,21 @@ export class Agentic extends EventEmitter {
protected _idGeneratorFn: types.IDGeneratorFunction protected _idGeneratorFn: types.IDGeneratorFunction
protected _id: string protected _id: string
constructor(opts: { constructor(
openai?: types.openai.OpenAIClient opts: {
anthropic?: types.anthropic.Anthropic openai?: types.openai.OpenAIClient
modelDefaults?: Pick< anthropic?: types.anthropic.Anthropic
types.BaseLLMOptions, modelDefaults?: Pick<
'provider' | 'model' | 'modelParams' | 'timeoutMs' | 'retryConfig' types.BaseLLMOptions,
> 'provider' | 'model' | 'modelParams' | 'timeoutMs' | 'retryConfig'
humanFeedbackDefaults?: HumanFeedbackOptions<HumanFeedbackType, any> >
idGeneratorFn?: types.IDGeneratorFunction humanFeedbackDefaults?: HumanFeedbackOptions<HumanFeedbackType, any>
logger?: types.Logger idGeneratorFn?: types.IDGeneratorFunction
ky?: types.KyInstance logger?: types.Logger
taskTracker?: TerminalTaskTracker ky?: types.KyInstance
}) { taskTracker?: TerminalTaskTracker
} = {}
) {
super() super()
// TODO: This is a bit hacky, but we're doing it to have a slightly nicer API // TODO: This is a bit hacky, but we're doing it to have a slightly nicer API