-
Notifications
You must be signed in to change notification settings - Fork 220
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
Add type overloads to methods #181
Conversation
ollama/_client.py
Outdated
system: str = '', | ||
template: str = '', | ||
context: Optional[Sequence[int]] = None, | ||
stream: bool = False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorrect since it creates an overlap between the two overloads
stream: bool = False, | |
stream: Literal[False] = False, |
ollama/_client.py
Outdated
system: str = '', | ||
template: str = '', | ||
context: Optional[Sequence[int]] = None, | ||
stream: bool = True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stream: bool = True, | |
stream: Literal[True] = True, |
ollama/_client.py
Outdated
self, | ||
model: str = '', | ||
messages: Optional[Sequence[Message]] = None, | ||
stream: Literal[False] = False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stream: Literal[False] = False, | |
stream: bool = False, |
images: Optional[Sequence[AnyStr]] = None, | ||
options: Optional[Options] = None, | ||
keep_alive: Optional[Union[float, str]] = None, | ||
) -> Mapping[str, Any]: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is minor but it'd be better if ...
was on a newline. it's easier to read and harder to miss
poetry doesn't let me move the ellipsis to a new line, lmk and I can just revert and merge |
ok let's go with the previous, inline style :( |
In reference to #132