Skip to content

Commit

Permalink
fix: wrong key to get the recommendation
Browse files Browse the repository at this point in the history
  • Loading branch information
paopa committed Oct 7, 2024
1 parent 88c778d commit c8ea912
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async def recommend(self, request: Input, **kwargs) -> Resource:
resp = await self._pipelines["relationship_recommendation"].run(**input)

self._cache[request.id] = self.Resource(
id=request.id, status="finished", response=resp.get("recommendations")
id=request.id, status="finished", response=resp.get("validated")
)
except orjson.JSONDecodeError as e:
self._handle_exception(request, f"Failed to parse MDL: {str(e)}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def relationship_recommendation_service(mock_pipeline):
@pytest.mark.asyncio
async def test_recommend_success(relationship_recommendation_service, mock_pipeline):
request = RelationshipRecommendation.Input(id="test_id", mdl='{"key": "value"}')
mock_pipeline.run.return_value = {"recommendations": {"test": "data"}}
mock_pipeline.run.return_value = {"validated": {"test": "data"}}

response = await relationship_recommendation_service.recommend(request)

Expand Down

0 comments on commit c8ea912

Please sign in to comment.