Skip to content

Commit

Permalink
More minor import cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nicovank committed Feb 5, 2024
1 parent 42979d8 commit 6d1bcde
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/llm_utils/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
ChatCompletionSystemMessageParam,
ChatCompletionUserMessageParam,
)
import requests as req
import re
import requests

T = TypeVar("T")
from llm_utils.utils import contains_valid_json, extract_code_blocks
Expand Down Expand Up @@ -217,7 +216,9 @@ def get_inference(cls, payload: Dict[Any, Any]) -> Any:
prepped = request.prepare()

# Send the HTTP POST request to the prepared URL with the specified headers & JSON-formatted request body, storing the response
response = req.post(prepped.url, headers=prepped.headers, data=request_body)
response = requests.post(
prepped.url, headers=prepped.headers, data=request_body
)

if response.status_code == 200:
return response.json()
Expand Down

0 comments on commit 6d1bcde

Please sign in to comment.