Skip to content

Commit e697aae

Browse files
committed
Black formatting
1 parent d80e7be commit e697aae

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

app/backend/approaches/chatreadretrieveread.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,7 @@ async def keyword_rewrite(rendered_prompt, tools):
216216
else {"model": self.chatgpt_model}
217217
),
218218
),
219-
ThoughtStep(
220-
"Bing search query",
221-
bing_query_text if use_bing_search else None,
222-
{
223-
}
224-
),
219+
ThoughtStep("Bing search query", bing_query_text if use_bing_search else None, {}),
225220
ThoughtStep(
226221
"Bing search results",
227222
[result.snippet for result in bing_results.value[:2]] if use_bing_search else None,

app/backend/bing_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class WebPage(BaseModel):
2121

2222
# There are more fields in the response, but we only care about these for now.
2323
model_config = ConfigDict(
24-
extra='allow',
24+
extra="allow",
2525
)
2626

2727

@@ -32,7 +32,7 @@ class WebAnswer(BaseModel):
3232

3333
# There are more fields in the response, but we only care about these for now.
3434
model_config = ConfigDict(
35-
extra='allow',
35+
extra="allow",
3636
)
3737

3838

@@ -45,7 +45,7 @@ def __init__(self, api_key: str, bing_endpoint: Optional[str] = "api.bing.micros
4545
"User-Agent": "azure-search-openai-demo",
4646
# "X-Search-Location": "" # this would be useful in future
4747
}
48-
48+
4949
async def search(self, query: str) -> WebAnswer:
5050
params = {
5151
"q": query,
@@ -55,4 +55,4 @@ async def search(self, query: str) -> WebAnswer:
5555
async with httpx.AsyncClient() as client:
5656
response = await client.get(self.base_url, headers=self.headers, params=params)
5757
response.raise_for_status()
58-
return WebAnswer.model_validate(response.json()['webPages'])
58+
return WebAnswer.model_validate(response.json()["webPages"])

0 commit comments

Comments
 (0)