Skip to content

Commit 8461d8f

Browse files
authored
refactor: rename OpenAI bot factories (#104)
1 parent ba8a0de commit 8461d8f

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/git_draft/bots/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def _default_bot() -> Bot:
5252
)
5353

5454
try:
55-
from .openai_api import threads_bot
55+
from .openai_api import new_threads_bot
5656

5757
except ImportError:
5858
raise RuntimeError(
@@ -65,4 +65,4 @@ def _default_bot() -> Bot:
6565
)
6666
)
6767
else:
68-
return threads_bot()
68+
return new_threads_bot()

src/git_draft/bots/openai_api/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
* https://github.com/openai/openai-python/blob/main/src/openai/resources/beta/threads/runs/runs.py
1313
"""
1414

15-
from .assistants import threads_bot
16-
from .completions import completions_bot
15+
from .assistants import new_threads_bot
16+
from .completions import new_completions_bot
1717

1818

1919
__all__ = [
20-
"completions_bot",
21-
"threads_bot",
20+
"new_completions_bot",
21+
"new_threads_bot",
2222
]

src/git_draft/bots/openai_api/assistants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
_logger = logging.getLogger(__name__)
2121

2222

23-
def threads_bot(
23+
def new_threads_bot(
2424
api_key: str | None = None,
2525
base_url: str | None = None,
2626
model: str = "gpt-4o",

src/git_draft/bots/openai_api/completions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from .common import ToolHandler, ToolsFactory, new_client
1212

1313

14-
def completions_bot(
14+
def new_completions_bot(
1515
api_key: str | None = None,
1616
base_url: str | None = None,
1717
model: str = "gpt-4o",

0 commit comments

Comments
 (0)