Skip to content

Commit

Permalink
Merge pull request #405 from ai16z/twitter-client
Browse files Browse the repository at this point in the history
fix: console
  • Loading branch information
lalalune authored Nov 18, 2024
2 parents e8353b1 + 1e5dc87 commit 80a1b0c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions packages/client-twitter/src/interactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ export class TwitterInteractionClient extends ClientBase {
);

const thread = await buildConversationThread(tweet, this);
console.log("thread", thread);

const message = {
content: { text: tweet.text },
Expand Down Expand Up @@ -317,7 +316,7 @@ export class TwitterInteractionClient extends ClientBase {
const shouldRespond = await generateShouldRespond({
runtime: this.runtime,
context: shouldRespondContext,
modelClass: ModelClass.LARGE,
modelClass: ModelClass.MEDIUM,
});

// Promise<"RESPOND" | "IGNORE" | "STOP" | null> {
Expand Down Expand Up @@ -474,14 +473,14 @@ export class TwitterInteractionClient extends ClientBase {
}

if (visited.has(currentTweet.id)) {
console.log("Already visited tweet:", currentTweet.id);
elizaLogger.log("Already visited tweet:", currentTweet.id);
return;
}

visited.add(currentTweet.id);
thread.unshift(currentTweet);

console.log("Current thread state:", {
elizaLogger.debug("Current thread state:", {
length: thread.length,
currentDepth: depth,
tweetId: currentTweet.id,
Expand Down Expand Up @@ -523,7 +522,7 @@ export class TwitterInteractionClient extends ClientBase {
// Need to bind this context for the inner function
await processThread.bind(this)(tweet, 0);

console.log("Final thread built:", {
elizaLogger.debug("Final thread built:", {
totalTweets: thread.length,
tweetIds: thread.map((t) => ({
id: t.id,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const models: Models = {
model: {
[ModelClass.SMALL]: "claude-3-5-haiku-20241022",
[ModelClass.MEDIUM]: "claude-3-5-sonnet-20241022",
[ModelClass.LARGE]: "claude-3-opus-20240229",
[ModelClass.LARGE]: "claude-3-5-sonnet-20241022",
},
},
[ModelProviderName.CLAUDE_VERTEX]: {
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

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

0 comments on commit 80a1b0c

Please sign in to comment.