主题
| Provider | Module | Questions (yes/no, choice, scale) | Async (decideAsync) | Input | Probabilities and confidence | Refusals | Observability | Customizable HTTP Client | Local Deployment | Spring Boot |
|---|---|---|---|---|---|---|---|---|---|---|
| Ollama | langchain4j-ollama | ✅/✅/✅ | ✅ | text, structured, image | ✅ | ❌ | ✅ | ✅ | ✅ | 🆘 |
| OpenAI | langchain4j-open-ai | ✅/✅/✅ | ✅ | text, structured, image | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
| OpenAI Official | langchain4j-open-ai-official | ✅/✅/✅ | ✅ | text, structured, image | ✅ | ✅ | ✅ | ❌ | ✅ | |
| TypeSafe | langchain4j-typesafe | ✅/✅/✅ | ✅ | text, structured | ✅ | ❌ | ✅ | ✅ | ✅ (any server implementing the System One API, see here) | 🆘 |
图例:
- ✅ 表示“已支持”
- 🆘 表示“尚未支持,欢迎帮助我们实现”
- ❌ 表示“提供者不支持”
- 无标记表示“不适用”(OpenAI Official 使用官方 OpenAI SDK 的 HTTP 客户端,可通过
openAIClient(...)配置)
请注意:
- “structured(结构化)”输入是一个由命名值组成的
Map。OpenAI 以文本形式发送它,TypeSafe 和 Ollama 则以 JSON 对象发送。 - 在 Ollama 上处理图像需要一个具备视觉能力的模型,例如 Clef。
- 每种实现都会上报词元用量。OpenAI 还会额外上报缓存的输入词元。