kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
old-agentic-v1^2
rodzic
3c27840337
commit
b15d245137
|
@ -56,12 +56,12 @@ export class Agentic {
|
|||
new HumanFeedbackMechanismCLI({ agentic: this })
|
||||
}
|
||||
|
||||
public get openai(): types.openai.OpenAIClient {
|
||||
return this._openai!
|
||||
public get openai(): types.openai.OpenAIClient | undefined {
|
||||
return this._openai
|
||||
}
|
||||
|
||||
public get anthropic(): types.anthropic.Client {
|
||||
return this._anthropic!
|
||||
public get anthropic(): types.anthropic.Client | undefined {
|
||||
return this._anthropic
|
||||
}
|
||||
|
||||
public get defaultHumanFeedbackMechamism() {
|
||||
|
|
|
@ -38,7 +38,13 @@ export class AnthropicChatModel<
|
|||
...options
|
||||
})
|
||||
|
||||
this._client = this._agentic.anthropic
|
||||
if (this._agentic.anthropic) {
|
||||
this._client = this._agentic.anthropic
|
||||
} else {
|
||||
throw new Error(
|
||||
'AnthropicChatModel requires an Anthropic client to be configured on the Agentic runtime'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
protected override async _createChatCompletion(
|
||||
|
|
|
@ -29,7 +29,13 @@ export class OpenAIChatModel<
|
|||
...options
|
||||
})
|
||||
|
||||
this._client = this._agentic.openai
|
||||
if (this._agentic.openai) {
|
||||
this._client = this._agentic.openai
|
||||
} else {
|
||||
throw new Error(
|
||||
'OpenAIChatModel requires an OpenAI client to be configured on the Agentic runtime'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
protected override async _createChatCompletion(
|
||||
|
|
Ładowanie…
Reference in New Issue