From 4f3b18c3b3392dbb8e7c87a17eeef5928c6229d3 Mon Sep 17 00:00:00 2001 From: Xinyao Wang Date: Fri, 13 Dec 2024 13:49:21 +0800 Subject: [PATCH] fix bug Signed-off-by: Xinyao Wang --- comps/llms/text-generation/vllm/langchain/llm.py | 8 -------- ...ms_text-generation_vllm_langchain_on_intel_hpu.sh | 12 ++++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/comps/llms/text-generation/vllm/langchain/llm.py b/comps/llms/text-generation/vllm/langchain/llm.py index ee21fe146..19c16b8ea 100644 --- a/comps/llms/text-generation/vllm/langchain/llm.py +++ b/comps/llms/text-generation/vllm/langchain/llm.py @@ -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, @@ -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, @@ -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, ) diff --git a/tests/llms/test_llms_text-generation_vllm_langchain_on_intel_hpu.sh b/tests/llms/test_llms_text-generation_vllm_langchain_on_intel_hpu.sh index 88435054e..da75ad624 100644 --- a/tests/llms/test_llms_text-generation_vllm_langchain_on_intel_hpu.sh +++ b/tests/llms/test_llms_text-generation_vllm_langchain_on_intel_hpu.sh @@ -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() {