LangChain4j 1.21.0 发布:引入实验性 Decision Models
原标题:1.21.0 and 1.21.0-beta31
AI 摘要
LangChain4j 发布 1.21.0 与 1.21.0-beta31 版本,引入实验性的 Decision Models 新模型类型,用带类型和概率的答案替代生成文本,适用于分类、路由、门控和评分。该版本提供 DecisionModel API、Decision Services、RoutingChatModel 等现成集成,以及基于决策模型的 agentic 路由模式 DecisionRouterPlanner。此外还包含工具错误处理、jitLLM 集成、OpenAI Batch API 支持及多项 MCP、Milvus、Gemini 相关修复。
正文节选
## Decision Models (experimental) This release introduces **decision models**: a new model type that answers questions about an input with typed answers and probabilities instead of generated text. They are a fast, cheap fit for classification, routing, gating and grading. - **`DecisionModel` API** (#6469, #6543): ask yes/no, choice and scale questions in a single call and get the probability of each answer back. The first integration is [TypeSafe](https://docs.langchain4j.dev/integrations