Add anthropicBaseUrl option

This commit is contained in:
Saoud Rizwan
2024-09-07 07:31:29 -04:00
parent c8db73fd69
commit ca4ad1d0b3
4 changed files with 39 additions and 2 deletions

View File

@@ -8,7 +8,10 @@ export class AnthropicHandler implements ApiHandler {
constructor(options: ApiHandlerOptions) {
this.options = options
this.client = new Anthropic({ apiKey: this.options.apiKey })
this.client = new Anthropic({
apiKey: this.options.apiKey,
baseURL: this.options.anthropicBaseUrl || undefined,
})
}
async createMessage(