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

Failed to load the extension EdgeGPT in Colab #24

Closed mrdc closed 1 year ago

mrdc commented 1 year ago

Hello,

I'm trying to test in the Colab (https://colab.research.google.com/github/GiusTex/EdgeGPT/blob/main/Text-generation-webui-EdgeGPT.ipynb), but I get this error:

Traceback (most recent call last):
  File "/content/text-generation-webui/modules/extensions.py", line 36, in load_extensions
    exec(f"import extensions.{name}.script")
  File "<string>", line 1, in <module>
  File "/content/text-generation-webui/extensions/EdgeGPT/script.py", line 19, in <module>
    conda_version = subprocess.check_output(command, shell=True)
  File "/usr/lib/python3.10/subprocess.py", line 421, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'conda list EdgeGPT' returned non-zero exit status 127.

EdgeGPT is installed:

Successfully installed BingImageCreator-0.4.4 EdgeGPT-0.12.1 socksio-1.0.0

Your fork is also installed:

/content/text-generation-webui/extensions
Cloning into 'EdgeGPT'...
remote: Enumerating objects: 338, done.
remote: Counting objects: 100% (146/146), done.
remote: Compressing objects: 100% (78/78), done.
remote: Total 338 (delta 114), reused 70 (delta 64), pack-reused 192
Receiving objects: 100% (338/338), 110.48 KiB | 5.81 MiB/s, done.
Resolving deltas: 100% (145/145), done.

Checked briefly and it looks like conda is missing. Do we actually need it when using Colab?

GiusTex commented 1 year ago

Some time has passed since I made the colab, after my exam on friday I'll check it.

Edit:

This is caused by the EdgeGpt version auto-check, for now it need to be edited/removed to work on colab. For now you can download the extension script fom extensions>EdgeGpt>script.py, and delete the lines from 14 to 29, then upload the file where it was (in extensions>EdgEpt). This way it won't require conda the version of EdgeGpt, since colab has no conda, I think.

After you uploaded the edited file, run again the webui (without installing everything again, or it will undo what you did)

GiusTex commented 1 year ago

If you want to delete lines from 14 to 29 tell me if it works

mrdc commented 1 year ago

If you want to delete lines from 14 to 29 tell me if it works

Thanks, it works!