command/bin/bash -lc "sed -n '1,260p' backend/sensei_search/tools/search/bing.py"
exit code 0
Output: from __future__ import annotations import asyncio import os from typing import Any, Callable, Coroutine, Dict, List, TypeVar from aiohttp import ClientSession from sensei_search.config import BING_API_KEY from sensei_search.logger import logger from sensei_search.tools.search.base import ( Category, GeneralResult, ImageResult, Input, SearchTool, TopResults, VideoResult, filter_medium_by_accessibility, ) MAX_RESULTS = 5 T = TypeVar("T", GeneralResult, ImageResult, VideoResult) class Bing(SearchTool): @staticmethod async def search(args: Input) -> TopResults: """ A search engine tool. Useful when you need to answer questions about nouns, current events or the current state of the world. To use the tool, you need to pass in parameters described by the OpenAPI spec. """ logger.info("Searching with bing") logger.debug(f"Calling bing with args: {args}") query, categories = args.query, args.cat