Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
2c7fa471
Unverified
Commit
2c7fa471
authored
Jul 14, 2025
by
Reid
Committed by
GitHub
Jul 14, 2025
Browse files
Fix: Add missing EOFError handling in CLI complete command (#20896)
Signed-off-by:
reidliu41
<
reid201711@gmail.com
>
parent
88fc8a97
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
vllm/entrypoints/cli/openai.py
vllm/entrypoints/cli/openai.py
+6
-3
No files found.
vllm/entrypoints/cli/openai.py
View file @
2c7fa471
...
...
@@ -55,7 +55,7 @@ def chat(system_prompt: str | None, model_name: str, client: OpenAI) -> None:
try
:
input_message
=
input
(
"> "
)
except
EOFError
:
re
turn
b
re
ak
conversation
.
append
({
"role"
:
"user"
,
"content"
:
input_message
})
chat_completion
=
client
.
chat
.
completions
.
create
(
model
=
model_name
,
...
...
@@ -118,7 +118,7 @@ class ChatCommand(CLISubcommand):
try
:
input_message
=
input
(
"> "
)
except
EOFError
:
re
turn
b
re
ak
conversation
.
append
({
"role"
:
"user"
,
"content"
:
input_message
})
chat_completion
=
client
.
chat
.
completions
.
create
(
...
...
@@ -170,7 +170,10 @@ class CompleteCommand(CLISubcommand):
print
(
"Please enter prompt to complete:"
)
while
True
:
try
:
input_prompt
=
input
(
"> "
)
except
EOFError
:
break
completion
=
client
.
completions
.
create
(
model
=
model_name
,
prompt
=
input_prompt
)
output
=
completion
.
choices
[
0
].
text
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment