Skip to content

Commit

Permalink
docs: update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
winstxnhdw committed Feb 16, 2025
1 parent 38570ab commit 2c28423
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/examplify/features/chat/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ class ChatModel:
set_static_prompt(static_user_prompt: str, static_assistant_prompt: str) -> int
set the model's static prompt
query(messages: Sequence[Message]) -> Message | None
query(messages: list[Message]) -> Iterator[str] | None
query the model
generate(tokens_list: Sequence[list[str]]) -> Awaitable[str]
generate(tokens: ListOrTuple[str]) -> Iterator[str]
generate text from a series/single prompt(s)
"""

Expand Down Expand Up @@ -69,7 +69,7 @@ def encode_messages(self, messages: ListOrTuple[Message]) -> list[str]:
Parameters
----------
messages (list[Message]) : the messages to encode
messages (ListOrTuple[Message]) : the messages to encode
Returns
-------
Expand Down Expand Up @@ -116,15 +116,15 @@ def set_static_prompt(self, static_user_prompt: str, static_assistant_prompt: st

return True

def query(self, messages: list[Message]) -> Iterator[str] | None:
def query(self, messages: ListOrTuple[Message]) -> Iterator[str] | None:
"""
Summary
-------
query the model
Parameters
----------
messages (list[Message]) : the messages to query the model with
messages (ListOrTuple[Message]) : the messages to query the model with
Returns
-------
Expand Down Expand Up @@ -175,7 +175,7 @@ def get_chat_model() -> ChatModel:
Returns
-------
model (Chat) : the language model
model (ChatModel) : the language model
"""
model_path = huggingface_download('winstxnhdw/openchat-3.6-ct2-int8')
tokeniser = LlamaTokenizerFast.from_pretrained(model_path, local_files_only=True, legacy=False)
Expand Down

0 comments on commit 2c28423

Please sign in to comment.