Skip to content

Commit

Permalink
chore(isort): reverse relative imports
Browse files Browse the repository at this point in the history
this aligns better with how the PyCharm auto import sorter works
also I think it looks better
  • Loading branch information
zhudotexe committed Aug 29, 2023
1 parent c6ba410 commit 39066c6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kani/engines/ctransformers/llama2.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from kani.ai_function import AIFunction
from kani.models import ChatMessage, ChatRole
from .. import llama2_prompt
from .base import CTransformersEngine
from .. import llama2_prompt


class LlamaCTransformersEngine(CTransformersEngine):
Expand Down
2 changes: 1 addition & 1 deletion kani/engines/huggingface/llama2.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from kani.ai_function import AIFunction
from kani.exceptions import MissingModelDependencies
from kani.models import ChatMessage, ChatRole
from .base import HuggingEngine
from .. import llama2_prompt
from ..llama2_prompt import B_INST, B_SYS, E_INST, E_SYS
from .base import HuggingEngine

try:
import sentencepiece
Expand Down
2 changes: 1 addition & 1 deletion kani/engines/openai/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import pydantic

from kani.models import ChatMessage
from ..httpclient import BaseClient, HTTPException, HTTPStatusException, HTTPTimeout
from .models import ChatCompletion, Completion, FunctionSpec, SpecificFunctionCall
from ..httpclient import BaseClient, HTTPException, HTTPStatusException, HTTPTimeout


class OpenAIClient(BaseClient):
Expand Down
2 changes: 1 addition & 1 deletion kani/engines/openai/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
from kani.ai_function import AIFunction
from kani.exceptions import MissingModelDependencies
from kani.models import ChatMessage
from ..base import BaseEngine
from . import function_calling
from .client import OpenAIClient
from .models import ChatCompletion, FunctionSpec
from ..base import BaseEngine

try:
import tiktoken
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ skip_gitignore = true
line_length = 120
known_first_party = ["kani"]
no_lines_before = "LOCALFOLDER"
reverse_relative = true

0 comments on commit 39066c6

Please sign in to comment.