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 _id: string
constructor(opts: {
openai?: types.openai.OpenAIClient
anthropic?: types.anthropic.Anthropic
modelDefaults?: Pick<
types.BaseLLMOptions,
'provider' | 'model' | 'modelParams' | 'timeoutMs' | 'retryConfig'
>
humanFeedbackDefaults?: HumanFeedbackOptions<HumanFeedbackType, any>
idGeneratorFn?: types.IDGeneratorFunction
logger?: types.Logger
ky?: types.KyInstance
taskTracker?: TerminalTaskTracker
}) {
constructor(
opts: {
openai?: types.openai.OpenAIClient
anthropic?: types.anthropic.Anthropic
modelDefaults?: Pick<
types.BaseLLMOptions,
'provider' | 'model' | 'modelParams' | 'timeoutMs' | 'retryConfig'
>
humanFeedbackDefaults?: HumanFeedbackOptions<HumanFeedbackType, any>
idGeneratorFn?: types.IDGeneratorFunction
logger?: types.Logger
ky?: types.KyInstance
taskTracker?: TerminalTaskTracker
} = {}
) {
super()
// TODO: This is a bit hacky, but we're doing it to have a slightly nicer API