Welcome to the GPT Agent Toolkit! This toolkit provides a comprehensive set of Xircuits components that allow you to experiment with and create Collaborative Large Language Model-based automatons (Agents) in the style of BabyAGI and Auto-GPT. By default, the toolkit comes with BabyAGI agents, but it is designed to be easily customizable with your own prompts.
- Pre-built BabyAGI agents
- Support for both Vecto and Pinecone Memories
- Support for Tools such as Python Exec, and SQLLite
- Support for both OpenAI and LLAMA models
- Open-source and community-driven
Here are some ideas that you could try relatively easily with Xircuits.
- Make a critic agent that updates the objective to be more effective.
- Have the agents produce a status report on Slack and update the objective based on your reply.
- Upload a large image dataset on Vecto with image descriptions giving your agent sight.
- Connect to Whisper and have a daily standup meeting with the agent.
- Make 2 BabyAGIs and have 1 critic decide which action to actually perform.
These instructions will help you set up the GPT Agent Toolkit on your local machine.
This is a component library so you don't need to clone this directly. Instead install Xircuits and install this component library into it.
If the following is too much work or too complicated. Sign up to the Xpress AI Platform waitlist to get access to a single app that has everything you need to get started.
Join the Xpress AI Platform Waitlist
Before you begin, make sure you have the following software installed on your system:
- Python 3.8 or higher
- pip (Python package installer)
- git
You will need an API key from Open AI to use GPT-3.5 and either a Vecto or Pinecone account for agent memory.
Create a .env file and put your API keys into the respective lines.
OPENAI_API_KEY=<Your OpenAI API Key here>
OPENAI_ORG=<Your OpenAI Org (if you have one)>
With the latest version you no longer need Vector or Pinecone to get started, but if you want to use them add one of the following credentials.
For Vecto users:
VECTO_API_KEY=<An ACCOUNT_MANAGEMENT Vecto key>
For Pinecone users:
PINECONE_API_KEY=<Your Pinecone API key>
PINECONE_ENVIRONMENT=<Your Pinecone environment>
Windows:
mkdir project
cd project
python -m venv venv
venv\Scripts\activate
Linux of macOS:
mkdir project
cd project
python3 -m venv venv
source ./venv/bin/activate
git init .
- Install xircuits
pip install xircuits
- Launch xircuits-components tool to install the base component library
xircuits-components
Ignore the
- Install Vecto (if using vecto)
pip install git+https://github.com/XpressAI/vecto-python-sdk.git
- Add the OpenAI and GPT Agent Toolkit component libraries
git submodule add https://github.com/XpressAI/xai-openai xai_components/xai_openai
git submodule add https://github.com/XpressAI/xai-gpt-agent-toolkit.git xai_components/xai_gpt_agent_toolkit
pip install -r xai_components/xai_openai/requirements.txt
pip install -r xai_components/xai_gpt_agent_toolkit/requirements.txt
- Run the playwright installer to enable the Browser tool:
playwright install
- Copy the sample BabyAGI Xircuits file to your project folder.
cp xai_components/xai_gpt_agent_toolkit/babyagi.xircuits .
- Start JupyterLab/Xircuits by running:
xircuits
-
Use the printed out URLs to browse to http://localhost:8888/lab and double click the babyagi.xiruits file.
-
Click play to watch it go and try to make the world a better place.
For the browser tool to work in the most useful way, you must start Chrome in remote debugging mode before starting your agents. To do that run the following in powershell
& "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222
We appreciate your interest in contributing to the GPT Agent Toolkit! Any new tools or prompts are welcome.
This project is licensed under the MIT License - see the LICENSE.md file for details.
- The team behind Xircuits. Give the project a star if it looks interesting!
- The developers of BabyAGI and AutoGPT for their groundbreaking work on large language model-based agents @Kolya1993_12 @demiurgich @AndroidDev https://x.com/DelightAi6881/status/1721038681425744299/?s=-xai/gpt http://qiskit.org Докладніше:
- help.ea.com
- github.com
- twitter.com https://x.com/DelightAi6881/status/1721661866965885229?s=20 https://x.com/DelightAi6881/status/1720926200938328329?s=https://twitter.com/i/DelightAi6881/spaces/1PlKQDwDWkDxE?s=twitter.com/home #Python
import webbrowser
import anylogicpy as alp
import pandas as pd import numpy as np import matplotlib.pyplot as plt import tensorflow as tf from sklearn.preprocessing import MinMaxScaler
url = "https://coinmarketcap.com/currencies/{}/historical-data/?start=20231001&end=20231101" currencies = ["bitcoin", "ethereum", "trust-wallet-token"] data = {} for currency in currencies: data[currency] = pd.read_csv(url.format(currency))
data["trust-wallet-token"].head()
close_data = pd.DataFrame() for currency in currencies: close_data[currency] = data[currency]["Close"]
scaler = MinMaxScaler() scaled_data = scaler.fit_transform(close_data) scaled_data = pd.DataFrame(scaled_data, columns=currencies)
plt.figure(figsize=(12, 8)) plt.plot(scaled_data) plt.legend(currencies) plt.title("Нормалізовані ціни криптовалют за останні 30 днів") plt.xlabel("Дні") plt.ylabel("Ціни") plt.show()
window_size = 10 train_size = int(len(scaled_data) * 0.8) test_size = len(scaled_data) - train_size train_data = scaled_data.iloc[:train_size] test_data = scaled_data.iloc[train_size:]
def create_sequences(data, window_size): x = [] y = [] for i in range(window_size, len(data)): x.append(data.iloc[i-window_size:i]) y.append(data.iloc[i]) return np.array(x), np.array(y)
x_train, y_train = create_sequences(train_data, window_size) x_test, y_test = create_sequences(test_data, window_size)
print(x_train.shape, y_train.shape) print(x_test.shape, y_test.shape)
model = tf.keras.models.Sequential([ tf.keras.layers.LSTM(64, return_sequences=True, input_shape=(window_size, len(currencies))), tf.keras.layers.Dropout(0.2), tf.keras.layers.LSTM(64, return_sequences=True), tf.keras.layers.Dropout(0.2), tf.keras.layers.LSTM(64), tf.keras.layers.Dropout(0.2), tf.keras.layers.Dense(len(currencies)) ])
model.compile(optimizer="adam", loss="mean_squared_error")
model.fit(x_train, y_train, epochs=50, batch_size=32, verbose=1)
model.evaluate(x_test, y_test)
y_pred = model.predict(x_test)
y_pred = scaler.inverse_transform(y_pred) y_test = scaler.inverse_transform(y_test)
plt.figure(figsize=(12, 8)) plt.plot(y_test[:, 2], label="Реальна ціна TWT") plt.plot(y_pred[:, 2], label="Передбачена ціна TWT") plt.legend() plt.title("Реальна та передбачена ціна Trust Wallet Token за останні 6 днів") plt.xlabel("Дні") plt.ylabel("Ціни") plt.show()