-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
114 additions
and
3 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
llama-index-integrations/agent/llama-index-agent-critic/BUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
poetry_requirements( | ||
name="poetry", | ||
) |
1 change: 1 addition & 0 deletions
1
llama-index-integrations/agent/llama-index-agent-critic/llama_index/agent/critic/BUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python_sources() |
19 changes: 19 additions & 0 deletions
19
...dex-integrations/agent/llama-index-agent-critic/llama_index/agent/critic/output_parser.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import asyncio | ||
from typing import Any | ||
from llama_index.core.output_parsers.base import BaseOutputParser | ||
|
||
|
||
class CritiqueOutputParser(BaseOutputParser): | ||
async def aparse(self, output: str) -> Any: | ||
... | ||
|
||
def parse(self, output: str) -> Any: | ||
return asyncio.run(self.aparse(output=output)) | ||
|
||
|
||
class CorrectOutputParser(BaseOutputParser): | ||
async def aparse(self, output: str) -> Any: | ||
... | ||
|
||
def parse(self, output: str) -> Any: | ||
return asyncio.run(self.aparse(output=output)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
llama-index-integrations/agent/llama-index-agent-critic/tests/BUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python_tests() |