Add OpenAI provider

This commit is contained in:
Saoud Rizwan
2024-09-12 15:01:28 -04:00
parent cb8ce1685f
commit 4b44e8f921
7 changed files with 182 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ import { VertexHandler } from "./vertex"
import { OpenAiHandler } from "./openai"
import { OllamaHandler } from "./ollama"
import { GeminiHandler } from "./gemini"
import { OpenAiNativeHandler } from "./openai-native"
export interface ApiHandlerMessageResponse {
message: Anthropic.Messages.Message
@@ -40,6 +41,8 @@ export function buildApiHandler(configuration: ApiConfiguration): ApiHandler {
return new OllamaHandler(options)
case "gemini":
return new GeminiHandler(options)
case "openai-native":
return new OpenAiNativeHandler(options)
default:
return new AnthropicHandler(options)
}