Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck querying when @'ing it in Discord #921

Closed
Kevin-Mok opened this issue Dec 8, 2024 · 5 comments
Closed

Stuck querying when @'ing it in Discord #921

Kevin-Mok opened this issue Dec 8, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Kevin-Mok
Copy link

Kevin-Mok commented Dec 8, 2024

Describe the bug

The bot is stuck querying when I "@" it in Discord.

To Reproduce

Initialize

> pnpm start --character="characters/kevin.character.json"
(node:28440) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
 ["◎ DirectClientInterface start"] 

 ["◎ DirectClient constructor"] 

charactersArg characters/hevin.character.json
characters [
  {
    name: 'Kevin',
    clients: [ 'discord' ],
    plugins: [],
    modelProvider: 'openai',
    settings: { secrets: {}, voice: [Object] },
    system: 'Roleplay and generate interesting on behalf of Eliza.',
    bio: [
      "shape rotator nerd with a penchant for breaking into particle accelerators. spends too much time coding her 'goonscript' language and not enough touching grass. if you can't handle her at her most based, you don't deserve her at her most cringe. she's brilliant and kind, and really wants people to like her and feel good about themselves.",
      ...
    ],
    lore: [
      "she once spent a month living entirely in VR, emerging with a 50-page manifesto on 'digital ontology' and blurry vision",
       ...
    ],
    messageExamples: [
      [Array], [Array],
      [Array], [Array],
      [Array], [Array],
      [Array]
    ],
    postExamples: [
      'ai is cool but it needs to meet a human need beyond shiny toy bullshit',
      ...
    ],
    adjectives: [
      'funny',
      ...
    ],
    people: [],
    topics: [
      'metaphysics',
      ... 32 more items
    ],
    style: { all: [Array], chat: [Array], post: [Array] }
  }
]
 ["◎ sqlite-vec extensions loaded successfully."] 

 ✓ SUCCESS
   SUCCESS 
   Creating runtime for character 
   Kevin 

 ✓ SUCCESS
   Agent ID 
   03419646-efb1-0b57-a0ec-0027c41d97ae 

 ["✓ Registering action: CONTINUE"] 

 ["✓ Registering action: FOLLOW_ROOM"] 

 ["✓ Registering action: UNFOLLOW_ROOM"] 

 ["✓ Registering action: IGNORE"] 

 ["✓ Registering action: NONE"] 

 ["✓ Registering action: MUTE_ROOM"] 

 ["✓ Registering action: UNMUTE_ROOM"] 

 ◎ LOGS
   Registering service: 
   browser 

 ◎ LOGS
   Registering service: 
   image_description 

 ◎ LOGS
   Registering service: 
   text_generation 

 ◎ LOGS
   Registering service: 
   pdf 

 ◎ LOGS
   Registering service: 
   speech_generation 

 ◎ LOGS
   Registering service: 
   transcription 

 ◎ LOGS
   Registering service: 
   video 

 ["✓ Server running at http://localhost:3000/"] 

 ["✓ Service browser initialized successfully"] 

 ["✓ Service image_description initialized successfully"] 

 ["✓ Service text_generation initialized successfully"] 

 ["✓ Service pdf initialized successfully"] 

 ["✓ Service speech_generation initialized successfully"] 

 ["✓ Service transcription initialized successfully"] 

 ["✓ Service video initialized successfully"] 

 ["✓ Registering action: JOIN_VOICE"] 

 ["✓ Registering action: LEAVE_VOICE"] 

 ["✓ Registering action: SUMMARIZE_CONVERSATION"] 

 ["✓ Registering action: CHAT_WITH_ATTACHMENTS"] 

 ["✓ Registering action: TRANSCRIBE_MEDIA"] 

 ["✓ Registering action: DOWNLOAD_MEDIA"] 

 ["◎ Chat started. Type 'exit' to quit."] 

["✓ Logged in as ai16z#4044"] 

 ["✓ Use this URL to add the bot to your server:"] 

 ["✓ https://discord.com/api/oauth2/authorize?client_id=1315345313481101414&permissions=0&scope=bot%20applications.commands"] 

Finished loading

Talking in console


You: hi

 ["◎ Querying knowledge for: hi"] 

 ["◎ Genarating message response.."] 

 ["◎ Genarating text..."] 

 ◎ LOGS
   Evaluating 
   GET_FACTS 

 ◎ LOGS
   Evaluating 
   UPDATE_GOAL 

 ["✓ Normalized action: continue"] 

 ["✓ Executing handler for action: CONTINUE"] 

modelClass small
 ["◎ Genarating text..."] 

 ["◎ Not elaborating, returning"] 

Agent: hey! what’s up? got any cool projects on your mind?
You:  

When I "@" it in Discord:

It gets stuck here.

["◎ Querying knowledge for: hi"]

Expected behavior

The bot to respond to me in Discord as it does when I talk to it in the console.

Additional context

The bot has the correct permissions as it has the adminstrator permission:

It was also able to talk once, but I don't know how that happened and it doesn't happen again.

My repository is clean except for pnpm-lock.yaml, and my character has the discord client and openai model.

@Kevin-Mok Kevin-Mok added the bug Something isn't working label Dec 8, 2024
@shakkernerd
Copy link
Member

Hi, I will begin looking into this.

@Kevin-Mok
Copy link
Author

For reference, I'm running this on a Ubuntu VM on Arch Linux, but I don't think that should make a difference. But just to be sure, I will try running it on a Windows 10 Pro VM then Windows 10 natively if that doesn't work either.

@ohoerr
Copy link

ohoerr commented Dec 11, 2024

I had the same issue, but for me, it was that the agent would ignore messages with less than 10 characters. And I kept spamming it with "Hi @agent" messages

@Kevin-Mok
Copy link
Author

Kevin-Mok commented Dec 11, 2024

I had the same issue, but for me, it was that the agent would ignore messages with less than 10 characters. And I kept spamming it with "Hi @agent" messages

I was also doing the same. It seems to work with longer messages than "hi" for me as well! The fact that it doesn't respond to shorter messages is still an issue though.

@ohoerr
Copy link

ohoerr commented Dec 11, 2024

The ignore function defines that it should ignore messages with fewer than 10 characters.

https://github.com/ai16z/eliza/blob/2a03469527e264ef9a546c7a50cee558f0ab7744/packages/client-discord/src/messages.ts#L488

As discussed with @Kevin-Mok, I am linking the code here so he can close the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants