This module provides an abstraction layer for managing resources related to
large language model (LLM) interactions within the Kdeps system.
It defines the ResourceChat class, which encapsulates the metadata and responses
related to LLM model interactions. The class allows for managing prompts, responses,
file generations, image generation flags, and the handling of JSON responses.
Key functionalities include:
Managing a collection of resources that represent LLM interactions through a mapping of unique
resource actionIDs to ResourceChat objects.
Providing methods to retrieve various pieces of information related to the LLM interaction,
such as the prompt text, response text, file paths, JSON keys, and whether image generation was
involved.
Returns the relative, descendent directory path between this module and other.
Throws if no such path exists.
For example, if module mod1 has path /dir1/mod1.pkl, and module mod2 has path /dir1/dir2/dir3/mod2.pkl,
then mod1.relativePathTo(mod2) will return List("dir2", "dir3").
A common use case is to compute the directory path between a template located at the root of a hierarchy
(say rootModule.pkl) and the currently evaluated module (accessible via the module keyword):
Retrieves the file path containing the LLM response associated with the specified resource actionID.
actionID: The actionID of the resource to retrieve the response for.
Returns the decoded content if the file is Base64-encoded; otherwise, returns the file content as-is.
Abstractions for Kdeps LLM Resource