Skip to content

Commit

Permalink
Merge pull request #19 from Manifest-Holdings/next
Browse files Browse the repository at this point in the history
email/models/proxy Next => Prod
  • Loading branch information
odilitime authored Feb 25, 2025
2 parents 4e6262e + 1d7cd15 commit 068597c
Show file tree
Hide file tree
Showing 9 changed files with 190 additions and 134 deletions.
2 changes: 1 addition & 1 deletion packages/client-discord/src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,7 @@ export class MessageManager {
const response = await generateShouldRespond({
runtime: this.runtime,
context: shouldRespondContext,
modelClass: ModelClass.LARGE,
modelClass: ModelClass.SMALL,
});

if (response === "RESPOND") {
Expand Down
2 changes: 1 addition & 1 deletion packages/client-discord/src/voice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ export class VoiceManager extends EventEmitter {
const response = await generateShouldRespond({
runtime: this.runtime,
context: shouldRespondContext,
modelClass: ModelClass.LARGE,
modelClass: ModelClass.SMALL,
});

if (response === "RESPOND") {
Expand Down
2 changes: 1 addition & 1 deletion packages/client-telegram/src/messageManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ export class MessageManager {
const response = await generateShouldRespond({
runtime: this.runtime,
context: shouldRespondContext,
modelClass: ModelClass.LARGE,
modelClass: ModelClass.SMALL,
});

return response === "RESPOND";
Expand Down
7 changes: 3 additions & 4 deletions packages/client-twitter/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
} from "agent-twitter-client";
import { EventEmitter } from "events";
import type { TwitterConfig } from "./environment.ts";
import { Agent, fetch, ProxyAgent, setGlobalDispatcher } from "undici";
import { Agent, fetch as undiciFetch, ProxyAgent, setGlobalDispatcher } from "undici";

export function extractAnswer(text: string): string {
const startIndex = text.indexOf("Answer: ") + 8;
Expand Down Expand Up @@ -120,7 +120,6 @@ function doLogin(username, cb, proxyUrl?: string, localAddress?: string) {
`${username}:${password}`
).toString("base64")}`;
}

proxyAgent = new ProxyAgent(agentOptions);
}
if (localAddress) {
Expand All @@ -131,10 +130,10 @@ function doLogin(username, cb, proxyUrl?: string, localAddress?: string) {
}
try {
const twitterClient = new Scraper({
fetch: fetch,
fetch: undiciFetch,
transform: {
request: (input: any, init: any) => {
if (agent) {
if (proxyAgent || agent) {
return [
input,
{ ...init, dispatcher: proxyAgent ?? agent },
Expand Down
4 changes: 2 additions & 2 deletions packages/client-twitter/src/interactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ export class TwitterInteractionClient {
const shouldRespond = await generateShouldRespond({
runtime: this.runtime,
context: shouldRespondContext,
modelClass: ModelClass.LARGE,
modelClass: ModelClass.SMALL,
});

// Promise<"RESPOND" | "IGNORE" | "STOP" | null> {
Expand Down Expand Up @@ -693,4 +693,4 @@ export class TwitterInteractionClient {

return thread;
}
}
}
2 changes: 1 addition & 1 deletion packages/client-twitter/src/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ export class TwitterPostClient {
const actionResponse = await generateTweetActions({
runtime: this.runtime,
context: actionContext,
modelClass: ModelClass.LARGE,
modelClass: ModelClass.SMALL,
});

if (!actionResponse) {
Expand Down
Loading

0 comments on commit 068597c

Please sign in to comment.