Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
Signed-off-by: Xinyao Wang <[email protected]>
  • Loading branch information
XinyaoWa committed Dec 13, 2024
1 parent d6764a5 commit 4f3b18c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
8 changes: 0 additions & 8 deletions comps/llms/text-generation/vllm/langchain/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,8 @@ async def stream_generator():
chat_completion = client.completions.create(
model=model_name,
prompt=prompt,
best_of=input.best_of,
echo=input.echo,
frequency_penalty=input.frequency_penalty,
logit_bias=input.logit_bias,
logprobs=input.logprobs,
max_tokens=input.max_tokens,
n=input.n,
presence_penalty=input.presence_penalty,
Expand Down Expand Up @@ -261,9 +258,6 @@ async def stream_generator():
model=model_name,
messages=input.messages,
frequency_penalty=input.frequency_penalty,
logit_bias=input.logit_bias,
logprobs=input.logprobs,
top_logprobs=input.top_logprobs,
max_tokens=input.max_tokens,
n=input.n,
presence_penalty=input.presence_penalty,
Expand All @@ -275,8 +269,6 @@ async def stream_generator():
stream_options=input.stream_options,
temperature=input.temperature,
top_p=input.top_p,
tools=input.tools,
parallel_tool_calls=input.parallel_tool_calls,
user=input.user,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,18 @@ function validate_microservice() {
docker logs test-comps-vllm-microservice
exit 1
fi
result=$(http_proxy="" curl http://${ip_address}:5030/v1/chat/completions \
-X POST \
-d '{"model": "Intel/neural-chat-7b-v3-3", "messages": "What is Deep Learning?", "max_tokens":17, "stream":false}' \
-H 'Content-Type: application/json')
if [[ $result == *"content"* ]]; then
echo "Result correct."
else
echo "Result wrong. Received was $result"
docker logs test-comps-vllm-service
docker logs test-comps-vllm-microservice
exit 1
fi
}

function stop_docker() {
Expand Down

0 comments on commit 4f3b18c

Please sign in to comment.