Skip to content
Snippets Groups Projects
Unverified Commit 94ec6ad8 authored by Bill Metangmo's avatar Bill Metangmo Committed by GitHub
Browse files

fix: allow guideline evaluator with bedrock (#11719)

parent 53095d8b
No related branches found
No related tags found
No related merge requests found
......@@ -95,8 +95,14 @@ class BaseEvaluator(PromptMixin):
Subclasses can override this method to provide custom evaluation logic and
take in additional arguments.
"""
return asyncio.run(
self.aevaluate_response(query=query, response=response, **kwargs)
response_str: Optional[str] = None
contexts: Optional[Sequence[str]] = None
if response is not None:
response_str = response.response
contexts = [node.get_content() for node in response.source_nodes]
return self.evaluate(
query=query, response=response_str, contexts=contexts, **kwargs
)
async def aevaluate_response(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment