Skip to content

Commit faa3799

Browse files
committed
Separate built in providers and abstract hierarchy
1 parent 347c4d8 commit faa3799

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ classifiers = [
2525
]
2626

2727
[tool.setuptools]
28-
packages = ["shelloracle", "shelloracle.config", "shelloracle.provider"]
28+
packages = ["shelloracle", "shelloracle.config", "shelloracle.providers"]
2929

3030
[project.scripts]
3131
shor = "shelloracle.shelloracle:cli"

shelloracle/config/setting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from . import config
66

77
if TYPE_CHECKING:
8-
from ..provider import Provider
8+
from ..providers import Provider
99

1010
T = TypeVar("T")
1111

shelloracle/provider/__init__.py renamed to shelloracle/provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def get_provider(name: str) -> type[Provider]:
3434
:param name: the provider name
3535
:return: the requested provider
3636
"""
37-
from .ollama import Ollama
37+
from .providers import Ollama
3838
providers = {
3939
"Ollama": Ollama
4040
}

shelloracle/providers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .ollama import Ollama

shelloracle/provider/ollama.py renamed to shelloracle/providers/ollama.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import httpx
77

8-
from . import Provider, ProviderError
8+
from ..provider import Provider, ProviderError
99
from ..config import Setting
1010

1111

@@ -66,7 +66,7 @@ class Ollama(Provider):
6666
)
6767

6868
@property
69-
def endpoint(self):
69+
def endpoint(self) -> str:
7070
# computed property because python descriptors need to be bound to an instance before access
7171
return f"http://{self.host}:{self.port}/api/generate"
7272

0 commit comments

Comments
 (0)