Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions fenn/agents/rag/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def _read_file(path):
def _read_pdf(path):
"""
Extract text from a PDF file using pypdf.
Requires: pip install "cofone[pdf]" or pip install pypdf
Requires: pip install "fenn[rag-pdf]" or pip install pypdf
"""
try:
import pypdf
Expand All @@ -120,7 +120,7 @@ def _read_pdf(path):
except ImportError:
raise ImportError(
"[cofone] pypdf not installed.\n"
'Run: pip install "cofone[pdf]" or pip install pypdf'
'Run: pip install "fenn[rag-pdf]" or pip install pypdf'
)


Expand Down Expand Up @@ -171,7 +171,7 @@ def _load_wikipedia(url):
"""
Fetch a Wikipedia article's full text using the wikipedia package.
Automatically detects language from the URL subdomain.
Requires: pip install "cofone[web]" or pip install wikipedia
Requires: pip install "fenn[rag-web]" or pip install wikipedia
"""
try:
import re
Expand All @@ -198,7 +198,7 @@ def _load_wikipedia(url):
except ImportError:
raise ImportError(
"[cofone] wikipedia package not installed.\n"
'Run: pip install "cofone[web]" or pip install wikipedia'
'Run: pip install "fenn[rag-web]" or pip install wikipedia'
)
except Exception as e:
raise ValueError(f"[cofone] Wikipedia error for '{url}': {e}") from e
Expand All @@ -209,7 +209,7 @@ def _load_youtube(url):
Fetch a YouTube video's transcript/subtitles.
Language priority: English first, then Italian, then any available.
Auto-generated captions are supported.
Requires: pip install "cofone[web]" or pip install youtube-transcript-api
Requires: pip install "fenn[rag-web]" or pip install youtube-transcript-api
Supports youtube-transcript-api >= 0.6.0 and >= 0.7.0 (dual fallback).
"""
try:
Expand Down Expand Up @@ -251,5 +251,5 @@ def _load_youtube(url):
except ImportError:
raise ImportError(
"[cofone] youtube-transcript-api not installed.\n"
'Run: pip install "cofone[web]" or pip install youtube-transcript-api'
'Run: pip install "fenn[rag-web]" or pip install youtube-transcript-api'
)
2 changes: 1 addition & 1 deletion fenn/agents/rag/rag.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class RAG:

faiss : bool, optional
If True, uses FAISS semantic vector search instead of BM25 keyword
search. Requires `pip install "cofone[faiss]"`. Default: False.
search. Requires `pip install "fenn[rag-faiss]"`. Default: False.

embedding_provider : str, optional
Provider for text embeddings (used only when faiss=True).
Expand Down
6 changes: 3 additions & 3 deletions fenn/agents/rag/retriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def _embed_local(self, texts):
except ImportError:
raise ImportError(
"[cofone] sentence-transformers not installed.\n"
'Run: pip install "cofone[faiss]" or pip install sentence-transformers'
'Run: pip install "fenn[rag-faiss]" or pip install sentence-transformers'
)

def _embed_openai_compat(self, texts):
Expand Down Expand Up @@ -279,7 +279,7 @@ def _get_faiss(self):

if sys.modules.get("faiss") is None:
raise ImportError(
'[cofone] faiss-cpu not installed.\nRun: pip install "cofone[faiss]"'
'[cofone] faiss-cpu not installed.\nRun: pip install "fenn[rag-faiss]"'
)
mod = sys.modules[__name__]
faiss_mod = getattr(mod, "faiss", None)
Expand All @@ -290,7 +290,7 @@ def _get_faiss(self):
setattr(mod, "faiss", faiss_mod)
except ImportError:
raise ImportError(
'[cofone] faiss-cpu not installed.\nRun: pip install "cofone[faiss]"'
'[cofone] faiss-cpu not installed.\nRun: pip install "fenn[rag-faiss]"'
)
return faiss_mod

Expand Down
Loading