Skip to content

Commit

Permalink
Merge pull request #167 from athina-ai/add-highlights-in-search
Browse files Browse the repository at this point in the history
Add highlights in search
  • Loading branch information
vivek-athina authored Feb 1, 2025
2 parents 8db5c7b + 3547223 commit 55bb93e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions athina/steps/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Search(Step):
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.
highlights: Text snippets the LLM identifies as most relevant from each page.
x_api_key: The API key to use for the request.
"""

Expand All @@ -47,6 +48,7 @@ class Search(Step):
endPublishedDate: Optional[str] = None
startCrawlDate: Optional[str] = None
endCrawlDate: Optional[str] = None
highlights: Optional[Dict[str, Any]] = None

x_api_key: str
env: Environment = None
Expand Down Expand Up @@ -87,6 +89,7 @@ def execute(self, input_data: Any) -> Union[Dict[str, Any], None]:
"contents": {
"highlights": {
"query": self.query,
**(self.highlights or {}) # Merging self.highlights if it exists, otherwise an empty dict
},
"summary": {"query": self.query},
},
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.10"
version = "1.7.11"
description = "Python SDK to configure and run evaluations for your LLM-based application"
authors = ["Shiv Sakhuja <[email protected]>", "Akshat Gupta <[email protected]>", "Vivek Aditya <[email protected]>", "Akhil Bisht <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 55bb93e

Please sign in to comment.