-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to use the ArXiv API instead of perplexity? #23
Comments
I've added EXA as a search API, and arXiv and PubMed as separate tools. It's super easy to integrate. Here's the arXiv tool documentation: Make sure that the response is formatted in the structure expected by Below is an example from my implementation: configuration.py ...
class SearchAPI(Enum):
PERPLEXITY = "perplexity"
TAVILY = "tavily"
EXA = "exa"
... graph.py This logic appears in multiple places: ...
# Search the web
if search_api == "tavily":
search_results = await tavily_search_async(query_list)
source_str = deduplicate_and_format_sources(search_results, max_tokens_per_source=1000, include_raw_content=False)
elif search_api == "perplexity":
search_results = perplexity_search(query_list)
source_str = deduplicate_and_format_sources(search_results, max_tokens_per_source=1000, include_raw_content=False)
elif search_api == "exa":
search_results = await exa_search(query_list)
source_str = deduplicate_and_format_sources(search_results, max_tokens_per_source=1000, include_raw_content=False) In your """
...
Args:
search_queries (List[SearchQuery]): List of search queries to process
Returns:
List[dict]: List of search responses from the Perplexity API, one per query. Each response should have the format:
{
'query': str, # The original search query
'follow_up_questions': None,
'answer': None,
'images': list,
'results': [ # List of search results
{
'title': str, # Title of the search result
'url': str, # URL of the result
'content': str, # Summary/snippet of the content
'score': float, # Relevance score
'raw_content': str|None # Full content or None for secondary citations
},
...
]
}
...
"""
# Your search logic Let me know if you need any help. |
In the "search_api" configuration is it possible to use ArXiv to retrieve scientific papers and use that information instead of a regular web search?
The text was updated successfully, but these errors were encountered: