66from llama_stack_client .types import EmbeddingsResponse , QueryChunksResponse
77from llama_stack_client .types .vector_io_insert_params import Chunk
88from simple_logger .logger import get_logger
9-
10- from utilities .constants import MinIo , QWEN_MODEL_NAME
119from utilities .rag_utils import TurnExpectation , validate_rag_agent_responses
1210
1311LOGGER = get_logger (name = __name__ )
1412
1513
1614@pytest .mark .parametrize (
17- "model_namespace, minio_pod, minio_data_connection, llama_stack_server_config " ,
15+ "model_namespace" ,
1816 [
1917 pytest .param (
2018 {"name" : "test-llamastack-rag" },
21- MinIo .PodConfig .QWEN_HAP_BPIV2_MINIO_CONFIG ,
22- {"bucket" : "llms" },
23- {
24- "vllm_url_fixture" : "qwen_isvc_url" ,
25- "inference_model" : QWEN_MODEL_NAME ,
26- },
2719 )
2820 ],
2921 indirect = True ,
@@ -37,9 +29,7 @@ class TestLlamaStackRag:
3729 """
3830
3931 @pytest .mark .smoke
40- def test_rag_inference_embeddings (
41- self , minio_pod , minio_data_connection , llama_stack_client : LlamaStackClient
42- ) -> None :
32+ def test_rag_inference_embeddings (self , llama_stack_client : LlamaStackClient ) -> None :
4333 """
4434 Test embedding model functionality and vector generation.
4535
@@ -61,9 +51,7 @@ def test_rag_inference_embeddings(
6151 assert isinstance (embeddings_response .embeddings [0 ][0 ], float )
6252
6353 @pytest .mark .smoke
64- def test_rag_vector_io_ingestion_retrieval (
65- self , minio_pod , minio_data_connection , llama_stack_client : LlamaStackClient
66- ) -> None :
54+ def test_rag_vector_io_ingestion_retrieval (self , llama_stack_client : LlamaStackClient ) -> None :
6755 """
6856 Validates basic vector_db API in llama-stack using milvus
6957
@@ -122,7 +110,7 @@ def test_rag_vector_io_ingestion_retrieval(
122110 LOGGER .warning (f"Failed to unregister vector database { vector_db_id } : { e } " )
123111
124112 @pytest .mark .smoke
125- def test_rag_simple_agent (self , minio_pod , minio_data_connection , llama_stack_client : LlamaStackClient ) -> None :
113+ def test_rag_simple_agent (self , llama_stack_client : LlamaStackClient ) -> None :
126114 """
127115 Test basic agent creation and conversation capabilities.
128116
@@ -153,12 +141,15 @@ def test_rag_simple_agent(self, minio_pod, minio_data_connection, llama_stack_cl
153141 session_id = s_id ,
154142 stream = False ,
155143 )
156- content = response .output_message .content
144+ content = response .output_message .content . lower ()
157145 assert content is not None , "LLM response content is None"
158- assert "answers" in content , "The LLM didn't provide the expected answer to the prompt"
146+ assert "answer" in content , "The LLM didn't provide the expected answer to the prompt"
147+ assert "translate" in content , "The LLM didn't provide the expected answer to the prompt"
148+ assert "summarize" in content , "The LLM didn't provide the expected answer to the prompt"
149+ assert "chat" in content , "The LLM didn't provide the expected answer to the prompt"
159150
160151 @pytest .mark .smoke
161- def test_rag_build_rag_agent (self , minio_pod , minio_data_connection , llama_stack_client : LlamaStackClient ) -> None :
152+ def test_rag_build_rag_agent (self , llama_stack_client : LlamaStackClient ) -> None :
162153 """
163154 Test full RAG pipeline with vector database integration and knowledge retrieval.
164155
0 commit comments