Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint #685

Merged
merged 1 commit into from
Dec 15, 2023
Merged

lint #685

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/marvin/components/ai_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ class AIClassifier(
model_config = ConfigDict(arbitrary_types_allowed=True)
fn: Optional[Callable[P, Union[T, Coroutine[Any, Any, T]]]] = None
environment: Optional[BaseEnvironment] = None
prompt: Optional[str] = Field(default=inspect.cleandoc("""
prompt: Optional[str] = Field(
default=inspect.cleandoc(
"""
## Expert Classifier

**Objective**: You are an expert classifier that always chooses correctly.
Expand All @@ -71,7 +73,9 @@ class AIClassifier(
- {{ arg }}: {{ value }}
{% endfor %}
\n\nASSISTANT: The most likely class label for the data and context provided above is Class"
""")) # noqa
"""
)
) # noqa
encoder: Callable[[str], list[int]] = Field(default=None)
max_tokens: int = 1
temperature: float = 0.0
Expand Down Expand Up @@ -198,7 +202,7 @@ def ai_classifier(
)

def decorator(
func: Callable[P, Union[T, Coroutine[Any, Any, T]]]
func: Callable[P, Union[T, Coroutine[Any, Any, T]]],
) -> Callable[P, Union[T, Coroutine[Any, Any, T]]]:
return AIClassifier[P, T].as_decorator(
fn=func,
Expand Down
2 changes: 1 addition & 1 deletion src/marvin/components/ai_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def wrapper(
return wraps(fn)(partial(wrapper, fn))

def decorator(
fn: Callable[P, Any]
fn: Callable[P, Any],
) -> Callable[P, Union["ImagesResponse", Coroutine[Any, Any, "ImagesResponse"]]]:
return wraps(fn)(partial(wrapper, fn))

Expand Down
Loading