This repository demonstrates how to use the Substrate API with two examples. You can learn how to write and execute Python functions dynamically using different models provided by Substrate. Follow the steps below to get started.
Before you begin, you'll need to sign up and obtain an API key from Substrate. Visit Substrate's website to sign up and retrieve your API key.
Navigate to the inception directory to explore the Inception example, which demonstrates writing and running Python functions.
Steps to Run the Inception Example:
- Clone the repository:
git clone <repo_url> - Navigate to the inception directory:
cd inception - Install the required dependencies:
pip install substrate - Run the program:
python main.py - Input your API key when prompted.
Navigate to the chat directory to explore the chat example, which showcases a simple chat application using the Llama3Instruct models.
Steps to Run the Chat Example:
-
Clone the repository (if not already done):
git clone <repo_url> -
Navigate to the chat directory:
cd chat -
Install the required dependencies:
pip install -r requirements.txt -
Run the application:
python memory70B.pyor
python nomemory8b.py -
Input your API key when prompted.
Navigate to the openwebui directory to explore the OpenWebUI example, which demonstrates setting up a basic web UI.
- For more details, refer to the respective
README.mdfiles in theinception,chat, andopenwebuidirectories. - Visit Substrate's documentation for further guidance.
Happy coding!