Merge branch 'main' into docs-windows-and-tui-restart
This commit is contained in:
commit
5bfffa4c43
2 changed files with 8 additions and 17 deletions
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
OpenRAG is a comprehensive Retrieval-Augmented Generation platform that enables intelligent document search and AI-powered conversations. Users can upload, process, and query documents through a chat interface backed by large language models and semantic search capabilities. The system utilizes Langflow for document ingestion, retrieval workflows, and intelligent nudges, providing a seamless RAG experience. Built with [Starlette](https://github.com/Kludex/starlette) and [Next.js](https://github.com/vercel/next.js). Powered by [OpenSearch](https://github.com/opensearch-project/OpenSearch), [Langflow](https://github.com/langflow-ai/langflow), and [Docling](https://github.com/docling-project/docling).
|
||||
|
||||
<a href="https://deepwiki.com/phact/openrag"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
|
||||
<a href="https://deepwiki.com/langflow-ai/openrag"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
|
||||
|
||||
</div>
|
||||
<div align="center">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import httpx
|
||||
from typing import Dict, List
|
||||
from api.provider_validation import test_embedding
|
||||
from utils.container_utils import transform_localhost_url
|
||||
from utils.logging_config import get_logger
|
||||
|
||||
|
|
@ -9,18 +10,6 @@ logger = get_logger(__name__)
|
|||
class ModelsService:
|
||||
"""Service for fetching available models from different AI providers"""
|
||||
|
||||
OLLAMA_EMBEDDING_MODELS = [
|
||||
"nomic-embed-text",
|
||||
"mxbai-embed-large",
|
||||
"snowflake-arctic-embed",
|
||||
"all-minilm",
|
||||
"bge-m3",
|
||||
"bge-large",
|
||||
"paraphrase-multilingual",
|
||||
"granite-embedding",
|
||||
"jina-embeddings-v2-base-en",
|
||||
]
|
||||
|
||||
OPENAI_TOOL_CALLING_MODELS = [
|
||||
"gpt-5",
|
||||
"gpt-5-mini",
|
||||
|
|
@ -171,10 +160,12 @@ class ModelsService:
|
|||
has_tools = TOOL_CALLING_CAPABILITY in capabilities
|
||||
|
||||
# Check if it's an embedding model
|
||||
is_embedding = any(
|
||||
embed_model in model_name.lower()
|
||||
for embed_model in self.OLLAMA_EMBEDDING_MODELS
|
||||
)
|
||||
try:
|
||||
await test_embedding("ollama", endpoint=endpoint, embedding_model=model_name)
|
||||
is_embedding = True
|
||||
except Exception as e:
|
||||
logger.warning(f"Failed to test embedding for model {model_name}: {str(e)}")
|
||||
is_embedding = False
|
||||
|
||||
if is_embedding:
|
||||
# Embedding models only need completion capability
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue