Skip to content

Conversation

tonykipkemboi
Copy link
Member

  • Adds YouSearchTool: wrapper around You.com Search API (GET https://api.ydc-index.io/v1/search).
  • Returns structured web/news results with titles, long snippets, and URLs; ideal for grounding LLM outputs.

@tonykipkemboi tonykipkemboi requested review from lorenzejay and removed request for greysonlalonde September 17, 2025 15:54
def _run(self, query: str, **_: Any) -> str:
api_key = os.environ.get("YOU_API_KEY")
if not api_key:
return "Error: YOU_API_KEY environment variable is required"
Copy link
Contributor

Choose a reason for hiding this comment

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

should we raise error ?

try:
resp = requests.get(self.base_url, headers=headers, params=params, timeout=20)
if resp.status_code >= 300:
return f"You.com Search API error: {resp.status_code} {resp.text[:200]}"
Copy link
Contributor

Choose a reason for hiding this comment

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

same here?

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