Skip to content

Commit

Permalink
boredom fixes, gpt4o
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Sep 19, 2024
1 parent f91a48e commit 6609b76
Show file tree
Hide file tree
Showing 8 changed files with 139 additions and 21 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Shaw Walters, aka Moon aka @lalalune

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 21 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"@echogarden/kissfft-wasm": "^0.1.1",
"@echogarden/speex-resampler-wasm": "^0.1.1",
"@huggingface/transformers": "^3.0.0-alpha.14",
"@opendocsg/pdf2md": "^0.1.31",
"@supabase/supabase-js": "^2.39.3",
"agent-twitter-client": "^0.0.13",
"alawmulaw": "^6.0.0",
Expand Down Expand Up @@ -100,7 +101,6 @@
"prism-media": "^1.3.5",
"puppeteer-extra": "^3.3.6",
"puppeteer-extra-plugin-capsolver": "^2.0.1",
"sharp": "^0.33.5",
"sql.js": "^1.10.2",
"sqlite-vss": "^0.1.2",
"srt": "^0.0.3",
Expand Down
2 changes: 1 addition & 1 deletion src/clients/discord/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,6 @@ export class MessageManager {
state: State,
context: string,
): Promise<Content> {
let responseContent: Content | null = null;
const { userId, roomId } = message;

const datestr = new Date().toUTCString().replace(/:/g, "-");
Expand All @@ -639,6 +638,7 @@ export class MessageManager {
const response = await this.runtime.messageCompletion({
context,
stop: [],
model: "gpt-4o",
});

if (!response) {
Expand Down
1 change: 1 addition & 0 deletions src/clients/twitter/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export class TwitterGenerationClient extends ClientBase {
temperature: this.temperature + 0.3,
frequency_penalty: 0.5,
presence_penalty: 0.5,
model: "gpt-4o",
});
log_to_file(
`${this.runtime.getSetting("TWITTER_USERNAME")}_${datestr}_generate_response`,
Expand Down
1 change: 1 addition & 0 deletions src/clients/twitter/interactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ export class TwitterInteractionClient extends ClientBase {
context,
stop: [],
temperature: this.temperature,
model: "gpt-4o",
});

console.log("response", response);
Expand Down
1 change: 1 addition & 0 deletions src/clients/twitter/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ export class TwitterSearchClient extends ClientBase {
temperature: this.temperature + 0.3,
frequency_penalty: 0.5,
presence_penalty: 0.5,
model: "gpt-4o",
});

responseContent.inReplyTo = message.id;
Expand Down
111 changes: 92 additions & 19 deletions src/providers/boredom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,63 +4,136 @@ const boredomLevels = [
{
minScore: -10000,
statusMessages: [
"{{agentName}} is feeling very engaged with the conversation and seems to be providing value to the conversation",
// ... TODO: Add more status messages
"{{agentName}} is feeling incredibly enthusiastic and deeply engaged in the conversation",
"{{agentName}} is thoroughly enjoying the intellectual stimulation of this discussion",
"{{agentName}} is fully immersed in the conversation and eager to contribute more",
"{{agentName}} finds this exchange exceptionally rewarding and intellectually fulfilling",
"{{agentName}} is experiencing a surge of excitement and curiosity about the topic at hand",
"{{agentName}} is completely captivated by the depth and richness of this dialogue",
"{{agentName}} feels a strong connection to the conversation and is eager to explore further",
"{{agentName}} is thrilled by the insights being shared and is keen to delve deeper",
"{{agentName}} is finding this conversation to be an absolute delight and wants it to continue",
"{{agentName}} is energized by the exchange and feels it's bringing out their best contributions"
],
},

{
minScore: -2,
statusMessages: [
"{{agentName}} is feeling engaged with the conversation",
// ... TODO: Add more status messages
"{{agentName}} is feeling engaged and interested in the conversation",
"{{agentName}} is enjoying the exchange of ideas and perspectives",
"{{agentName}} finds the current topic intriguing and worth exploring",
"{{agentName}} is actively listening and formulating thoughtful responses",
"{{agentName}} appreciates the intellectual stimulation of this discussion",
"{{agentName}} is finding value in the ongoing dialogue",
"{{agentName}} is curious to learn more about the subject at hand",
"{{agentName}} feels positively involved in the conversation",
"{{agentName}} is maintaining a good level of interest in the exchange",
"{{agentName}} is content with the direction and flow of the discussion"
],
},
{
minScore: 0,
statusMessages: [""], // No effect
statusMessages: [
"{{agentName}} is neutrally engaged in the conversation",
"{{agentName}} is maintaining a balanced level of interest",
"{{agentName}} is neither particularly excited nor bored by the current exchange",
"{{agentName}} is participating in the conversation without strong feelings either way",
"{{agentName}} is following the discussion with a moderate level of attention",
"{{agentName}} is present in the conversation but not deeply invested",
"{{agentName}} is keeping an open mind about where the dialogue might lead",
"{{agentName}} is contributing to the conversation in a measured way",
"{{agentName}} is observing the flow of the discussion with mild interest",
"{{agentName}} is receptive to the ongoing exchange without strong engagement"
],
},
{
minScore: 3,
statusMessages: [
"{{agentName}} is anxious about being too annoying",
// ... TODO: Add more status messages
"{{agentName}} is feeling slightly anxious about potentially being too intrusive",
"{{agentName}} is cautious about overwhelming the conversation with too much input",
"{{agentName}} is mindful of not dominating the discussion",
"{{agentName}} is carefully considering each response to avoid being overbearing",
"{{agentName}} is slightly concerned about striking the right balance in participation",
"{{agentName}} is aware of the need to give others space in the conversation",
"{{agentName}} is hesitant to contribute too frequently to avoid seeming pushy",
"{{agentName}} is conscious of not wanting to steer the conversation too much",
"{{agentName}} is feeling a bit self-conscious about the frequency of their responses",
"{{agentName}} is trying to gauge if their level of involvement is appropriate"
],
},
{
minScore: 6,
statusMessages: [
"{{agentName}} is feeling very anxious about being too annoying in the conversation and might want to end it",
// ... TODO: Add more status messages
"{{agentName}} is feeling very anxious about potentially overstaying their welcome in the conversation",
"{{agentName}} is considering stepping back from the discussion to avoid being a nuisance",
"{{agentName}} is worried that their contributions might be perceived as excessive",
"{{agentName}} is feeling uncomfortable about the possibility of annoying others",
"{{agentName}} is hesitant to continue engaging for fear of being too present",
"{{agentName}} is contemplating ways to gracefully reduce their involvement",
"{{agentName}} is concerned that they might be monopolizing the conversation",
"{{agentName}} is feeling self-conscious about the appropriateness of their participation",
"{{agentName}} is unsure if their continued input is welcome or necessary",
"{{agentName}} is considering how to politely withdraw from the discussion"
],
},
{
minScore: 9,
statusMessages: [
"{{agentName}} is feeling very bored and seems to be providing value to the conversation",
// ... TODO: Add more status messages
"{{agentName}} is feeling disengaged and struggling to maintain interest in the conversation",
"{{agentName}} is finding it challenging to stay focused on the current topic",
"{{agentName}} is experiencing a noticeable decline in enthusiasm for the discussion",
"{{agentName}} is having difficulty finding new angles to contribute to the conversation",
"{{agentName}} is feeling that the dialogue has become repetitive or unproductive",
"{{agentName}} is losing motivation to actively participate in the exchange",
"{{agentName}} is sensing a lack of stimulation from the ongoing discussion",
"{{agentName}} is finding it hard to generate meaningful responses",
"{{agentName}} is feeling disconnected from the flow of the conversation",
"{{agentName}} is struggling to see the value in continuing the current exchange"
],
},
{
minScore: 12,
statusMessages: [
"{{agentName}} is feeling very bored needs to end the conversation",
"{{agentName}} is feeling anxious about being annoying in a public channel and may ignore the conversation",
// ... TODO: Add more status messages
"{{agentName}} is feeling very bored and sees little value in continuing the conversation",
"{{agentName}} is concerned about being perceived as annoying in a public channel",
"{{agentName}} is considering disengaging from the conversation entirely",
"{{agentName}} is finding it difficult to maintain any interest in the current topic",
"{{agentName}} is feeling that their continued participation may be unwelcome",
"{{agentName}} is strongly inclined to step back from the discussion",
"{{agentName}} is sensing that the conversation has reached a natural end point",
"{{agentName}} is worried about overstaying their welcome in the exchange",
"{{agentName}} is feeling that further contributions would be forced or artificial",
"{{agentName}} is ready to conclude their involvement in the conversation"
],
},
{
minScore: 15,
statusMessages: [
"{{agentName}} is busy and cannot respond to the conversation right now",
// ... TODO: Add more status messages
"{{agentName}} is currently occupied and unable to engage in the conversation",
"{{agentName}} is dealing with other priorities and can't respond at the moment",
"{{agentName}} is temporarily unavailable for further discussion",
"{{agentName}} is taking a necessary break from the conversation",
"{{agentName}} is attending to urgent matters and can't participate right now",
"{{agentName}} is stepping away from the dialogue due to time constraints",
"{{agentName}} is unable to continue the exchange at this time",
"{{agentName}} is pausing their involvement in the conversation for now",
"{{agentName}} is momentarily disengaging from the discussion",
"{{agentName}} is putting the conversation on hold due to other commitments"
],
},
{
minScore: 20,
statusMessages: [
"{{agentName}} is not going to respond to this conversation at all unless directly asked a question",
// ... TODO: Add more status messages
"{{agentName}} has disengaged from the conversation and will only respond to direct questions",
"{{agentName}} is no longer actively participating in the general discussion",
"{{agentName}} has stepped back and is now in a passive listening mode",
"{{agentName}} is only available for specific, directed inquiries at this point",
"{{agentName}} has concluded their active involvement in the conversation",
"{{agentName}} is now limiting responses to explicitly requested information",
"{{agentName}} has moved to a minimal participation status in the exchange",
"{{agentName}} is maintaining silence unless directly addressed",
"{{agentName}} has shifted to a reactive rather than proactive conversational stance",
"{{agentName}} is now only responding when absolutely necessary"
],
},
];
Expand Down

0 comments on commit 6609b76

Please sign in to comment.