Skip to content

Commit 6546299

Browse files
committed
🐛 fix missing class property
1 parent 88b7113 commit 6546299

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

mindee/input/base_parameters.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
class BaseParameters(ABC):
1010
"""Base class for parameters accepted by all V2 endpoints."""
1111

12-
_slug: str = field(init=False)
13-
"""Slug of the endpoint."""
14-
1512
model_id: str
1613
"""ID of the model, required."""
1714
alias: Optional[str] = None
@@ -23,6 +20,9 @@ class BaseParameters(ABC):
2320
close_file: bool = True
2421
"""Whether to close the file after product."""
2522

23+
_slug: str = field(init=False)
24+
"""Slug of the endpoint."""
25+
2626
def get_form_data(self) -> Dict[str, Union[str, List[str]]]:
2727
"""
2828
Return the parameters as a config dictionary.

mindee/input/inference_parameters.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import json
2-
from dataclasses import dataclass, asdict, field
2+
from dataclasses import dataclass, asdict
33
from typing import Dict, List, Optional, Union
44

55
from mindee.input.base_parameters import BaseParameters
@@ -81,9 +81,6 @@ def __post_init__(self) -> None:
8181
class InferenceParameters(BaseParameters):
8282
"""Inference parameters to set when sending a file."""
8383

84-
_slug: str = field(init=False, default="inferences")
85-
"""Slug of the endpoint."""
86-
8784
rag: Optional[bool] = None
8885
"""Enhance extraction accuracy with Retrieval-Augmented Generation."""
8986
raw_text: Optional[bool] = None
@@ -106,6 +103,9 @@ class InferenceParameters(BaseParameters):
106103
Not recommended, for specific use only.
107104
"""
108105

106+
_slug: str = "inferences"
107+
"""Slug of the endpoint."""
108+
109109
def __post_init__(self):
110110
if isinstance(self.data_schema, str):
111111
self.data_schema = DataSchema(**json.loads(self.data_schema))

0 commit comments

Comments
 (0)