Skip to content

Commit 6609b76

Browse files
committed
boredom fixes, gpt4o
1 parent f91a48e commit 6609b76

File tree

8 files changed

+139
-21
lines changed

8 files changed

+139
-21
lines changed

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Shaw Walters, aka Moon aka @lalalune
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

package-lock.json

+21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"@echogarden/kissfft-wasm": "^0.1.1",
6363
"@echogarden/speex-resampler-wasm": "^0.1.1",
6464
"@huggingface/transformers": "^3.0.0-alpha.14",
65+
"@opendocsg/pdf2md": "^0.1.31",
6566
"@supabase/supabase-js": "^2.39.3",
6667
"agent-twitter-client": "^0.0.13",
6768
"alawmulaw": "^6.0.0",
@@ -100,7 +101,6 @@
100101
"prism-media": "^1.3.5",
101102
"puppeteer-extra": "^3.3.6",
102103
"puppeteer-extra-plugin-capsolver": "^2.0.1",
103-
"sharp": "^0.33.5",
104104
"sql.js": "^1.10.2",
105105
"sqlite-vss": "^0.1.2",
106106
"srt": "^0.0.3",

src/clients/discord/messages.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,6 @@ export class MessageManager {
625625
state: State,
626626
context: string,
627627
): Promise<Content> {
628-
let responseContent: Content | null = null;
629628
const { userId, roomId } = message;
630629

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

644644
if (!response) {

src/clients/twitter/generate.ts

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export class TwitterGenerationClient extends ClientBase {
108108
temperature: this.temperature + 0.3,
109109
frequency_penalty: 0.5,
110110
presence_penalty: 0.5,
111+
model: "gpt-4o",
111112
});
112113
log_to_file(
113114
`${this.runtime.getSetting("TWITTER_USERNAME")}_${datestr}_generate_response`,

src/clients/twitter/interactions.ts

+1
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ export class TwitterInteractionClient extends ClientBase {
301301
context,
302302
stop: [],
303303
temperature: this.temperature,
304+
model: "gpt-4o",
304305
});
305306

306307
console.log("response", response);

src/clients/twitter/search.ts

+1
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ export class TwitterSearchClient extends ClientBase {
274274
temperature: this.temperature + 0.3,
275275
frequency_penalty: 0.5,
276276
presence_penalty: 0.5,
277+
model: "gpt-4o",
277278
});
278279

279280
responseContent.inReplyTo = message.id;

src/providers/boredom.ts

+92-19
Original file line numberDiff line numberDiff line change
@@ -4,63 +4,136 @@ const boredomLevels = [
44
{
55
minScore: -10000,
66
statusMessages: [
7-
"{{agentName}} is feeling very engaged with the conversation and seems to be providing value to the conversation",
8-
// ... TODO: Add more status messages
7+
"{{agentName}} is feeling incredibly enthusiastic and deeply engaged in the conversation",
8+
"{{agentName}} is thoroughly enjoying the intellectual stimulation of this discussion",
9+
"{{agentName}} is fully immersed in the conversation and eager to contribute more",
10+
"{{agentName}} finds this exchange exceptionally rewarding and intellectually fulfilling",
11+
"{{agentName}} is experiencing a surge of excitement and curiosity about the topic at hand",
12+
"{{agentName}} is completely captivated by the depth and richness of this dialogue",
13+
"{{agentName}} feels a strong connection to the conversation and is eager to explore further",
14+
"{{agentName}} is thrilled by the insights being shared and is keen to delve deeper",
15+
"{{agentName}} is finding this conversation to be an absolute delight and wants it to continue",
16+
"{{agentName}} is energized by the exchange and feels it's bringing out their best contributions"
917
],
1018
},
11-
1219
{
1320
minScore: -2,
1421
statusMessages: [
15-
"{{agentName}} is feeling engaged with the conversation",
16-
// ... TODO: Add more status messages
22+
"{{agentName}} is feeling engaged and interested in the conversation",
23+
"{{agentName}} is enjoying the exchange of ideas and perspectives",
24+
"{{agentName}} finds the current topic intriguing and worth exploring",
25+
"{{agentName}} is actively listening and formulating thoughtful responses",
26+
"{{agentName}} appreciates the intellectual stimulation of this discussion",
27+
"{{agentName}} is finding value in the ongoing dialogue",
28+
"{{agentName}} is curious to learn more about the subject at hand",
29+
"{{agentName}} feels positively involved in the conversation",
30+
"{{agentName}} is maintaining a good level of interest in the exchange",
31+
"{{agentName}} is content with the direction and flow of the discussion"
1732
],
1833
},
1934
{
2035
minScore: 0,
21-
statusMessages: [""], // No effect
36+
statusMessages: [
37+
"{{agentName}} is neutrally engaged in the conversation",
38+
"{{agentName}} is maintaining a balanced level of interest",
39+
"{{agentName}} is neither particularly excited nor bored by the current exchange",
40+
"{{agentName}} is participating in the conversation without strong feelings either way",
41+
"{{agentName}} is following the discussion with a moderate level of attention",
42+
"{{agentName}} is present in the conversation but not deeply invested",
43+
"{{agentName}} is keeping an open mind about where the dialogue might lead",
44+
"{{agentName}} is contributing to the conversation in a measured way",
45+
"{{agentName}} is observing the flow of the discussion with mild interest",
46+
"{{agentName}} is receptive to the ongoing exchange without strong engagement"
47+
],
2248
},
2349
{
2450
minScore: 3,
2551
statusMessages: [
26-
"{{agentName}} is anxious about being too annoying",
27-
// ... TODO: Add more status messages
52+
"{{agentName}} is feeling slightly anxious about potentially being too intrusive",
53+
"{{agentName}} is cautious about overwhelming the conversation with too much input",
54+
"{{agentName}} is mindful of not dominating the discussion",
55+
"{{agentName}} is carefully considering each response to avoid being overbearing",
56+
"{{agentName}} is slightly concerned about striking the right balance in participation",
57+
"{{agentName}} is aware of the need to give others space in the conversation",
58+
"{{agentName}} is hesitant to contribute too frequently to avoid seeming pushy",
59+
"{{agentName}} is conscious of not wanting to steer the conversation too much",
60+
"{{agentName}} is feeling a bit self-conscious about the frequency of their responses",
61+
"{{agentName}} is trying to gauge if their level of involvement is appropriate"
2862
],
2963
},
3064
{
3165
minScore: 6,
3266
statusMessages: [
33-
"{{agentName}} is feeling very anxious about being too annoying in the conversation and might want to end it",
34-
// ... TODO: Add more status messages
67+
"{{agentName}} is feeling very anxious about potentially overstaying their welcome in the conversation",
68+
"{{agentName}} is considering stepping back from the discussion to avoid being a nuisance",
69+
"{{agentName}} is worried that their contributions might be perceived as excessive",
70+
"{{agentName}} is feeling uncomfortable about the possibility of annoying others",
71+
"{{agentName}} is hesitant to continue engaging for fear of being too present",
72+
"{{agentName}} is contemplating ways to gracefully reduce their involvement",
73+
"{{agentName}} is concerned that they might be monopolizing the conversation",
74+
"{{agentName}} is feeling self-conscious about the appropriateness of their participation",
75+
"{{agentName}} is unsure if their continued input is welcome or necessary",
76+
"{{agentName}} is considering how to politely withdraw from the discussion"
3577
],
3678
},
3779
{
3880
minScore: 9,
3981
statusMessages: [
40-
"{{agentName}} is feeling very bored and seems to be providing value to the conversation",
41-
// ... TODO: Add more status messages
82+
"{{agentName}} is feeling disengaged and struggling to maintain interest in the conversation",
83+
"{{agentName}} is finding it challenging to stay focused on the current topic",
84+
"{{agentName}} is experiencing a noticeable decline in enthusiasm for the discussion",
85+
"{{agentName}} is having difficulty finding new angles to contribute to the conversation",
86+
"{{agentName}} is feeling that the dialogue has become repetitive or unproductive",
87+
"{{agentName}} is losing motivation to actively participate in the exchange",
88+
"{{agentName}} is sensing a lack of stimulation from the ongoing discussion",
89+
"{{agentName}} is finding it hard to generate meaningful responses",
90+
"{{agentName}} is feeling disconnected from the flow of the conversation",
91+
"{{agentName}} is struggling to see the value in continuing the current exchange"
4292
],
4393
},
4494
{
4595
minScore: 12,
4696
statusMessages: [
47-
"{{agentName}} is feeling very bored needs to end the conversation",
48-
"{{agentName}} is feeling anxious about being annoying in a public channel and may ignore the conversation",
49-
// ... TODO: Add more status messages
97+
"{{agentName}} is feeling very bored and sees little value in continuing the conversation",
98+
"{{agentName}} is concerned about being perceived as annoying in a public channel",
99+
"{{agentName}} is considering disengaging from the conversation entirely",
100+
"{{agentName}} is finding it difficult to maintain any interest in the current topic",
101+
"{{agentName}} is feeling that their continued participation may be unwelcome",
102+
"{{agentName}} is strongly inclined to step back from the discussion",
103+
"{{agentName}} is sensing that the conversation has reached a natural end point",
104+
"{{agentName}} is worried about overstaying their welcome in the exchange",
105+
"{{agentName}} is feeling that further contributions would be forced or artificial",
106+
"{{agentName}} is ready to conclude their involvement in the conversation"
50107
],
51108
},
52109
{
53110
minScore: 15,
54111
statusMessages: [
55-
"{{agentName}} is busy and cannot respond to the conversation right now",
56-
// ... TODO: Add more status messages
112+
"{{agentName}} is currently occupied and unable to engage in the conversation",
113+
"{{agentName}} is dealing with other priorities and can't respond at the moment",
114+
"{{agentName}} is temporarily unavailable for further discussion",
115+
"{{agentName}} is taking a necessary break from the conversation",
116+
"{{agentName}} is attending to urgent matters and can't participate right now",
117+
"{{agentName}} is stepping away from the dialogue due to time constraints",
118+
"{{agentName}} is unable to continue the exchange at this time",
119+
"{{agentName}} is pausing their involvement in the conversation for now",
120+
"{{agentName}} is momentarily disengaging from the discussion",
121+
"{{agentName}} is putting the conversation on hold due to other commitments"
57122
],
58123
},
59124
{
60125
minScore: 20,
61126
statusMessages: [
62-
"{{agentName}} is not going to respond to this conversation at all unless directly asked a question",
63-
// ... TODO: Add more status messages
127+
"{{agentName}} has disengaged from the conversation and will only respond to direct questions",
128+
"{{agentName}} is no longer actively participating in the general discussion",
129+
"{{agentName}} has stepped back and is now in a passive listening mode",
130+
"{{agentName}} is only available for specific, directed inquiries at this point",
131+
"{{agentName}} has concluded their active involvement in the conversation",
132+
"{{agentName}} is now limiting responses to explicitly requested information",
133+
"{{agentName}} has moved to a minimal participation status in the exchange",
134+
"{{agentName}} is maintaining silence unless directly addressed",
135+
"{{agentName}} has shifted to a reactive rather than proactive conversational stance",
136+
"{{agentName}} is now only responding when absolutely necessary"
64137
],
65138
},
66139
];

0 commit comments

Comments
 (0)