Skip to content

You.com PraisonAI Integration

export YDC_API_KEY=xxxxxxxxxxxx
tools.py
from langchain_community.utilities.you import YouSearchAPIWrapper
class YouSearchTool(BaseTool):
    name: str = "You Search Tool"
    description: str = "Search You.com for relevant information based on a query."

    def _run(self, query: str):
        api_wrapper = YouSearchAPIWrapper()
        results = api_wrapper.results(query=query, max_results=5)
        return results

agents.yaml

framework: crewai
topic: research about the causes of lung disease
roles:
  research_analyst:
    backstory: Experienced in analyzing scientific data related to respiratory health.
    goal: Analyze data on lung diseases
    role: Research Analyst
    tasks:
      data_analysis:
        description: Gather and analyze data on the causes and risk factors of lung
          diseases.
        expected_output: Report detailing key findings on lung disease causes.
    tools:
    - 'YouSearchTool'