Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Conversation

@tonykipkemboi
Copy link
Contributor

  • 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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants