GiusTex / EdgeGPT

Extension for Text Generation Webui based on EdgeGPT, a reverse engineered API of Microsoft's Bing Chat AI
125 stars 5 forks source link

chat_prompt_size error #18

Closed PlazmaMamba closed 1 year ago

PlazmaMamba commented 1 year ago

When trying to run the extension, i get the following errors, could you help me fix them. Also sorry if the formatting is weird this is my first time using github issues. Traceback (most recent call last): File "C:\Users\s6800\Desktop\oobabooga_windows\installer_files\env\lib\site-packages\gradio\routes.py", line 427, in run_predict output = await app.get_blocks().process_api( File "C:\Users\s6800\Desktop\oobabooga_windows\installer_files\env\lib\site-packages\gradio\blocks.py", line 1323, in process_api result = await self.call_function( File "C:\Users\s6800\Desktop\oobabooga_windows\installer_files\env\lib\site-packages\gradio\blocks.py", line 1067, in call_function prediction = await utils.async_iteration(iterator) File "C:\Users\s6800\Desktop\oobabooga_windows\installer_files\env\lib\site-packages\gradio\utils.py", line 336, in async_iteration return await iterator.__anext__() File "C:\Users\s6800\Desktop\oobabooga_windows\installer_files\env\lib\site-packages\gradio\utils.py", line 329, in __anext__ return await anyio.to_thread.run_sync( File "C:\Users\s6800\Desktop\oobabooga_windows\installer_files\env\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\s6800\Desktop\oobabooga_windows\installer_files\env\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "C:\Users\s6800\Desktop\oobabooga_windows\installer_files\env\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run result = context.run(func, *args) File "C:\Users\s6800\Desktop\oobabooga_windows\installer_files\env\lib\site-packages\gradio\utils.py", line 312, in run_sync_iterator_async return next(iterator) File "C:\Users\s6800\Desktop\oobabooga_windows\text-generation-webui\modules\chat.py", line 299, in generate_chat_reply_wrapper for i, history in enumerate(generate_chat_reply(text, shared.history, state, regenerate, _continue, loading_message=True)): File "C:\Users\s6800\Desktop\oobabooga_windows\text-generation-webui\modules\chat.py", line 284, in generate_chat_reply for history in chatbot_wrapper(text, history, state, regenerate=regenerate, _continue=_continue, loading_message=loading_message): File "C:\Users\s6800\Desktop\oobabooga_windows\text-generation-webui\modules\chat.py", line 201, in chatbot_wrapper prompt = apply_extensions('custom_generate_chat_prompt', text, state, **kwargs) File "C:\Users\s6800\Desktop\oobabooga_windows\text-generation-webui\modules\extensions.py", line 193, in apply_extensions return EXTENSION_MAP[typ](*args, **kwargs) File "C:\Users\s6800\Desktop\oobabooga_windows\text-generation-webui\modules\extensions.py", line 80, in _apply_custom_generate_chat_prompt return extension.custom_generate_chat_prompt(text, state, **kwargs) File "C:\Users\s6800\Desktop\oobabooga_windows\text-generation-webui\extensions\EdgeGPT\script.py", line 135, in custom_generate_chat_prompt max_length = min(get_max_prompt_length(state), state['chat_prompt_size']) KeyError: 'chat_prompt_size'

GiusTex commented 1 year ago

The extension uses the webui's text generation code, probably I need to update it, some time has passed. I'll update it in these days (I have some exams, sorry)

GiusTex commented 1 year ago

Done, update (git pull) the extension and tell me if it works

PlazmaMamba commented 1 year ago

It works, thanks. Good luck on your exams

GiusTex commented 1 year ago

Good that it works, and thanks!