Skip to content

Commit

Permalink
Merge pull request #1577 from cmadaanaya/evelyn
Browse files Browse the repository at this point in the history
fix: activate web-search plugin in agents/
  • Loading branch information
shakkernerd authored Jan 2, 2025
2 parents eaceb68 + 7290698 commit f5c3dab
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 58 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ TOGETHER_API_KEY=
# Server Configuration
SERVER_PORT=3000

# Web Search Config
ENABLE_WEBSEARCH=false # boolean value, defaults to false

# Abstract Configuration
ABSTRACT_ADDRESS=
ABSTRACT_PRIVATE_KEY=
Expand Down
114 changes: 57 additions & 57 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
node_modules
/out

.env
.env.production
.env.local
.env_main
concatenated-output.ts
embedding-cache.json
packages/plugin-buttplug/intiface-engine

.idea
.DS_Store

dist/
# Allow models directory but ignore model files
models/*.gguf

cookies.json

db.sqlite
searches/
tweets/

*.gguf
*.onnx
*.wav
*.mp3

logs/

test-report.json
content_cache/
test_data/
tokencache/
tweetcache/
twitter_cookies.json
timeline_cache.json

*.sqlite

characters/

packages/core/src/providers/cache
packages/core/src/providers/cache/*
cache/*
packages/plugin-coinbase/src/plugins/transactions.csv

tsup.config.bundled_*.mjs

.turbo
.cursorrules

coverage
.eslintcache

agent/content
node_modules
/out

.env
.env.production
.env.local
.env_main
concatenated-output.ts
embedding-cache.json
packages/plugin-buttplug/intiface-engine

.idea
.DS_Store

dist/
# Allow models directory but ignore model files
models/*.gguf

cookies.json

db.sqlite
searches/
tweets/

*.gguf
*.onnx
*.wav
*.mp3

logs/

test-report.json
content_cache/
test_data/
tokencache/
tweetcache/
twitter_cookies.json
timeline_cache.json

*.sqlite

characters/

packages/core/src/providers/cache
packages/core/src/providers/cache/*
cache/*
packages/plugin-coinbase/src/plugins/transactions.csv

tsup.config.bundled_*.mjs

.turbo
.cursorrules

coverage
.eslintcache

agent/content
1 change: 1 addition & 0 deletions agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"@elizaos/plugin-3d-generation": "workspace:*",
"@elizaos/plugin-fuel": "workspace:*",
"@elizaos/plugin-avalanche": "workspace:*",
"@elizaos/plugin-web-search": "workspace:*",
"readline": "1.3.0",
"ws": "8.18.0",
"yargs": "17.7.2"
Expand Down
6 changes: 6 additions & 0 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { LensAgentClient } from "@elizaos/client-lens";
import { SlackClientInterface } from "@elizaos/client-slack";
import { TelegramClientInterface } from "@elizaos/client-telegram";
import { TwitterClientInterface } from "@elizaos/client-twitter";
import { webSearchPlugin } from "@elizaos/plugin-web-search";
import {
AgentRuntime,
CacheManager,
Expand All @@ -26,6 +27,7 @@ import {
CacheStore,
Client,
ICacheManager,
parseBooleanFromText,
} from "@elizaos/core";
import { RedisClient } from "@elizaos/adapter-redis";
import { zgPlugin } from "@elizaos/plugin-0g";
Expand Down Expand Up @@ -521,6 +523,10 @@ export async function createAgent(
// character.plugins are handled when clients are added
plugins: [
bootstrapPlugin,
parseBooleanFromText(getSecret(character, "ENABLE_WEBSEARCH")) ===
true
? webSearchPlugin
: null,
getSecret(character, "CONFLUX_CORE_PRIVATE_KEY")
? confluxPlugin
: null,
Expand Down
2 changes: 1 addition & 1 deletion packages/client-twitter/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ export class ClientBase extends EventEmitter {
// Sometimes this fails because we are rate limited. in this case, we just need to return an empty array
// if we dont get a response in 5 seconds, something is wrong
const timeoutPromise = new Promise((resolve) =>
setTimeout(() => resolve({ tweets: [] }), 10000)
setTimeout(() => resolve({ tweets: [] }), 15000)
);

try {
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit f5c3dab

Please sign in to comment.