Guide Home 1. Solution Topology 2. Aspire as 3. Shared Configuration 4. Metadata with 5. Upload API 6. Object Storage 7. Worker Ingestion 8. Extracting and 9. Literary Artifacts 10. AI Provider 11. Qdrant Vector 12. Ask Flow 13. Prompting and 14. Testing the 15. Local Development All Guides
Guide navigationIndex and chapters
Chapter 10

AI Provider Abstractions

The project supports Ollama and Gemini through provider implementations:

Decorative chapter image for AI Provider Abstractions
The provider-neutral surface
IEmbeddingProvider
IChatCompletionProvider
ILiteraryAnalysisProvider

The project supports Ollama and Gemini through provider implementations:

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:

  1. implement the provider interfaces;
  2. add a configuration branch in AddAiProviders;
  3. 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.