This module contains the core implementation classes and interfaces of Acorn. This base module is used by framework specific modules and can be used as the basis for specific implementations for frameworks or LLMs.
Specific implementation that utilize this module need to implement two things:
- An implementation of
APIExecutorfor executing GraphQL queries - Passing the generated
APIFunctionto the LLM and validating/executing them when invoked by the LLM. This usually requires a thin wrapper based on the LLM framework or SDK used.
This module consists of the following packages:
- Tool: Defines the
APIFunctionclass which represents and LLM tool and how it maps to GraphQL API queries. Also definesContextfor sensitive information sandboxing. - Converter: Converts a provided GraphQL schema or individual GraphQL operations to
APIFunction. - API: Interfaces and methods for API invocation.
- Chat: Saving and retrieving messages from GraphQL API.
- Util: Utility classes/methods used across packages.