Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

KeyError: 'adaptiveCards' #7

Closed
dblacknc opened this issue May 8, 2023 · 9 comments
Closed

KeyError: 'adaptiveCards' #7

dblacknc opened this issue May 8, 2023 · 9 comments

Comments

@dblacknc
Copy link

dblacknc commented May 8, 2023

I have this model loaded if it matters: MetaIX/Alpaca-30B-Int4-Safetensors
...with oobabooga updated today with a git pull, and EdgeGPT the same.

I first enabled Bing output to console in your extension. First prompt was "Hey Bing, what's the current date?"
That worked as expected:

Bing:Hello, this is Bing. The current date is Monday, May 8th, 2023. 😊

Monday, May 8th, 2023

I changed the activation word to just "Bing" and used this for the second prompt:
"Bing what's the current price of gas in Florida?"

There was no output in the UI. Here's what was logged on the console:

Output generated in 10.23 seconds (1.37 tokens/s, 14 tokens, context 162, seed 886148442) Traceback (most recent call last): File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/gradio/routes.py", line 393, in run_predict output = await app.get_blocks().process_api( File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/gradio/blocks.py", line 1108, in process_api result = await self.call_function( File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/gradio/blocks.py", line 929, in call_function prediction = await anyio.to_thread.run_sync( File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run result = context.run(func, *args) File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/gradio/utils.py", line 490, in async_iteration return next(iterator) File "/root/text-generation-webui/modules/chat.py", line 253, in cai_chatbot_wrapper for history in chatbot_wrapper(text, state): File "/root/text-generation-webui/modules/chat.py", line 180, in chatbot_wrapper prompt = apply_extensions('custom_generate_chat_prompt', text, state, **kwargs) File "/root/text-generation-webui/modules/extensions.py", line 132, in apply_extensions return EXTENSION_MAP[typ](*args, **kwargs) File "/root/text-generation-webui/modules/extensions.py", line 84, in _apply_custom_generate_chat_prompt return custom_generate_chat_prompt(text, state, **kwargs) File "/root/text-generation-webui/extensions/EdgeGPT/script.py", line 168, in custom_generate_chat_prompt asyncio.run(EdgeGPT()) File "/root/miniconda3/envs/textgen/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/root/miniconda3/envs/textgen/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete return future.result() File "/root/text-generation-webui/extensions/EdgeGPT/script.py", line 157, in EdgeGPT response = await bot.ask(prompt=UserInput, conversation_style=ConversationStyle.creative) File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/EdgeGPT.py", line 633, in ask async for final, response in self.chat_hub.ask_stream( File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/EdgeGPT.py", line 523, in ask_stream resp_txt = result_text+response["arguments"][0]["messages"][0][ KeyError: 'adaptiveCards'
@dblacknc
Copy link
Author

dblacknc commented May 8, 2023

I'll add that I re-loaded the UI and model and basically tried this again. It worked the second time.

@GiusTex
Copy link
Owner

GiusTex commented May 8, 2023

The second time did the "Bing" word work ? I don't remember if I had to close the webui to save the changes, I don't think so, but maybe sometimes it's needed. When I'm at home I'll try replicating the issue

@GiusTex
Copy link
Owner

GiusTex commented May 8, 2023

  • How did you install the webui ? (An old and working one-click installer, manually cloning the repo and installing dependencies with Conda, ecc...)
  • Do you start the webui with some arguments? (From the old "start-webui.bat", or from the python script)
  • Are you using other extensions, do they work, does EdgeGPT work without them?

I updated the webui (I'm using an old version built with a one-click installer), and it works for me, both with Hey Bing and with a custom word without restarting the webui, you must have something different from my setup, maybe in the questions above. One of these days I'll also try installing again the webui, I tried in the past but I always got errors; a fresh install could help finding errors

@dblacknc
Copy link
Author

dblacknc commented May 8, 2023

This is on Ubuntu 22.04.

  1. Installed manually with conda, perhaps a month ago. I do a git pull every day or two. Every other feature/extension I've tested seems to be working well.
  2. python server.py --chat --verbose --listen --listen-port 80 --auto-devices --extensions EdgeGPT --gpu-memory 11 11 --rwkv-cuda-on
  3. I'm using long_term_memory too and at one point tried them together. That seems to make no difference.

@GiusTex
Copy link
Owner

GiusTex commented May 8, 2023

Can you try without --listen --listen-port 80 ? I can't use it but maybe as it doesn't work outside chat mode maybe it doesn't work with listen too

@Simplegram
Copy link

Hello. I have the same issue and removing --listen seems to work, not consistently though. I still got KeyError: 'adaptiveCards' with less frequency every time I tried Hey Bing.

@GiusTex
Copy link
Owner

GiusTex commented May 28, 2023

  • What are your starting arguments ? (--chat, --model-menu, etc)
  • Do you have an error log ?
  • Have you updated the webui (just in case) and the extension script?

@Simplegram
Copy link

  • What are your starting arguments ? (--chat, --model-menu, etc)

    • Do you have an error log ?

    • Have you updated the webui (just in case) and the extension script?

Hmm, I think the latest 0.6.8 EdgeGPT extenstion update solved it. I have another issue in #12.

@GiusTex
Copy link
Owner

GiusTex commented Jun 2, 2023

I can't replicate the issue, and I updated the extension too, if one get the same error he can open the issue again

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants