Open zzllkk2003 opened 1 week ago
For the first one, it supports Qwen. For the second one, it does not yet support ollama's function call.
For the first one, it supports Qwen. For the second one, it does not yet support ollama's function call.
Which Maven package can I use?
Spring AI supports Ollama, so you just have to use the Ollama starter package.
spring-ai-ollama-spring-boot-starter
support function calling?Spring AI does [1][2][3], but Ollama doesn't officially support function calling yet [4][5], so naturally spring-ai-ollama-spring-boot-starter
doesn't have it baked-in. By the way, neither vLLM nor SGLang do either [6].
You might want to take a look at LangChain4j [8][9].
[1] https://github.com/spring-projects/spring-ai/discussions/193 [2] https://www.devturtleblog.com/sring-ai-function-calling-tutorial/ [3] https://spring.io/blog/2024/03/06/function-calling-in-java-and-spring-ai-using-the-latest-mistral-ai-api
[4] https://github.com/QwenLM/Qwen2/issues/378 (https://github.com/QwenLM/Qwen2/issues/378#issuecomment-2097355347) [5] https://github.com/ollama/ollama/issues/3137
[6] https://github.com/QwenLM/Qwen2/blob/d439e04e84ebe3734dea4e9769e17f380a8c72b8/README.md?plain=1#L192 [7] https://docs.langchain4j.dev/tutorials/tools#:~:text=following%20models%20have%20tool%20support
[8] https://docs.langchain4j.dev/tutorials/tools/#:~:text=following%20models%20have%20tool%20support [9] https://docs.langchain4j.dev/tutorials/spring-boot-integration/#langchain4j-spring-boot-starter
Can Spring AI support the Qwen large language model? And can spring-ai-ollama-spring-boot-starter support function calling?