HitchhikersGuideService

A mock service to simulate interactions with The Hitchhiker's Guide to the Galaxy. This class methods are annotated with @Tool to expose them as tools to the LLM.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun calculateImprobability(event: String, level: Double? = 1.0): String

Calculates the improbability of a given event.

Link copied to clipboard
fun getAnswerToEverything(question: String): String

Retrieves the Answer to the Ultimate Question of Life, the Universe, and Everything.

Link copied to clipboard
fun getBulkGuideEntries(entries: List<String>): Map<String, ImprobabilityReport>

Gets bulk guide entries. Demonstrates List parameter and Map return.

Link copied to clipboard

Gets the status of the Infinite Improbability Drive at given coordinates. Demonstrates Data Class parameter and suspend.

Link copied to clipboard
fun getHistoricalGuideEntry(entryName: String, edition: String): String

Retrieves an entry from The Hitchhiker's Guide to the Galaxy for a specific edition. This demonstrates relying on KDoc for schema extraction rather than @Param.

Link copied to clipboard
fun submitTeaRequest(context: ToolContext, requester: String, status: TeaStatus): String

Submits a request for tea. Demonstrates Context Injection and Enum parameters.