Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
I’m authored Jul 3, 2023
2 parents 538fbf0 + 80b443e commit ac18f7f
Show file tree
Hide file tree
Showing 63 changed files with 524 additions and 281 deletions.
149 changes: 149 additions & 0 deletions .github/ISSUE_TEMPLATE/1.BUG_REPORT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
name: Bug report
description: Create a bug report for SuperAGI.
labels: ['status: needs triage']
body:
- type: markdown
attributes:
value: |
### ⚠️ Issue Creation Guideline
* Check out our [roadmap] and join our [discord] to discuss what's going on
* If you need help, you can ask in the [#general] section or in [#support]
* **Thoroughly search the [existing issues] before creating a new one**
* Read through our docs:
[roadmap]: https://github.com/users/TransformerOptimus/projects/1
[discord]: https://discord.gg/dXbRe5BHJC
[#general]: https://discord.com/channels/1107593006032355359/1107642413993959505
[#support]: https://discord.com/channels/1107593006032355359/1107645922797703198
[existing issues]: https://github.com/TransformerOptimus/SuperAGI/issues
- type: checkboxes
attributes:
label: ⚠️ Check for existing issues before proceeding. ⚠️
description: >
Please [search the history](https://github.com/TransformerOptimus/SuperAGI/issues)
to see if an issue already exists for the same problem.
options:
- label: I have searched the existing issues, and there is no existing issue for my problem
required: true

- type: markdown
attributes:
value: |
Please confirm that the issue you have is described well and precise in the title above ⬆️.
Think like this: What would you type if you were searching for the issue?
For example:
❌ - my SuperAGI agent keeps looping
✅ - After performing Write Tool, SuperAGI goes into a loop where it keeps trying to write the file.
Please help us help you by following these steps:
- Search for existing issues, adding a comment when you have the same or similar issue is tidier than "new issue" and
newer issues will not be reviewed earlier, this is dependent on the current priorities set by our wonderful team
- Ask on our Discord if your issue is known when you are unsure (https://discord.gg/dXbRe5BHJC)
- Provide relevant info:
- Provide Docker Logs(docker compose logs) whenever possible.
- If it's a pip/packages issue, mention this in the title and provide pip version, python version.
- type: dropdown
attributes:
label: Where are you using SuperAGI?
description: >
Please select the operating system you were using to run SuperAGI when this problem occurred.
options:
- Windows
- Linux
- MacOS
- Codespaces
- Web Version
- Other
validations:
required: true
nested_fields:
- type: text
attributes:
label: Specify the system
description: Please specify the system you are working on.

- type: dropdown
attributes:
label: Which branch of SuperAGI are you using?
description: |
Please select which version of SuperAGI you were using when this issue occurred.
If installed with git you can run `git branch` to see which version of Auto-GPT you are running.
options:
- Main
- Dev (branch)
validations:
required: true

- type: dropdown
attributes:
label: Do you use OpenAI GPT-3.5 or GPT-4?
description: >
If you are using SuperAGI with GPT-3.5, your problems may be caused by
the limitations of GPT-3.5 like incorrect Tool selection thus causing looping in the agent feed.
options:
- GPT-3.5
- GPT-3.5(16k)
- GPT-4
- GPT-4(32k)
validations:
required: true

- type: dropdown
attributes:
label: Which area covers your issue best?
description: >
Select the area related to the issue you are reporting.
options:
- Installation and setup
- Resource Manager
- Action Console
- Performance
- Marketplace
- Prompt
- Tools
- Agents
- Documentation
- Logging
- Other
validations:
required: true
autolabels: true
nested_fields:
- type: text
attributes:
label: Specify the area
description: Please specify the area you think is best related to the issue.

- type: textarea
attributes:
label: Describe your issue.
description: Describe the problem you are experiencing. Try to describe only the issue and phrase it short but clear. ⚠️ Provide NO other data in this field
validations:
required: true

- type: textarea
attributes:
label: How to replicate your Issue?
description: |
Mention Agent Name, Agent Description and Agent Goals, along with Model selected.
Provide any other data which might be relevant for us to replicate this issue.
⚠️ Provide NO other data in this field
validations:
required: false

- type: markdown
attributes:
value: |
⚠️ Please keep in mind that the log files may contain personal information such as credentials. Make sure you hide them before copy/pasting it! ⚠️
- type: input
attributes:
label: Upload Error Log Content
description: |
Upload the error log content, this can help us understand the issue better.
To do this, you can simply copy the logs from the terminal with which you did 'docker compose up' or in a new terminal,
enter 'docker compose logs' and copy/paste the error contents to this field.
⚠️ The activity log may contain personal data given to SuperAGI by you in prompt or input as well as
any personal information that SuperAGI collected out of files during last run. Please hide them before sharing. ⚠️
validations:
required: True
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ superagi/controllers/__pycache__
**agent_dictvenv
**/__gitpycache__/
gui/node_modules
node_modules
gui/.next
.DS_Store
.DS_Store?
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ services:
- NEXT_PUBLIC_API_BASE_URL=/api
networks:
- super_network
volumes:
- ./gui:/app
- /app/node_modules
- /app/.next
# volumes:
# - ./gui:/app
# - /app/node_modules/
# - /app/.next/
super__redis:
image: "docker.io/library/redis:latest"
networks:
Expand Down
2 changes: 2 additions & 0 deletions gui/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
.next/
8 changes: 6 additions & 2 deletions gui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
FROM node:lts
FROM node:lts AS deps

WORKDIR /app

COPY package*.json ./
COPY . .
RUN npm ci

FROM node:lts AS builder
WORKDIR /app
COPY . .
COPY --from=deps /app/node_modules ./node_modules

CMD ["npm", "run", "dev"]
6 changes: 3 additions & 3 deletions gui/pages/Content/Agents/ActionConsole.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
import styles from './Agents.module.css';
import Image from 'next/image';
import { updatePermissions } from '@/pages/api/DashboardService';
import { formatTime } from '@/utils/utils';
import {formatTimeDifference} from '@/utils/utils';

function ActionBox({ action, index, denied, reasons, handleDeny, handleSelection, setReasons }) {
const isDenied = denied[index];
Expand Down Expand Up @@ -49,7 +49,7 @@ function ActionBox({ action, index, denied, reasons, handleDeny, handleSelection
<div>
<Image width={12} height={12} src="/images/schedule.svg" alt="schedule-icon" />
</div>
<div className={styles.history_info}>{formatTime(action.created_at)}</div>
<div className={styles.history_info}>{formatTimeDifference(action.time_difference)}</div>
</div>
</div>
);
Expand Down Expand Up @@ -81,7 +81,7 @@ function HistoryBox({ action }){
<div>
<Image width={12} height={12} src="/images/schedule.svg" alt="schedule-icon" />
</div>
<div className={styles.history_info}>{formatTime(action.created_at)}</div>
<div className={styles.history_info}>{formatTimeDifference(action.time_difference)}</div>
</div>
</div>
</div>
Expand Down
13 changes: 7 additions & 6 deletions gui/pages/Content/Agents/ActivityFeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, {useEffect, useRef, useState} from 'react';
import styles from './Agents.module.css';
import {getExecutionFeeds} from "@/pages/api/DashboardService";
import Image from "next/image";
import {formatTime, loadingTextEffect} from "@/utils/utils";
import {loadingTextEffect, formatTimeDifference} from "@/utils/utils";
import {EventBus} from "@/utils/eventBus";

export default function ActivityFeed({selectedRunId, selectedView, setFetchedData }) {
Expand All @@ -28,8 +28,10 @@ export default function ActivityFeed({selectedRunId, selectedView, setFetchedDat
if (feeds.length !== prevFeedsLength) {
if (feedContainerRef.current) {
setTimeout(() => {
feedContainerRef.current.scrollTo({ top: feedContainerRef.current.scrollHeight, behavior: 'smooth' });
setPrevFeedsLength(feeds.length);
if(feedContainerRef.current !== null) {
feedContainerRef.current.scrollTo({ top: feedContainerRef.current.scrollHeight, behavior: 'smooth' });
setPrevFeedsLength(feeds.length);
}
}, 100);
}
}
Expand Down Expand Up @@ -57,7 +59,6 @@ export default function ActivityFeed({selectedRunId, selectedView, setFetchedDat
const data = response.data;
setFeeds(data.feeds);
setRunStatus(data.status);
console.log(data.permissions)
setFetchedData(data.permissions);
})
.catch((error) => {
Expand Down Expand Up @@ -90,13 +91,13 @@ export default function ActivityFeed({selectedRunId, selectedView, setFetchedDat
<div className={styles.feed_title}>{f?.feed || ''}</div>
</div>
<div className={styles.more_details_wrapper}>
{f.updated_at && formatTime(f.updated_at) !== 'Invalid Time' && <div className={styles.more_details}>
{f.time_difference && <div className={styles.more_details}>
<div style={{display: 'flex', alignItems: 'center'}}>
<div>
<Image width={12} height={12} src="/images/schedule.svg" alt="schedule-icon"/>
</div>
<div className={styles.history_info}>
{formatTime(f.updated_at)}
{formatTimeDifference(f.time_difference)}
</div>
</div>
</div>}
Expand Down
13 changes: 4 additions & 9 deletions gui/pages/Content/Agents/AgentCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {ToastContainer, toast} from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
import styles from './Agents.module.css';
import {createAgent, fetchAgentTemplateConfigLocal, getOrganisationConfig, uploadFile} from "@/pages/api/DashboardService";
import {formatBytes} from "@/utils/utils";
import {formatBytes, openNewTab, removeTab} from "@/utils/utils";
import {EventBus} from "@/utils/eventBus";

export default function AgentCreate({sendAgentData, selectedProjectId, fetchAgents, toolkits, organisationId, template}) {
Expand Down Expand Up @@ -338,7 +338,7 @@ export default function AgentCreate({sendAgentData, selectedProjectId, fetchAgen
const handleAddAgent = () => {
if(!hasAPIkey) {
toast.error("Your OpenAI API key is empty!", {autoClose: 1800});
EventBus.emit("openSettings", {});
openNewTab(-3, "Settings", "Settings");
return
}

Expand All @@ -365,7 +365,6 @@ export default function AgentCreate({sendAgentData, selectedProjectId, fetchAgen

setCreateClickable(false);

// if permission has word restricted change the permission to
let permission_type = permission;
if (permission.includes("RESTRICTED")) {
permission_type = "RESTRICTED";
Expand Down Expand Up @@ -394,7 +393,7 @@ export default function AgentCreate({sendAgentData, selectedProjectId, fetchAgen
.then((response) => {
const agent_id = response.data.id;
fetchAgents();
cancelCreate();
removeTab(-1, "new agent", "Create_Agent");
sendAgentData({ id: agent_id, name: response.data.name, contentType: "Agents", execution_id: response.data.execution_id });
if(addResources) {
input.forEach((fileData) => {
Expand All @@ -416,10 +415,6 @@ export default function AgentCreate({sendAgentData, selectedProjectId, fetchAgen
});
};

function cancelCreate() {
EventBus.emit('removeTab', {id: -1, name: "new agent", contentType: "Create_Agent"});
}

const toggleToolkit = (e, id) => {
e.stopPropagation();
const toolkitToUpdate = toolkitList.find(toolkit => toolkit.id === id);
Expand Down Expand Up @@ -771,7 +766,7 @@ export default function AgentCreate({sendAgentData, selectedProjectId, fetchAgen
</div>
}
<div style={{marginTop: '15px', display: 'flex', justifyContent: 'flex-end'}}>
<button style={{marginRight:'7px'}} className="secondary_button" onClick={cancelCreate}>Cancel</button>
<button style={{marginRight:'7px'}} className="secondary_button" onClick={() => removeTab(-1, "new agent", "Create_Agent")}>Cancel</button>
<button disabled={!createClickable} className="primary_button" onClick={handleAddAgent}>Create and Run</button>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions gui/pages/Content/Agents/RunHistory.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import styles from './Agents.module.css';
import Image from "next/image";
import {formatTime, formatNumber} from "@/utils/utils";
import {formatNumber, formatTimeDifference} from "@/utils/utils";

export default function RunHistory({runs, setHistory, selectedRunId, setSelectedRun}) {
return (<>
Expand Down Expand Up @@ -44,7 +44,7 @@ export default function RunHistory({runs, setHistory, selectedRunId, setSelected
<Image width={12} height={12} src="/images/schedule.svg" alt="schedule-icon"/>
</div>
<div className={styles.history_info}>
{formatTime(run.last_execution_time)}
{formatTimeDifference(run.time_difference)}
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Dashboard/Content.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export default function Content({env, selectedView, selectedProjectId, organisat
{selectedTab === index && <div>
{tab.contentType === 'Agents' && <AgentWorkspace agentId={tab.id} selectedView={selectedView}/>}
{tab.contentType === 'Toolkits' && <ToolkitWorkspace toolkitDetails={toolkitDetails}/>}
{tab.contentType === 'Settings' && <Settings/>}
{tab.contentType === 'Settings' && <Settings organisationId={organisationId} />}
{tab.contentType === 'Marketplace' && <Market env={env} source={source} selectedView={selectedView}/>}
{tab.contentType === 'Create_Agent' && <AgentTemplatesList organisationId={organisationId} sendAgentData={addTab} selectedProjectId={selectedProjectId} fetchAgents={fetchAgents} toolkits={toolkits}/>}
</div>}
Expand Down
Loading

0 comments on commit ac18f7f

Please sign in to comment.