Initializing
Using SmartGPT as a library in Rust.
SmartGPT can both be used as a CLI by directly running the program, or as a crate that you can interact with in your programs. Using it as a crate, though, can be very beneficial if you want to integrate it in your applications, or experiment with it in oher ways.
You can install the crate like so:
Then, try initializing SmartGPT:
The key observation to make is the use of providers. In SmartGPT, LLMs and Models are treated as traits, and they can be initialized through a provider and a config. You can also initialize them directly in the code-base, where config serialization is handled for you.
After initializing your smartgpt
instance, you'll want to load the plugin data for each plugin like so:
Last updated