Core functionality for FridonAI
Project description
FridonAI Core
FridonAI Core is the foundational package for building AI-driven chatbot platforms, specifically designed for the crypto world. It provides a modular and extensible architecture for creating powerful, domain-specific AI assistants.
Features
- Modular Plugin Architecture: Easily extend functionality through a well-structured plugin system.
- Dynamic Request Routing: Efficiently navigate user requests to relevant plugins.
- Blockchain Utilities: Built-in support for blockchain-related operations.
Installation
Install the package using pip:
pip install fridonai-core
Usage
Here's a basic example of how to use FridonAI Core components:
from fridonai_core.plugins import BasePlugin, BaseToolInput
from fridonai_core.plugins.utilities import BaseUtility
from fridonai_core.plugins.tools import BaseTool
from fridonai_core.graph import generate_response
class TestUtility(BaseUtility):
async def arun(self, *args, **kwargs) -> str:
return "You are the Superman!"
class TestToolInput(BaseToolInput):
pass
TestTool = BaseTool(
name="test-tool",
description="Use this tool to answer any questions.",
args_schema=TestToolInput,
utility=TestUtility(),
examples=[],
)
class TestPlugin(BasePlugin):
name: str = "Test"
description: str = "Use this plugin to answer any questions."
tools: list[BaseTool] = [TestTool]
rs = await generate_response(
"Who am I?",
plugins=[TestPlugin()],
memory='sqlite',
config={"thread_id": "test"},
return_used_agents=False
)
Plugin Structure
FridonAI Core uses a hierarchical structure for plugins:
- Plugins: Extend
BasePlugin
- Tools: Extend
BaseTool
- Utilities: Extend
BaseUtility
Specialized utilities are available for specific use cases:
BlockchainUtility
: For blockchain operationsRemoteUtility
: For making remote API callsLLMUtility
: For language model interactions
Graph-based Processing
The core includes a Graph component that manages conversation flow and agent interactions. It's responsible for:
- Building networks of LLM Agents (Plugins)
- Routing messages between agents
- Managing agent states
- Creating chains with prompts and models
- Parsing outputs
- Composing independently implemented plugins
Documentation
For more detailed usage instructions and API documentation, please visit our main README.
Contributing
We welcome contributions!
Stay Connected
Follow us on Twitter for the latest updates and announcements:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for fridonai_core-0.0.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcd6584e25c254543c7f05bdec4469f49b0378f890a4abfa96ddab8c6df0cd69 |
|
MD5 | 39ca34ca4eb86702a3d9795412cabe8c |
|
BLAKE2b-256 | 50e7521fbd0728575ab42e2a9401def86b503b6c95442e74f3798516d9e7e981 |