Skip to content

Commit

Permalink
fix:codestype error reportIncompatibleMethodOverride
Browse files Browse the repository at this point in the history
  • Loading branch information
oslijunw committed Jan 15, 2025
1 parent 3d8751c commit 3fddbc1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/ragas/testset/synthesizers/multi_hop/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,10 @@ def convert_to_scenario(self, data: t.Dict[str, t.Any]) -> MultiHopScenario:
)

async def _generate_sample(
self, scenario: MultiHopScenario, callbacks: Callbacks
self, scenario: Scenario, callbacks: Callbacks
) -> SingleTurnSample:

if not isinstance(scenario, MultiHopScenario):
logger.warning('scenario type should be MultiHopScenario')
reference_context = self.make_contexts(scenario)
prompt_input = QueryConditions(
persona=scenario.persona,
Expand Down
5 changes: 3 additions & 2 deletions src/ragas/testset/synthesizers/single_hop/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ def convert_to_scenario(self, data: t.Dict[str, t.Any]) -> SingleHopScenario:
)

async def _generate_sample(
self, scenario: SingleHopScenario, callbacks: Callbacks
self, scenario: Scenario, callbacks: Callbacks
) -> SingleTurnSample:

if not isinstance(scenario, SingleHopScenario):
logger.warning('scenario type should be SingleHopScenario')
reference_context = scenario.nodes[0].properties.get("page_content", "")
prompt_input = QueryCondition(
persona=scenario.persona,
Expand Down

0 comments on commit 3fddbc1

Please sign in to comment.