Skip to content

Commit

Permalink
chore: Remove unused import statements
Browse files Browse the repository at this point in the history
The commit removes unused import statements in the `chat.py`, `openai.py`, and `pipeline.py` files to improve code cleanliness and reduce potential confusion.
  • Loading branch information
yangbobo2021 committed Jun 18, 2024
1 parent c4f1971 commit 7f2fc27
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
2 changes: 0 additions & 2 deletions devchat/llm/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import sys
from functools import wraps

import openai

from devchat.memory import ChatMemory

from .openai import (
Expand Down
9 changes: 2 additions & 7 deletions devchat/llm/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,7 @@ def chat_completion_no_stream_return_json(messages: List[Dict], llm_config: Dict
),
times=3,
),
lambda err: {
"content": None,
"function_name": None,
"parameters": "",
"error": err
},
lambda err: {"content": None, "function_name": None, "parameters": "", "error": err},
)

chat_call_completion_stream = exception_handle(
Expand All @@ -212,6 +207,6 @@ def chat_completion_no_stream_return_json(messages: List[Dict], llm_config: Dict
"function_name": None,
"parameters": "",
"tool_calls": [],
"error": err
"error": err,
},
)
2 changes: 0 additions & 2 deletions devchat/llm/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import time
from typing import Dict

import openai

from devchat.ide import IDEService


Expand Down
3 changes: 1 addition & 2 deletions devchat/openai/http_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ def stream_request(api_key, api_base, data):
connection.set_tunnel(url)
else:
connection = http.client.HTTPSConnection(
url,
context=ssl._create_unverified_context()
url, context=ssl._create_unverified_context()
)
else:
if proxy_setting["host"]:
Expand Down

0 comments on commit 7f2fc27

Please sign in to comment.