-
Notifications
You must be signed in to change notification settings - Fork 23
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
base: main
Are you sure you want to change the base?
Conversation
EricGustin
commented
Mar 11, 2025
•
edited
Loading
edited
- 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
- Add some common helper functions for serpAPI tools.
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
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] |
There was a problem hiding this comment.
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.