Skip to content
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

Update agent #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Update agent #3

wants to merge 2 commits into from

Conversation

rlancemartin
Copy link
Contributor

  1. Tavily async client + scraping
  2. Consolidate research into a single step

@rlancemartin rlancemartin changed the title Update agent: Update agent Nov 26, 2024
@rlancemartin rlancemartin requested a review from vbarda November 26, 2024 18:26
Copy link

@vbarda vbarda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! will make a new repo for companies agent

search_docs = await asyncio.gather(*search_tasks)

# Deduplicate and format sources
source_str = deduplicate_and_format_sources(search_docs, max_tokens_per_source=1000, include_raw_content=True)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably not needed for v0, but also would be great to propagate sources for each extracted datapoint

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps can be just included in the extraction schema...

)

# Execute all searches concurrently
search_docs = await asyncio.gather(*search_tasks)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

query_list = [query.search_query for query in results.queries]
search_tasks = []
for query in query_list:
search_tasks.append(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only downside is that it's harder to switch to a different search tool that doesn't return raw content, but this is fine for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants