kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
rodzic
3c27840337
commit
b15d245137
|
@ -56,12 +56,12 @@ export class Agentic {
|
||||||
new HumanFeedbackMechanismCLI({ agentic: this })
|
new HumanFeedbackMechanismCLI({ agentic: this })
|
||||||
}
|
}
|
||||||
|
|
||||||
public get openai(): types.openai.OpenAIClient {
|
public get openai(): types.openai.OpenAIClient | undefined {
|
||||||
return this._openai!
|
return this._openai
|
||||||
}
|
}
|
||||||
|
|
||||||
public get anthropic(): types.anthropic.Client {
|
public get anthropic(): types.anthropic.Client | undefined {
|
||||||
return this._anthropic!
|
return this._anthropic
|
||||||
}
|
}
|
||||||
|
|
||||||
public get defaultHumanFeedbackMechamism() {
|
public get defaultHumanFeedbackMechamism() {
|
||||||
|
|
|
@ -38,7 +38,13 @@ export class AnthropicChatModel<
|
||||||
...options
|
...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(
|
protected override async _createChatCompletion(
|
||||||
|
|
|
@ -29,7 +29,13 @@ export class OpenAIChatModel<
|
||||||
...options
|
...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(
|
protected override async _createChatCompletion(
|
||||||
|
|
Ładowanie…
Reference in New Issue