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

Improve CreateImagesBing #1498

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Improve CreateImagesBing #1498

merged 1 commit into from
Jan 22, 2024

Conversation

hlohaus
Copy link
Collaborator

@hlohaus hlohaus commented Jan 22, 2024

Sort providers by category

Sort providers by category
Copy link

@g4f-copilot g4f-copilot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of Pull Request: Improve CreateImagesBing


Thank you, H Lohaus, for your contribution to the project! Your efforts to sort providers by category in the CreateImagesBing module are appreciated.

Changes Made

  1. File Renaming:

    • Renamed HuggingChat.py to HuggingChat.py under the g4f/Provider directory.
  2. Provider List Reorganization:

    • Updated the list of providers in g4f/Provider/__init__.py. Removed Aichat, AItianhuSpace, Berlin, Opchatgpts, TalkAi, and Yqcloud from the main list.
    • Moved deprecated providers (Aichat, Berlin, Opchatgpts, Yqcloud) to the deprecated subdirectory.
  3. Bing Provider:

    • Modified create_images.py in g4f/Provider/bing. Reorganized import statements and updated the create_images_markdown and get_cookies_from_browser functions.
    • Introduced a new class CreateImagesBing with methods create_completion and create_async for generating image completions.
    • Removed the _cookies class variable, and instead, utilized instance variables.
    • Adjusted the CreateImagesProvider patching to use the new CreateImagesBing methods.
  4. Deprecated Providers:

    • Moved deprecated providers (Aichat, Berlin, Opchatgpts, Yqcloud) to the deprecated subdirectory.
    • Updated __init__.py in g4f/Provider/deprecated to include the new deprecated providers.

Additional Notes

  • It seems like there is a missing newline at the end of some files. Please add a newline at the end of these files to adhere to coding conventions.

Thank you once again for your valuable contribution! Please address the mentioned points, and once those are resolved, the changes can be merged into the main branch. Great work! 👍

g4f/Provider/__init__.py Show resolved Hide resolved
g4f/Provider/bing/create_images.py Show resolved Hide resolved
g4f/Provider/bing/create_images.py Show resolved Hide resolved
g4f/Provider/bing/create_images.py Show resolved Hide resolved
g4f/Provider/bing/create_images.py Show resolved Hide resolved
g4f/Provider/selenium/TalkAi.py Show resolved Hide resolved
g4f/Provider/selenium/TalkAi.py Show resolved Hide resolved
g4f/Provider/selenium/TalkAi.py Show resolved Hide resolved
g4f/Provider/selenium/TalkAi.py Show resolved Hide resolved
g4f/Provider/selenium/__init__.py Show resolved Hide resolved
@hlohaus hlohaus merged commit efbcc04 into xtekky:main Jan 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants