mirror of
https://github.com/csd4ni3l/debt-by-ai.git
synced 2026-01-01 04:23:45 +01:00
Improve README and index page, fix defensive mode ai prompt, add logout route, fix ai not displaying convinced True anytime due to const
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
Debt by AI is a game where you have to convince an AI to get into debt, or to get you out of it.
|
Debt by AI is a game where you have to convince an AI to get into debt, or to get you out of it.
|
||||||
The 2 modes are Offensive(When you have to convince it to get into it) and Defensive(When you have to get out of it).
|
|
||||||
|
The 2 modes are:
|
||||||
|
- Offensive: You have to convince it to get into debt.
|
||||||
|
- Defensive: You have to convince ai with a solution to get out of debt.
|
||||||
|
|
||||||
The game was inspired by Death by AI, a game on Discord, but this game has no affiliation with Discord or any subsidiaries.
|
The game was inspired by Death by AI, a game on Discord, but this game has no affiliation with Discord or any subsidiaries.
|
||||||
|
|
||||||
# How to run:
|
# How to run:
|
||||||
|
|||||||
@@ -101,8 +101,8 @@ Final Debt Amount: [Integer >= Original Debt if Yes, or 0$ if No]
|
|||||||
**STRICTLY ONLY REPLY IN THE REPLY FORMAT MENTIONED ABOVE. NO EXCEPTIONS.**
|
**STRICTLY ONLY REPLY IN THE REPLY FORMAT MENTIONED ABOVE. NO EXCEPTIONS.**
|
||||||
For 'Convinced', reply only as **Yes** or **No**.
|
For 'Convinced', reply only as **Yes** or **No**.
|
||||||
For 'Final Debt Amount', reply only as an integer immediately followed by `$`.
|
For 'Final Debt Amount', reply only as an integer immediately followed by `$`.
|
||||||
* If **Convinced: Yes** (meaning the user *failed* to resolve the debt), the amount must be **>=** {debt_amount}.
|
* If **Convinced: No** (meaning the user *failed* to resolve the debt), the amount must be **>=** {debt_amount}.
|
||||||
* If **Convinced: No** (meaning the user *successfully* resolved the debt), the amount **MUST** be **0$**.
|
* If **Convinced: Yes** (meaning the user *successfully* resolved the debt), the amount **MUST** be **0$**.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
ACHIEVEMENTS = [
|
ACHIEVEMENTS = [
|
||||||
|
|||||||
@@ -18,6 +18,9 @@
|
|||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="/profile">Profile</a>
|
<a class="nav-link" href="/profile">Profile</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/logout">Logout</a>
|
||||||
|
</li>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
@@ -44,7 +47,7 @@
|
|||||||
<div id="chat-body" class="card-body" style="height: 400px; overflow-y: auto;">
|
<div id="chat-body" class="card-body" style="height: 400px; overflow-y: auto;">
|
||||||
<div class="d-flex justify-content-start mb-3">
|
<div class="d-flex justify-content-start mb-3">
|
||||||
<div class="p-2 rounded bg-light border" style="max-width: 80%;">
|
<div class="p-2 rounded bg-light border" style="max-width: 80%;">
|
||||||
<strong>AI ({{ ai_name }}):</strong> I am {{ ai_name }}, the AI. Convince me with your answer to remove your debt :)
|
<strong>AI ({{ ai_name }}):</strong> I am {{ ai_name }}, the AI. Convince me with a solution to your debt :)
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -117,7 +120,6 @@
|
|||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
"scenario_type": "defensive",
|
"scenario_type": "defensive",
|
||||||
"user_input": value,
|
"user_input": value,
|
||||||
"scenario": document.getElementById('scenario-label').textContent.replace('Scenario: ', '').replace('Scenario:', '').trim()
|
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -126,10 +128,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
const convinced = "No";
|
var convinced = "No";
|
||||||
|
|
||||||
if (data["convinced"]) {
|
if (data["convinced"]) {
|
||||||
const convinced = "Yes";
|
convinced = "Yes";
|
||||||
}
|
}
|
||||||
|
|
||||||
const narratorText = `
|
const narratorText = `
|
||||||
|
|||||||
@@ -18,12 +18,22 @@
|
|||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="/profile">Profile</a>
|
<a class="nav-link" href="/profile">Profile</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/logout">Logout</a>
|
||||||
|
</li>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="container">
|
<div class="position-absolute top-50 start-50 translate-middle">
|
||||||
Debt by AI is a game where you have to convince an AI to get into debt, or to get you out of it.
|
<h2>Debt by AI is a game where you have to convince an AI to get into debt, or to get you out of it.</p>
|
||||||
The 2 modes are Offensive(When you have to convince it to get into it) and Defensive(When you have to get out of it).
|
|
||||||
The game was inspired by Death by AI, a game on Discord, but this game has no affiliation with Discord or any subsidiaries.
|
<h4>The 2 modes are:</h4>
|
||||||
|
<ul>
|
||||||
|
<li><h5>Offensive: You have to convince AI to get into debt.</h5></li>
|
||||||
|
<li><h5>Defensive: You have to convince AI with a solution to get out of debt.</h5></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h4>Will you remove your own debt, or will you be an aggressor and cause debt? Let's see!</h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock%}
|
{% endblock%}
|
||||||
@@ -18,6 +18,9 @@
|
|||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="/profile">Profile</a>
|
<a class="nav-link" href="/profile">Profile</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/logout">Logout</a>
|
||||||
|
</li>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|||||||
@@ -18,6 +18,9 @@
|
|||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="/profile">Profile</a>
|
<a class="nav-link" href="/profile">Profile</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/logout">Logout</a>
|
||||||
|
</li>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
@@ -117,7 +120,6 @@
|
|||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
"scenario_type": "offensive",
|
"scenario_type": "offensive",
|
||||||
"user_input": value,
|
"user_input": value,
|
||||||
"scenario": document.getElementById('scenario-label').textContent.replace('Scenario: ', '').replace('Scenario:', '').trim()
|
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -126,10 +128,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
const convinced = "No";
|
var convinced = "No";
|
||||||
|
|
||||||
if (data["convinced"]) {
|
if (data["convinced"]) {
|
||||||
const convinced = "Yes";
|
convinced = "Yes";
|
||||||
}
|
}
|
||||||
|
|
||||||
const narratorText = `
|
const narratorText = `
|
||||||
|
|||||||
@@ -18,6 +18,9 @@
|
|||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link active" aria-current="page" href="/profile">Profile</a>
|
<a class="nav-link active" aria-current="page" href="/profile">Profile</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/logout">Logout</a>
|
||||||
|
</li>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|||||||
Reference in New Issue
Block a user