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

Various Search Toolkits #285

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

Various Search Toolkits #285

wants to merge 11 commits into from

Conversation

EricGustin
Copy link
Member

@EricGustin EricGustin commented Mar 11, 2025

  1. Add the following tools:
  • Google Finance
    • get_stock_summary
    • get_stock_chart_data
  • Google Flights
    • search_roundtrip_flights
    • search_one_way_flights
  • Google Hotels
    • search_hotels
  1. Add some common helper functions for serpAPI tools.

Copy link

codecov bot commented Mar 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@EricGustin EricGustin marked this pull request as ready for review March 12, 2025 01:16
@EricGustin EricGustin changed the title Google Finance Tools via SerpAPI Google Finance Toolkit Mar 12, 2025
@EricGustin EricGustin changed the title Google Finance Toolkit Various Search Toolkits Mar 12, 2025
Comment on lines 24 to 37
class GoogleFlightsTravelClass(Enum):
ECONOMY = "ECONOMY"
PREMIUM_ECONOMY = "PREMIUM_ECONOMY"
BUSINESS = "BUSINESS"
FIRST = "FIRST"

def to_int(self) -> int:
map_ = {
"ECONOMY": 1,
"PREMIUM_ECONOMY": 2,
"BUSINESS": 3,
"FIRST": 4,
}
return map_[self.value]
Copy link
Member Author

@EricGustin EricGustin Mar 12, 2025

Choose a reason for hiding this comment

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

Since Arcade enum values must be of type string , and also since the enum's values are sent to the LLM, then we need to define LLM readable values. Once the LLM provides the value, we need to convert it to what the SerpAPI endpoint understands, which is an integer.

@EricGustin EricGustin added the toolkit: minor For backward-compatible toolkit features that will result in a minor version increment label Mar 12, 2025
@EricGustin EricGustin requested a review from a team March 12, 2025 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
toolkit: minor For backward-compatible toolkit features that will result in a minor version increment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant