Spaces:
Sleeping
Sleeping
Arif
added streaming response and conversation memory. Also added reranker, ragas. Added 1 test
10e948d Download tests/test_rag.py from Arif-Badhon/Generative_AI_Project: direct link, hf CLI and curl.
- Browser
- Download file 327 Bytes
-
https://huggingface.co/spaces/Arif-Badhon/Generative_AI_Project/resolve/main/tests/test_rag.py
- Command line
-
hf download hf://spaces/Arif-Badhon/Generative_AI_Project/tests/test_rag.py
-
curl -L -o test_rag.py https://huggingface.co/spaces/Arif-Badhon/Generative_AI_Project/resolve/main/tests/test_rag.py
327 Bytes
| import pytest | |
| from app.core.embeddings import EmbeddingGenerator | |
| def test_embedding_generation(): | |
| embedder = EmbeddingGenerator("sentence-transformers/all-MiniLM-L6-v2") | |
| embeddings = embedder.generate(["test text"]) | |
| assert len(embeddings) == 1 | |
| assert len(embeddings[0]) == 384 | |
| # Run tests with: uv run pytest | |