Skip to content

Commit

Permalink
Agent Execution Bug Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
luciferlinx101 committed Jul 3, 2023
2 parents b232c67 + 1e5c8b4 commit 488d4fa
Show file tree
Hide file tree
Showing 74 changed files with 1,433 additions and 658 deletions.
149 changes: 0 additions & 149 deletions .github/ISSUE_TEMPLATE/1.BUG_REPORT.yml

This file was deleted.

19 changes: 18 additions & 1 deletion config_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ OPENAI_API_BASE: https://api.openai.com/v1

# "gpt-3.5-turbo-0301": 4032, "gpt-4-0314": 8092, "gpt-3.5-turbo": 4032, "gpt-4": 8092, "gpt-4-32k": 32768, "gpt-4-32k-0314": 32768, "llama":2048, "mpt-7b-storywriter":45000
MODEL_NAME: "gpt-3.5-turbo-0301"
RESOURCES_SUMMARY_MODEL_NAME: "gpt-3.5-turbo"
MAX_TOOL_TOKEN_LIMIT: 800
MAX_MODEL_TOKEN_LIMIT: 4032 # set to 2048 for llama

Expand Down Expand Up @@ -91,4 +92,20 @@ SLACK_BOT_TOKEN: YOUR_SLACK_BOT_TOKEN
# For running stable diffusion
STABILITY_API_KEY: YOUR_STABILITY_API_KEY
#Engine IDs that can be used: 'stable-diffusion-v1', 'stable-diffusion-v1-5','stable-diffusion-512-v2-0', 'stable-diffusion-768-v2-0','stable-diffusion-512-v2-1','stable-diffusion-768-v2-1','stable-diffusion-xl-beta-v2-2-2'
ENGINE_ID: "stable-diffusion-xl-beta-v2-2-2"
ENGINE_ID: "stable-diffusion-xl-beta-v2-2-2"

# To config a vector store for resources manager
# RESOURCE_VECTOR_STORE can be REDIS, PINECONE, CHROMA, QDRANT
RESOURCE_VECTOR_STORE: YOUR_RESOURCE_VECTOR_STORE
RESOURCE_VECTOR_STORE_INDEX_NAME: YOUR_RESOURCE_VECTOR_STORE_INDEX_NAME

# To use a custom redis
REDIS_VECTOR_STORE_URL: YOUR_REDIS_VECTOR_STORE_URL

# To use qdrant for vector store in resources manager
QDRANT_PORT: YOUR_QDRANT_PORT
QDRANT_HOST_NAME: YOUR_QDRANT_HOST_NAME

# To use chroma for vector store in resources manager
CHROMA_HOST_NAME: YOUR_CHROMA_HOST_NAME
CHROMA_PORT: YOUR_CHROMA_PORT
15 changes: 11 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,15 @@ services:
# - /app/node_modules/
# - /app/.next/
super__redis:
image: "docker.io/library/redis:latest"
image: "redis/redis-stack-server:latest"
networks:
- super_network
# uncomment to expose redis port to host
# ports:
# - "6379:6379"
volumes:
- redis_data:/data

super__postgres:
image: "docker.io/library/postgres:latest"
environment:
Expand All @@ -45,8 +51,9 @@ services:
- superagi_postgres_data:/var/lib/postgresql/data/
networks:
- super_network
ports:
- "5432:5432"
# uncomment to expose postgres port to host
# ports:
# - "5432:5432"

proxy:
image: nginx:stable-alpine
Expand All @@ -60,9 +67,9 @@ services:
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf


