AI Provider Abstractions
The project supports Ollama and Gemini through provider implementations:
The provider-neutral surface
IEmbeddingProvider
IChatCompletionProvider
ILiteraryAnalysisProviderThe project supports Ollama and Gemini through provider implementations:
OllamaEmbeddingProviderOllamaChatCompletionProviderOllamaLiteraryAnalysisProviderGeminiEmbeddingProviderGeminiChatCompletionProviderGeminiLiteraryAnalysisProvider
Provider selection happens in ServiceCollectionExtensions.AddAiProviders.
The rest of the code depends only on:
IEmbeddingProvider
IChatCompletionProvider
ILiteraryAnalysisProvider
That means adding another provider should be a focused change:
- implement the provider interfaces;
- add a configuration branch in
AddAiProviders; - set the provider-specific base URL, model names, and API key source.
A future Azure OpenAI, AWS Bedrock, Vertex AI, or OpenAI provider should not require changes to the ingestion service, API endpoints, or worker orchestration.