Skip to content

Commit

Permalink
Merge pull request #160 from athina-ai/added-more-options-for-search-…
Browse files Browse the repository at this point in the history
…step

Added date options in search step
  • Loading branch information
vivek-athina authored Jan 7, 2025
2 parents eee7622 + 0834721 commit 145ac6a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions athina/steps/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""

Expand All @@ -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

Expand Down Expand Up @@ -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
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 = "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 <shiv@athina.ai>", "Akshat Gupta <akshat@athina.ai>", "Vivek Aditya <vivek@athina.ai>", "Akhil Bisht <akhil@athina.ai>"]
readme = "README.md"
Expand Down

0 comments on commit 145ac6a

Please sign in to comment.