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

ValueError: list.remove(x): x not in list #132

Closed
Eikosa opened this issue Mar 30, 2024 · 5 comments
Closed

ValueError: list.remove(x): x not in list #132

Eikosa opened this issue Mar 30, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@Eikosa
Copy link
Contributor

Eikosa commented Mar 30, 2024

Traceback (most recent call last):
  File "/root/main.py", line 549, in my_function
    async for i in bot.ask_stream(
  File "/usr/local/lib/python3.10/dist-packages/re_edge_gpt/chat/re_edge_gpt.py", line 202, in ask_stream
    async for response in self.chat_hub.ask_stream(
  File "/usr/local/lib/python3.10/dist-packages/re_edge_gpt/chat/chathub.py", line 125, in ask_stream
    conversation_style.value.remove(option)
ValueError: list.remove(x): x not in list
@JE-Chen
Copy link
Member

JE-Chen commented Apr 7, 2024

Look like you remove some option not in conversation_style list.

@Eikosa
Copy link
Contributor Author

Eikosa commented Apr 7, 2024

I delete "autosave", although it is not a problem the first time I delete it, I think it creates a problem in the following times because it has already been deleted before

@JE-Chen
Copy link
Member

JE-Chen commented Apr 7, 2024

Because the new version of ReEdgeGPT’s conversation_style default setting does not include autosave
new version :

    creative = [
        "nlu_direct_response_filter",
        "deepleo",
        "disable_emoji_spoken_text",
        "responsible_ai_policy_235",
        "enablemm",
        "dv3sugg",
        "autosave",
        "iyxapbing",
        "iycapbing",
        "h3imaginative",
        "clgalileo",
        "gencontentv3",
        "uquopt",
        "sunoupsell",
        "gndlogcf",
        "flxvsearch",
        "noknowimg",
        "eredirecturl"
    ]
    creative_classic = [
        "nlu_direct_response_filter",
        "deepleo",
        "disable_emoji_spoken_text",
        "responsible_ai_policy_235",
        "enablemm",
        "dv3sugg",
        "autosave",
        "iyxapbing",
        "iycapbing",
        "h3imaginative",
        "clgalileo",
        "gencontentv3",
        "uquopt",
        "sunoupsell",
        "gndlogcf",
        "flxvsearch",
        "noknowimg",
        "eredirecturl"
    ]
    balanced = [
        "nlu_direct_response_filter",
        "deepleo",
        "disable_emoji_spoken_text",
        "responsible_ai_policy_235",
        "enablemm",
        "dv3sugg",
        "autosave",
        "iyxapbing",
        "iycapbing",
        "enable_user_consent",
        "fluxmemcst",
        "galileo",
        "saharagenconv5",
        "dc1mncp",
        "uquopt",
        "sunoupsell",
        "crkt2t",
        "immslots",
        "cpproname",
        "vidtoppb",
        "gptv1desc2",
        "eredirecturl"
    ]
    precise = [
        "nlu_direct_response_filter",
        "deepleo",
        "disable_emoji_spoken_text",
        "responsible_ai_policy_235",
        "enablemm",
        "dv3sugg",
        "autosave",
        "iyxapbing",
        "iycapbing",
        "enable_user_consent",
        "fluxmemcst",
        "h3precise",
        "clgalileo",
        "uquopt",
        "sunoupsell",
        "crkt2t",
        "flxvsearchans",
        "noknowimg",
        "eredirecturl"
    ]

@JE-Chen
Copy link
Member

JE-Chen commented Apr 10, 2024

So, I think this is not actually an issue.
But I will add precheck to remove options.
Like:

if option in style_options:
    style_options.remove(option)
else:
    print(f"Warning {option} not in style options list", file=sys.stderr)

@JE-Chen JE-Chen added the enhancement New feature or request label Apr 10, 2024
@JE-Chen
Copy link
Member

JE-Chen commented Apr 12, 2024

#133

@JE-Chen JE-Chen closed this as completed Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants