Skip to content

Please confirm if it is a bug,Springai encountered an error while calling VLLM #3775

Open
@coding-guo

Description

@coding-guo

Bug description
Springai encountered an error while calling VLLM

org.springframework.ai.retry.NonTransientAiException: HTTP 400 - {"object":"error","message":"[{'type': 'missing', 'loc': ('body',), 'msg': 'Field required', 'input': None}]","type":"Bad Request","param":null,"code":400}

Environment
vllm version 0.9.2
spring-ai-starter-model-openai 1.0.0

spring.ai.openai.api-key=test
spring.ai.openai.base-url=http://xxx:8000
spring.ai.openai.chat.options.model=Qwen1.5-1.8B-Chat

Minimal Complete Reproducible example
@GetMapping("/ai/generate")
public Map<String,String> generate(@RequestParam(value = "message", defaultValue = "Tell me a joke") String message) {
System.out.printf("Generating a message for %s\n", message);
return Map.of("generation", this.chatModel.call(message));
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions