Add option to choose different models

This commit is contained in:
Saoud Rizwan
2024-08-11 00:28:22 -04:00
parent a863b26b7a
commit f54774b943
22 changed files with 487 additions and 151 deletions

View File

@@ -1,5 +1,5 @@
import { Anthropic } from "@anthropic-ai/sdk"
import { ApiConfiguration } from "../shared/api"
import { ApiConfiguration, ApiModelId, ModelInfo } from "../shared/api"
import { AnthropicHandler } from "./anthropic"
import { AwsBedrockHandler } from "./bedrock"
import { OpenRouterHandler } from "./openrouter"
@@ -19,6 +19,8 @@ export interface ApiHandler {
| Anthropic.ToolResultBlockParam
>
): any
getModel(): { id: ApiModelId; info: ModelInfo }
}
export function buildApiHandler(configuration: ApiConfiguration): ApiHandler {