Package com.oracle.coherence.rag.model
package com.oracle.coherence.rag.model
AI model integration classes for the Oracle Coherence RAG framework.
This package provides abstract base classes and common functionality for integrating with various AI models and services. It includes model suppliers that handle caching, connection pooling, and configuration for different types of AI models used in RAG applications.
Core model integration classes include:
AbstractModelSupplier- Base class for model suppliersChatModelSupplier- Supplier for chat/completion modelsStreamingChatModelSupplier- Supplier for streaming chat/completion modelsEmbeddingModelSupplier- Supplier for text embedding modelsScoringModelSupplier- Supplier for document scoring models
Local ONNX model support:
LocalOnnxEmbeddingModel- Local embedding models via ONNX RuntimeLocalOnnxScoringModel- Local scoring models via ONNX RuntimeOnnxEmbeddingModel- BERT bi-encoder for embeddingsOnnxBertCrossEncoder- BERT cross-encoder for scoring
The model integration system provides:
- Connection pooling and caching for efficient resource usage
- Support for both local ONNX models and remote API services
- GPU and CPU execution modes for ONNX models
- Configurable model parameters and settings
- Integration with LangChain4J model interfaces
Remote model providers are available in separate modules:
- OpenAI GPT models - coherence-rag-open-ai
- OCI GenAI service - coherence-rag-oci
- Ollama local models - coherence-rag-ollama
- DeepSeek models - coherence-rag-deepseek
- Since:
- 25.09
- Author:
- Aleks Seovic 2025.07.04
-
ClassDescriptionAbstract base class for AI model suppliers with configuration and caching support.CDI supplier for chat models in the Coherence RAG framework.CDI supplier for embedding models in the Coherence RAG framework.Local ONNX embedding model implementation that integrates with LangChain4J.Local ONNX scoring model implementation that integrates with LangChain4J.A record representing a structured model name with provider and model components.ONNX-based BERT cross-encoder implementation for scoring text pairs.Core ONNX embedding model implementation that provides efficient text embeddings using ONNX Runtime and HuggingFace tokenizers.Configuration record for pooling settings in transformer-based embedding models.Enumeration of pooling modes for text embedding models.CDI supplier for scoring models in the Coherence RAG framework.CDI supplier for streaming chat models in the Coherence RAG framework.