Allow send list of str for the Prompt on openai demo endpoint /v1/completions (#323)

* allow str or List[str] for prompt

* Update vllm/entrypoints/openai/api_server.py

Co-authored-by: Zhuohan Li <zhuohan123@gmail.com>

---------

Co-authored-by: Zhuohan Li <zhuohan123@gmail.com>
This commit is contained in:
Michele Catalano
2023-07-03 09:17:50 -07:00
committed by GitHub
co-authored by Zhuohan Li
parent 49b26e2cec
commit 0bd2a573a5
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ class ChatCompletionRequest(BaseModel):
class CompletionRequest(BaseModel):
model: str
prompt: str
prompt: Union[str, List[str]]
suffix: Optional[str] = None
max_tokens: Optional[int] = 16
temperature: Optional[float] = 1.0