From 29515e934e60a8824544346387816f7c79796f87 Mon Sep 17 00:00:00 2001 From: better629 Date: Thu, 28 Mar 2024 22:10:05 +0800 Subject: [PATCH] fix format --- metagpt/tools/search_engine_bing.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/metagpt/tools/search_engine_bing.py b/metagpt/tools/search_engine_bing.py index 4ca9ce32d..0bc5b5d13 100644 --- a/metagpt/tools/search_engine_bing.py +++ b/metagpt/tools/search_engine_bing.py @@ -7,7 +7,6 @@ import warnings from typing import Optional import aiohttp - from pydantic import BaseModel, ConfigDict, model_validator @@ -32,11 +31,11 @@ class BingAPIWrapper(BaseModel): return {"Ocp-Apim-Subscription-Key": self.api_key} async def run( - self, - query: str, - max_results: int = 8, - as_string: bool = True, - focus: list[str] | None = None, + self, + query: str, + max_results: int = 8, + as_string: bool = True, + focus: list[str] | None = None, ) -> str | list[dict]: """Return the results of a Google search using the official Bing API. @@ -76,8 +75,9 @@ class BingAPIWrapper(BaseModel): response.raise_for_status() res = await response.json() else: - async with self.aiosession.get(self.bing_url, params=params, headers=self.header, - proxy=self.proxy) as response: + async with self.aiosession.get( + self.bing_url, params=params, headers=self.header, proxy=self.proxy + ) as response: response.raise_for_status() res = await response.json()