Skip to content

Commit

Permalink
Merge pull request #24 from reworkd/forum-test-set
Browse files Browse the repository at this point in the history
Forum test set
  • Loading branch information
asim-shrestha authored Nov 29, 2023
2 parents 35aced4 + e3bf9bd commit 1e55194
Show file tree
Hide file tree
Showing 21 changed files with 529,157 additions and 86,319 deletions.
12 changes: 12 additions & 0 deletions bananalyzer/data/fetch_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,23 @@ class ManufacturingCommerceSchema(BaseModel):
suggested_alternative_mpns: list[str]


class ForumSchema(BaseModel):
auther: str
title: str
post_date: str
content: str
up_votes: int
down_votes: int
views: int
num_comments: int


def get_fetch_schema(fetch_id: str) -> Type[BaseModel]:
fetch_schemas: Dict[str, Type[BaseModel]] = {
"contact": ContactSchema,
"job_posting": JobPostingSchema,
"manufacturing_commerce": ManufacturingCommerceSchema,
"forum": ForumSchema,
}

if fetch_id not in fetch_schemas:
Expand Down
2 changes: 1 addition & 1 deletion bananalyzer/data/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Example(BaseModel):
description="The goal of the agent for this specific example"
)
fetch_id: Optional[
Literal["job_posting", "manufacturing_commerce", "contact"]
Literal["job_posting", "manufacturing_commerce", "contact", "forum"]
] = Field(
default=None,
description="If it is a fetch type, we can infer the goal based on this id to avoid large schemas in json",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "bananalyzer"
version = "0.6.5"
version = "0.6.6"

description = "Open source AI Agent evaluation framework for web tasks 🐒🍌"
authors = ["asim-shrestha <[email protected]>"]
Expand Down
Loading

0 comments on commit 1e55194

Please sign in to comment.