mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 14:04:27 +01:00
Deletes old output renderer and renames AutonomousAI folder to scripts
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 39 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 23 KiB |
@@ -1,24 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
<title>JSON Display</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container my-5">
|
||||
<h1 class="text-center mb-4">Entrepreneur-GPT Output</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-6 offset-md-3">
|
||||
<div id="json-display" class="json-display"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,55 +0,0 @@
|
||||
const fs = require('fs');
|
||||
|
||||
fs.readFile('data.json', 'utf8', (err, data) => {
|
||||
if (err) throw err;
|
||||
const jsonData = JSON.parse(data);
|
||||
displayJsonData(jsonData);
|
||||
});
|
||||
|
||||
|
||||
function displayJsonData() {
|
||||
const jsonDisplay = document.getElementById('json-display');
|
||||
let displayContent = '';
|
||||
|
||||
for (const key in jsonData) {
|
||||
displayContent += `<h2>${key}:</h2><br><ul>`;
|
||||
const value = jsonData[key];
|
||||
|
||||
for (const subKey in value) {
|
||||
let subValue = value[subKey];
|
||||
|
||||
if (typeof subValue === 'string') {
|
||||
subValue = subValue.replace(/\n/g, '<br>');
|
||||
}
|
||||
|
||||
if (subKey === "args") {
|
||||
// displayContent += `<li><strong>${subKey}:</strong><ul>`;
|
||||
|
||||
for (const argumentKey in value[subKey]) {
|
||||
const argumentValue = value[subKey][argumentKey];
|
||||
displayContent += `<li><div class=""><strong>${argumentKey}:</strong> ${argumentValue.replace(/\n/g, '<br>')}</div></li>`;
|
||||
}
|
||||
|
||||
displayContent += '</ul></li>';
|
||||
} else {
|
||||
displayContent += `<li><strong>${subKey}:</strong> ${subValue}</li>`;
|
||||
}
|
||||
}
|
||||
|
||||
displayContent += '</ul>';
|
||||
}
|
||||
|
||||
jsonDisplay.innerHTML = `
|
||||
<div class="json-display-content">
|
||||
${displayContent}
|
||||
</div>
|
||||
<div class="twitter-handles">
|
||||
<img src="en_gpt.jpg" alt="En_GPT" class="twitter-profile-pic">
|
||||
<a href="https://twitter.com/En_GPT"> @En_GPT</a>
|
||||
<img src="SigGravitas.jpg" alt="SigGravitas" class="twitter-profile-pic">
|
||||
<a href="https://twitter.com/SigGravitas">@SigGravitas</a>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: #1a1a1a;
|
||||
color: #f5f5f5;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1250px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #f5f5f5;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.json-display {
|
||||
padding: 20px;
|
||||
border-radius: 5px;
|
||||
background-color: #2b2b2b;
|
||||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.json-display h2 {
|
||||
margin-top: 0;
|
||||
color: #f5f5f5;
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.json-display ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.json-display ul li {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
strong {
|
||||
color: #007bff;
|
||||
}
|
||||
|
||||
.argument-box {
|
||||
background: #007bff1c;
|
||||
padding: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.twitter-handles {
|
||||
/* Center horizontally */
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.twitter-profile-pic {
|
||||
height: 30px;
|
||||
border-radius: 50%;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ def start_agent(name, task, prompt, model="gpt-3.5-turbo"):
|
||||
|
||||
# Create agent
|
||||
if cfg.speak_mode:
|
||||
speak.say_text(agent_intro)
|
||||
speak.say_text(agent_intro, 1)
|
||||
key, ack = agents.create_agent(task, first_message, model)
|
||||
|
||||
if cfg.speak_mode:
|
||||
@@ -171,7 +171,7 @@ def message_agent(key, message):
|
||||
|
||||
# Speak response
|
||||
if cfg.speak_mode:
|
||||
speak.say_text(agent_response)
|
||||
speak.say_text(agent_response, 1)
|
||||
|
||||
return f"Agent {key} responded: {agent_response}"
|
||||
|
||||
2
scripts/keys.py
Normal file
2
scripts/keys.py
Normal file
@@ -0,0 +1,2 @@
|
||||
OPENAI_API_KEY="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"
|
||||
ELEVENLABS_API_KEY="f213258a522dc2f33c4f0e4f798a08a1"
|
||||
@@ -3,8 +3,7 @@ from playsound import playsound
|
||||
import requests
|
||||
import keys
|
||||
|
||||
voice_id = "ErXwobaYiN019PkySvjV"
|
||||
tts_url = "https://api.elevenlabs.io/v1/text-to-speech/{voice_id}".format(voice_id=voice_id)
|
||||
voices = ["ErXwobaYiN019PkySvjV", "EXAVITQu4vr4xnSDxMaL"]
|
||||
|
||||
tts_headers = {
|
||||
"Content-Type": "application/json",
|
||||
@@ -12,7 +11,9 @@ tts_headers = {
|
||||
}
|
||||
|
||||
|
||||
def say_text(text):
|
||||
def say_text(text, voice_index = 0):
|
||||
tts_url = "https://api.elevenlabs.io/v1/text-to-speech/{voice_id}".format(voice_id=voices[voice_index])
|
||||
|
||||
formatted_message = {"text": text}
|
||||
response = requests.post(
|
||||
tts_url, headers=tts_headers, json=formatted_message)
|
||||
Reference in New Issue
Block a user