Member-only story
New Version of Hosp-AI is Released : Supports TOOLS
Java Library to use multiple LLM providers effectively
If you haven’t heard of this library before, here is a short introduction.
Hosp-AI is a Java based open-source library designed for quick prototyping with LLMs, and fully compatible with production-ready frameworks like Spring Boot.
Checkout the code on Github — https://github.com/r7b7/hosp-ai
As with the previous releases, new features are added by keeping simplicity and ease-of-use in mind.
The main idea is to give developers a hassle-free experience while experimenting with multiple platforms and models. Write a prompt once and run it across various platforms.
Sample Code
From the previous releases, we know how to use PromptBuilder for complex prompts.
In this release, we introduce one new class —
- ToolFunction
We can add instances of this class to PromptBuilder to add as many tools as the LLM permits.
Construct an instance of ToolFunction by passing function name, description and parameters in the constructor.