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

Fix args type in docstring #2888

Merged
merged 3 commits into from
Dec 13, 2024
Merged
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
21 changes: 12 additions & 9 deletions lmdeploy/serve/async_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,10 @@ def __call__(self,
"""Inference a batch of prompts.

Args:
prompts (List[str] | str | List[Dict] | List[Dict]): a batch of
prompts. It accepts: string prompt, a list of string prompts,
a chat history in OpenAI format or a list of chat history.
prompts (List[str] | str | List[Dict] | List[List[Dict]]]): a
batch of prompts. It accepts: string prompt, a list of string
prompts, a chat history in OpenAI format or a list of chat
history.
gen_config (GenerationConfig | None): a instance of
GenerationConfig. Default to None.
do_preprocess (bool): whether pre-process the messages. Default to
Expand Down Expand Up @@ -297,9 +298,10 @@ def batch_infer(self,
"""Inference a batch of prompts.

Args:
prompts (List[str] | str | List[Dict] | List[Dict]): a batch of
prompts. It accepts: string prompt, a list of string prompts,
a chat history in OpenAI format or a list of chat history.
prompts (List[str] | str | List[Dict] | List[List[Dict]]]): a
batch of prompts. It accepts: string prompt, a list of string
prompts, a chat history in OpenAI format or a list of chat
history.
gen_config (GenerationConfig | None): a instance of or a list of
GenerationConfig. Default to None.
do_preprocess (bool): whether pre-process the messages. Default to
Expand Down Expand Up @@ -374,9 +376,10 @@ def stream_infer(
"""Inference a batch of prompts with stream mode.

Args:
prompts (List[str] | str | List[Dict] | List[Dict]): a batch of
prompts. It accepts: string prompt, a list of string prompts,
a chat history in OpenAI format or a list of chat history.
prompts (List[str] | str | List[Dict] | List[List[Dict]]]):a
batch of prompts. It accepts: string prompt, a list of string
prompts, a chat history in OpenAI format or a list of chat
history.
gen_config (GenerationConfig | None): a instance of or a list of
GenerationConfig. Default to None.
do_preprocess (bool): whether pre-process the messages. Default to
Expand Down
Loading