From ebc56998d480603717199ca7e853d7894e151c21 Mon Sep 17 00:00:00 2001 From: Akhil Date: Tue, 7 Jan 2025 15:57:05 +0530 Subject: [PATCH 1/2] Added date options in search step --- athina/steps/search.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/athina/steps/search.py b/athina/steps/search.py index f20de2a..f8e24cf 100644 --- a/athina/steps/search.py +++ b/athina/steps/search.py @@ -28,6 +28,10 @@ class Search(Step): includedDomains: Optional list of domains to include in the search. If specified, results will only come from these domains.. excludeText: Optional list of strings that must not be present in webpage text of results. Currently, only 1 string is supported, of up to 5 words. includeText: Optional list of strings that must be present in webpage text of results. Currently, only 1 string is supported, of up to 5 words. + startPublishedDate: Optional start date for the search results. Format: YYYY-MM-DD. + endPublishedDate: Optional end date for the search results. Format: YYYY-MM-DD. + startCrawlDate: Optional Crawl date refers to the date that Exa discovered a link. Results will include links that were crawled after this date. Format: YYYY-MM-DD. + endCrawlDate: Crawl date refers to the date that Exa discovered a link. Results will include links that were crawled before this date. Format: YYYY-MM-DD. x_api_key: The API key to use for the request. """ @@ -39,6 +43,11 @@ class Search(Step): includeDomains: Optional[List[str]] = None excludeText: Optional[List[str]] = None includeText: Optional[List[str]] = None + startPublishedDate: Optional[str] = None + endPublishedDate: Optional[str] = None + startCrawlDate: Optional[str] = None + endCrawlDate: Optional[str] = None + x_api_key: str env: Environment = None @@ -81,6 +90,10 @@ def execute(self, input_data: Any) -> Union[Dict[str, Any], None]: }, "summary": {"query": self.query}, }, + "startPublishedDate": self.startPublishedDate, + "endPublishedDate": self.endPublishedDate, + "startCrawlDate": self.startCrawlDate, + "endCrawlDate": self.endCrawlDate, } prepared_body = None # Add a filter to the Jinja2 environment to convert the input data to JSON From 0834721d98c088722768259284ed10a46183e31e Mon Sep 17 00:00:00 2001 From: vivek-athina <153479827+vivek-athina@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:50:20 +0530 Subject: [PATCH 2/2] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d1974ec..c49c6e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "athina" -version = "1.7.3" +version = "1.7.4" description = "Python SDK to configure and run evaluations for your LLM-based application" authors = ["Shiv Sakhuja ", "Akshat Gupta ", "Vivek Aditya ", "Akhil Bisht "] readme = "README.md"