Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/docs-referesh-linted' into docs-…
Browse files Browse the repository at this point in the history
…referesh
  • Loading branch information
aaazzam committed Dec 15, 2023
2 parents 2df57b5 + edcb5d8 commit c243df6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
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

0 comments on commit c243df6

Please sign in to comment.