Create an Extension with Predefined Type
Extension types
When designing Extensions within Nyra, it becomes evident that implementations for Extensions belonging to the same category often exhibit significant commonalities. For instance, Extensions for platforms like Gemini and OpenAI share a foundational implementation logic while diverging in specific details. To streamline development and enhance efficiency, these shared implementation patterns can be abstracted into a generic Extension type. Developers can then inherit from this type and implement only the methods specific to their use case.
Currently, Nyra supports the following Extension types:
AsyncLLMBaseExtension: Tailored for creating Extensions that interact with large language models, such as those analogous to OpenAI's architecture.AsyncLLMToolBaseExtension: Designed for developing tool-based Extensions for large language models, enabling capabilities through Function Call mechanisms.
This abstraction promotes standardization across Extensions while minimizing redundant development efforts.
To incorporate the abstract base class library within the Nyra project, execute the following command:
tman install system [email protected]Extension behaviour
LLM Extension and LLMTool Extension
In Nyra, any LLMTool Extension can seamlessly integrate with an LLM Extension. Upon initialization, the LLMTool Extension automatically establishes a connection with the LLM Extension.
When the LLM Extension identifies a Function Call, it delegates the request to the connected LLMTool Extension for processing. The LLMTool Extension then executes the required operations and returns the results to the LLM Extension, ensuring efficient and streamlined functionality across the Extensions.
Last updated