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

Updates for some providers #1846

Merged
merged 2 commits into from
Apr 17, 2024
Merged

Updates for some providers #1846

merged 2 commits into from
Apr 17, 2024

Conversation

hlohaus
Copy link
Collaborator

@hlohaus hlohaus commented Apr 17, 2024

Fix DuckDuckGo Provider issues
Fix PerplexityLabs, FlowGpt Provider
Update Bing, Gemini Provider

hlohaus added 2 commits April 17, 2024 10:33
Fix PerplexityLabs, FlowGpt Provider
Update Bing, Gemini Provider
@hlohaus hlohaus merged commit 6afc672 into xtekky:main Apr 17, 2024
1 check passed
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello H Lohaus,

Thank you for your contribution to the project. Here's the review for your pull request titled "Updates for some providers":

General Feedback

Great work on addressing the issues with the DuckDuckGo and PerplexityLabs providers, as well as updating the Bing and Gemini providers. Your changes are well-targeted and seem to follow best practices.

Specific Observations

  • The update to the SRCHUSR cookie in Bing.py to include the date and time is a smart move for session management.
  • In Chatgpt4Online.py, adding the WebDriver parameter to the get_args_from_browser function could enhance the flexibility of browser simulation.
  • The restructuring in DuckDuckGo.py to support a conversation object and return conversation flow is a thoughtful addition for maintaining context.
  • The new models added to FlowGpt.py expand the capabilities significantly, and the authentication headers suggest improved security measures.
  • The simplification of the session management in PerplexityLabs.py by removing the BaseConnector and using StreamSession directly should streamline the connection process.

Suggestions

  • Ensure that all new dependencies and changes are well-documented for maintainability.
  • Consider adding unit tests for the new features to ensure they work as expected and to prevent future regressions.

Overall, your pull request is a valuable addition to the project. After a thorough testing phase, it should be ready for merging.

Best regards,
g4f Copilot

g4f/Provider/Bing.py Show resolved Hide resolved
g4f/Provider/Bing.py Show resolved Hide resolved
g4f/Provider/Chatgpt4Online.py Show resolved Hide resolved
g4f/Provider/Chatgpt4Online.py Show resolved Hide resolved
g4f/Provider/DuckDuckGo.py Show resolved Hide resolved
g4f/gui/server/api.py Show resolved Hide resolved
g4f/requests/curl_cffi.py Show resolved Hide resolved
g4f/requests/curl_cffi.py Show resolved Hide resolved
g4f/requests/curl_cffi.py Show resolved Hide resolved
@@ -88,4 +99,25 @@
else:
class FormData():
def __init__(self) -> None:

Choose a reason for hiding this comment

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

The error message CurlMimi in curl_cffi is missing | pip install -U g4f[curl_cffi] has a typo. It should likely be CurlMime instead of CurlMimi. Additionally, consider providing more context or guidance on resolving the error for better user experience.

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.

1 participant