| 1 | import { LLMOptions } from "../../index.js"; |
| 2 | import { LlmApiRequestType } from "../openaiTypeConverters.js"; |
| 3 | |
| 4 | import OpenAI from "./OpenAI.js"; |
| 5 | |
| 6 | class Azure extends OpenAI { |
| 7 | static providerName = "azure"; |
| 8 | |
| 9 | protected supportsPrediction(model: string): boolean { |
| 10 | return false; |
| 11 | } |
| 12 | |
| 13 | protected useOpenAIAdapterFor: (LlmApiRequestType | "*")[] = []; |
| 14 | |
| 15 | static defaultOptions: Partial<LLMOptions> = { |
| 16 | apiVersion: "2024-02-15-preview", |
| 17 | apiType: "azure-openai", |
| 18 | }; |
| 19 | |
| 20 | constructor(options: LLMOptions) { |
| 21 | super(options); |
| 22 | this.deployment = options.deployment ?? options.model; |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | export default Azure; |