当前位置:   article > 正文

大模型实战-【Langchain4J中Using AI Services in Spring Boot Application①】_springboot整合langchain4j

springboot整合langchain4j

AI Services

So far, we have been covering low-level components like ChatLanguageModel, ChatMessage, ChatMemory, etc.
Working at this level is very flexible and gives you total freedom, but it also forces you to write a lot of boilerplate code.
Since LLM-powered applications usually require not just a single component but multiple components working together
(e.g., prompt templates, chat memory, LLMs, output parsers, RAG components: embedding models and stores)
and often involve multiple interactions, orchestrating them all becomes even more cumbersome.

We want you to focus on business logic, not on low-level implementation details.
Thus, there are currently two high-level concepts in LangChain4j that can help with that: AI Services and Chains.

Chains (legacy)

The concept of Chains originates from Python’s LangChain (before the introduction of LCEL).
The idea is to have a Chain for each common use case, like a chatbot, RAG, etc.
Chains combine multiple low-level components and orchestrate interactions between them.
The main problem with them is that they are too rigid if you need to customize something.
LangChain4j ha

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号