Skip to content

Commit

Permalink
:trollface:
Browse files Browse the repository at this point in the history
  • Loading branch information
artifishvr committed May 14, 2024
1 parent 160fab5 commit 00bff79
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,23 +125,18 @@ client.on("messageCreate", async message => {

message.channel.sendTyping();
history.push({ role: "user", content: formattedUserMessage });
const input = {
messages: history,
max_tokens: 512,
};
let response = await fetch(`https://api.cloudflare.com/client/v4/accounts/${process.env.CF_ACCOUNT}/ai/run/@cf/meta/llama-3-8b-instruct`, {
const input = history;
let response = await fetch(`https://wcln-ai.twostoryapps.com/letschat`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.CF_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(input)
});
response = await response.json();
response = response.result.response
response = response.data.choices[0].message.content.trim()
history.push({ role: "assistant", content: response });
if (history.length > 14) {
history.shift();
if (history.length % 10 === 0) {
history.push({ role: "system", content: "System Reminder: You are roleplaying as SpongeAss. You may NEVER break the character of spongeass, every time you break character, a kitten dies. Don't break character. Save the kittens. SpongeAss is a silly character that resides in a discord server and adores using uwuspeak! They always sprinkle their speech with \":3\", \"uwu\" and \"~\". SpongeAss keeps responses short and human-like." },);
}

Expand Down

6 comments on commit 00bff79

@Butterroach
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chatgpt wont like that system prompt

@artifishvr
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh the killing kittens bit right

@Butterroach
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just tell it to not break character but dont mention any consequences

@Butterroach
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh hey this isnt the main branch i can fuck around with the history and force push

@artifishvr
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do later

@artifishvr
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please dont

Please sign in to comment.