From 74a33f10dd4bcac9e9f9716ffa27d3876fc976a0 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Sat, 9 Mar 2024 19:05:05 +0100 Subject: Add word count from iG8R Improve Bing provider Some gui improvments Improve error handling in gui --- g4f/Provider/GeminiPro.py | 2 +- g4f/Provider/bing/conversation.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'g4f/Provider') diff --git a/g4f/Provider/GeminiPro.py b/g4f/Provider/GeminiPro.py index a22304d5..4e31915a 100644 --- a/g4f/Provider/GeminiPro.py +++ b/g4f/Provider/GeminiPro.py @@ -32,7 +32,7 @@ class GeminiPro(AsyncGeneratorProvider, ProviderModelMixin): connector: BaseConnector = None, **kwargs ) -> AsyncResult: - model = "gemini-pro-vision" if model is None and image is not None else model + model = "gemini-pro-vision" if not model and image is not None else model model = cls.get_model(model) if not api_key: diff --git a/g4f/Provider/bing/conversation.py b/g4f/Provider/bing/conversation.py index 919d9c1d..4af9e5fe 100644 --- a/g4f/Provider/bing/conversation.py +++ b/g4f/Provider/bing/conversation.py @@ -46,7 +46,7 @@ async def create_conversation(session: ClientSession, proxy: str = None) -> Conv } for k, v in headers.items(): session.headers[k] = v - url = 'https://www.bing.com/turing/conversation/create?bundleVersion=1.1579.2' + url = 'https://www.bing.com/turing/conversation/create?bundleVersion=1.1626.1' async with session.get(url, headers=headers, proxy=proxy) as response: try: data = await response.json() -- cgit v1.2.3