|
15 | 15 | from uipath.platform.context_grounding import ( |
16 | 16 | BatchTransformResponse, |
17 | 17 | CitationMode, |
18 | | - DeepRagResponse, |
| 18 | + DeepRagContent, |
19 | 19 | ) |
20 | 20 |
|
21 | 21 | from uipath_langchain.agent.tools.context_tool import ( |
@@ -80,7 +80,10 @@ def test_successful_deep_rag_creation(self, base_resource_config): |
80 | 80 | assert result.name == "test_deep_rag" |
81 | 81 | assert result.description == "Test Deep RAG tool" |
82 | 82 | assert result.args_schema is None |
83 | | - assert result.output_type == DeepRagResponse |
| 83 | + assert issubclass(result.output_type, DeepRagContent) |
| 84 | + schema = result.output_type.model_json_schema() |
| 85 | + assert "deepRagId" in schema["properties"] |
| 86 | + assert schema["properties"]["deepRagId"]["type"] == "string" |
84 | 87 |
|
85 | 88 | def test_missing_query_object_raises_error(self, base_resource_config): |
86 | 89 | """Test that missing query object raises ValueError.""" |
@@ -227,7 +230,7 @@ def test_dynamic_query_deep_rag_creation(self, base_resource_config): |
227 | 230 | assert result.name == "test_deep_rag" |
228 | 231 | assert result.description == "Test Deep RAG tool" |
229 | 232 | assert result.args_schema is not None # Dynamic has input schema |
230 | | - assert result.output_type == DeepRagResponse |
| 233 | + assert issubclass(result.output_type, DeepRagContent) |
231 | 234 |
|
232 | 235 | def test_dynamic_query_deep_rag_has_query_parameter(self, base_resource_config): |
233 | 236 | """Test that dynamic Deep RAG tool has query parameter in schema.""" |
@@ -329,7 +332,7 @@ def test_create_deep_rag_tool(self, deep_rag_config): |
329 | 332 | assert isinstance(result, StructuredToolWithOutputType) |
330 | 333 | assert result.name == "test_deep_rag" |
331 | 334 | assert result.args_schema is None # Deep RAG has no input schema |
332 | | - assert result.output_type == DeepRagResponse |
| 335 | + assert issubclass(result.output_type, DeepRagContent) |
333 | 336 |
|
334 | 337 | def test_case_insensitive_retrieval_mode(self, deep_rag_config): |
335 | 338 | """Test that retrieval mode matching is case-insensitive.""" |
|
0 commit comments