networks:
super_network:
driver: bridge
volumes:
superagi_postgres_data:
redis_data:
7 changes: 3 additions & 4 deletions gui/pages/Content/Agents/AgentCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function AgentCreate({sendAgentData, selectedProjectId, fetchAgen
const rollingRef = useRef(null);
const [rollingDropdown, setRollingDropdown] = useState(false);

const databases = ["Pinecone", "LanceDB"]
const databases = ["Pinecone"]
const [database, setDatabase] = useState(databases[0]);
const databaseRef = useRef(null);
const [databaseDropdown, setDatabaseDropdown] = useState(false);
Expand All @@ -72,7 +72,7 @@ export default function AgentCreate({sendAgentData, selectedProjectId, fetchAgen
const toolkitRef = useRef(null);
const [toolkitDropdown, setToolkitDropdown] = useState(false);

const excludedToolkits = ["Thinking Toolkit", "Human Input Toolkit"];
const excludedToolkits = ["Thinking Toolkit", "Human Input Toolkit","Resource Toolkit"];
const [hasAPIkey, setHasAPIkey] = useState(false);

useEffect(() => {
Expand Down Expand Up @@ -195,8 +195,7 @@ export default function AgentCreate({sendAgentData, selectedProjectId, fetchAgen
setLocalStorageArray("tool_names_" + String(internalId), updatedToolNames, setToolNames);
setSearchValue('');
}



const removeTool = (indexToDelete) => {
const updatedToolIds = [...selectedTools];
updatedToolIds.splice(indexToDelete, 1);
Expand Down
26 changes: 10 additions & 16 deletions gui/pages/Content/Marketplace/EachTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,32 @@ import axios from 'axios';
export default function EachTool({template, env}) {
const [rightPanel, setRightPanel] = useState('overview')
const [installed, setInstalled] = useState('')
const [markdownContent, setMarkdownContent] = useState(null);
const [markdownContent, setMarkdownContent] = useState('');

useEffect(() => {
setInstalled(template && template.is_installed ? 'Installed' : 'Install');
if (window.location.href.toLowerCase().includes('marketplace')) {
setInstalled('Sign in to install');
axios.get(`https://app.superagi.com/api/toolkits/marketplace/readme/${template.name}`)
.then((response) => {
const data = response.data || [];
setMarkdownContent(data);
setMarkdownContent(response.data || '');
setRightPanel(response.data ? 'overview' : 'tool_view');
})
.catch((error) => {
setRightPanel('tool_view');
console.error('Error fetching template details:', error);
});
} else {
fetchToolTemplateOverview(template.name)
.then((response) => {
const data = response.data || [];
setMarkdownContent(data);
setMarkdownContent(response.data || '');
setRightPanel(response.data ? 'overview' : 'tool_view');
})
.catch((error) => {
setRightPanel('tool_view');
console.error('Error fetching template details:', error);
});
}

}, []);


Expand Down Expand Up @@ -113,13 +114,13 @@ export default function EachTool({template, env}) {
<div className={styles2.left_container} style={{marginBottom: '5px', padding: '8px'}}>
<div className="row">
<div className="col-4">
<button onClick={() => setRightPanel('overview')} className={styles2.tab_button}
{markdownContent && markdownContent !== '' && <button onClick={() => setRightPanel('overview')} className={styles2.tab_button}
style={rightPanel === 'overview' ? {
background: '#454254',
paddingRight: '15px'
} : {background: 'transparent', paddingRight: '15px'}}>
&nbsp;Overview
</button>
</button>}
<button onClick={() => setRightPanel('tool_view')}
className={styles2.tab_button} style={rightPanel === 'tool_view' ? {
background: '#454254',
Expand All @@ -133,21 +134,14 @@ export default function EachTool({template, env}) {
{rightPanel === 'overview' &&
<div className={styles2.left_container} style={{marginBottom: '8px'}}>
<div className={styles2.markdown_container}>
{markdownContent ? <ReactMarkdown
{markdownContent && markdownContent !== '' ? <ReactMarkdown
className={styles2.markdown_style}>{markdownContent}</ReactMarkdown> :
<div style={{display:'flex',flexDirection:'column',alignItems:'center',justifyContent:'center',marginTop:'40px',width:'100%'}}>
<Image width={150} height={60} src="/images/no_permissions.svg" alt="no-permissions" />
<span className={styles3.feed_title} style={{marginTop: '8px'}}>No Overview to display!</span>
</div>
}
</div>
{/*<div>*/}
{/* <span className={styles2.description_heading} style={{fontWeight: '400'}}>{goals.length}&nbsp;Goals</span><br/><br/>*/}
{/* {goals.map((goal, index) => (<div key={index} style={{marginTop: '0'}}>*/}
{/* <div className={styles2.description_text}>{index + 1}. {goal || ''}</div>*/}
{/* {index !== goals.length - 1}*/}
{/* </div>))}*/}
{/*</div>*/}
</div>}
{rightPanel === 'tool_view' && <div>
<div style={{overflowY: 'scroll', height: '70vh'}}>
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Content/Marketplace/MarketplacePublic.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function MarketplacePublic({env}) {
<div className={styles.marketplace_public_container}>
<div className="superAgiLogo" style={{paddingLeft:'15px'}}><Image width={132} height={24} style={{cursor:'pointer'}} onClick={handleSignupClick} src="/images/sign-in-logo.svg" alt="super-agi-logo"/>
<div className={styles.vertical_line} />
<div className={styles.topbar_heading}>&nbsp;marketplace</div>
<div className={styles.topbar_heading}>&nbsp;Marketplace</div>
</div>
<div className={styles.marketplace_public_button}>
<button className="primary_button" onClick={handleSignupClick}>Sign Up</button>
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Content/Toolkits/Toolkits.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'react-toastify/dist/ReactToastify.css';
import {createInternalId} from "@/utils/utils";

export default function Toolkits({ sendToolkitData, toolkits, env }) {
const excludedToolkits = ["Thinking Toolkit", "Human Input Toolkit"];
const excludedToolkits = ["Thinking Toolkit", "Human Input Toolkit","Resource Toolkit"];

return (
<>
Expand Down
Loading

0 comments on commit 488d4fa

Please sign in to comment.