Skip to content

Commit

Permalink
Ruff and mypy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Oct 28, 2024
1 parent 156ad55 commit f6093f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions llm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"get_model",
"get_key",
"user_dir",
"Attachment",
"Collection",
"Conversation",
"Model",
Expand Down
14 changes: 7 additions & 7 deletions llm/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ def from_row(cls, row):
class Prompt:
prompt: str
model: "Model"
attachments: Optional[List[Attachment]] = field(default_factory=list)
system: Optional[str] = None
prompt_json: Optional[str] = None
options: "Options" = field(default_factory=dict)
attachments: Optional[List[Attachment]]
system: Optional[str]
prompt_json: Optional[str]
options: "Options"

def __init__(
self,
Expand Down Expand Up @@ -115,7 +115,7 @@ def prompt(
self,
prompt: Optional[str],
*,
attachments: Attachment = None,
attachments: Optional[List[Attachment]] = None,
system: Optional[str] = None,
stream: bool = True,
**options
Expand Down Expand Up @@ -371,7 +371,7 @@ class Model(ABC, _get_key_mixin):

# Model characteristics
can_stream: bool = False
attachment_types = set()
attachment_types: Set = set()

class Options(_Options):
pass
Expand All @@ -397,7 +397,7 @@ def prompt(
self,
prompt: str,
*,
attachments: Attachment = None,
attachments: Optional[List[Attachment]] = None,
system: Optional[str] = None,
stream: bool = True,
**options
Expand Down

0 comments on commit f6093f8

Please sign in to comment.