Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2023-10-22 | Major Update for Bing - Supports latest bundle version and image analysis | Luneye | 1 | -42/+222 | |
Here it is, a much-needed update to this service which offers numerous functionalities that the old code was unable to deliver to us. As you may know, ChatGPT Plus subscribers now have the opportunity to request image analysis directly from GPT within the chat bar. Bing has also integrated this feature into its chatbot. With this new code, you can now provide an image using a data URI, with all the following supported extensions: jpg, jpeg, png, and gif! **What is a data URI and how can I provide an image to Bing?** Just to clarify, a data URI is a method for encoding data directly into a URI (Uniform Resource Identifier). It is typically used for embedding small data objects like images, text, or other resources within web pages or documents. Data URIs are widely used in web applications. To provide an image from your desktop and retrieve it as a data URI, you can use this code: [GitHub link](https://gist.github.com/jsocol/1089733). Now, here is a code snippet you can use to provide images to Bing: ```python import g4f provider = g4f.Provider.Bing user_message = [{"role": "user", "content": "Hi, describe this image."}] response = g4f.ChatCompletion.create( model = g4f.models.gpt_4, provider = g4f.provider, # Corrected the provider value messages = user_message, stream = True, image = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4RiSRXhpZgAASUkqAAg..." # Insert your full data URI image here ) for message in response: print(message, flush=True, end='') ``` If you don't want to analyze the image, just do not specify the image parameter. Regarding the implementation, the image is preprocessed within the Bing.py code, which can be resource-intensive for a server-side implementation. When using the Bing chatbot in your web browser, the image is preprocessed on your computer before being sent to the server. This preprocessing includes tasks like image rotation and compression. Although this implementation works, it would be more efficient to delegate image preprocessing to the client as it happens in reality. I will try to provide a JavaScript code for that at a later time. As you saw, I did mention in the title that it is in Beta. The way the code is written, Bing can sometimes mess up its answers. Indeed, Bing does not really stream its responses as the other providers do. Bing sends its answers like this on each iteration: "Hi," "Hi, this," "Hi, this is," "Hi, this is Bing." Instead of sending each segment one at a time, it already adds them on each iteration. So, to simulate a normal streaming response, other contributors made the code wait for the next iteration to retrieve the newer segments and yield them. However, this method ignores something that Bing does. Bing processes its responses in a markdown detector, which searches for links while the AI answers. If it finds a link, it saves it and waits until the AI finishes its answer to put all the found links at the very end of the answer. So if the AI is writing a link, but then on the next iteration, it finishes writing this link, it will then be deleted from the answer and appear later at the very end. Example: "Here is your link reference [" "Here is your link reference [^" "Here is your link reference [^1" "Here is your link reference [^1^" And then the response would get stuck there because the markdown detector would have deleted this link reference in the next response and waited until the AI is finished to put it at the very end. For this reason, I am working on an update to anticipate the markdown detector. So please, if you guys notice any bugs with this new implementation, I would greatly appreciate it if you could report them on the issue tab of this repo. Thanks in advance, and I hope that all these explanations were clear to you! | |||||
2023-10-21 | ~ | g4f `v-0.1.7.2` | abc | 16 | -123/+175 | |
patch / unpatch providers | |||||
2023-10-20 | ~ | abc | 1 | -0/+3 | |
minor changes | |||||
2023-10-19 | ~ | abc | 1 | -60/+72 | |
automatic models fetching in GUI. | |||||
2023-10-19 | Fix: debug.logging not work in retry provider | hs_junxiang | 1 | -6/+5 | |
2023-10-17 | Add timeout | ostix360 | 1 | -1/+6 | |
2023-10-16 | ~ | add `g4f.Provider.GeekGpt` | abc | 2 | -1/+85 | |
2023-10-16 | ~ | remove non-working providers | abc | 11 | -32/+107 | |
2023-10-15 | Add Llama2 and NoowAi Provider | Heiner Lohaus | 6 | -7/+153 | |
2023-10-14 | ~ | abc | 2 | -13/+11 | |
fix chatbase (bad) and remove from auto selection | |||||
2023-10-14 | Fix Opchatgpts and ChatForAi Provider | Heiner Lohaus | 10 | -101/+116 | |
Deprecate Vitalentum and Aivvm Provider | |||||
2023-10-12 | Deprecate ChatForAi | Heiner Lohaus | 3 | -5/+6 | |
2023-10-12 | Add ChatgptLogin, ChatgptFree and GptChatly Provider | Heiner Lohaus | 10 | -80/+391 | |
2023-10-12 | Fix: GptGo json.decoder.JSONDecodeError | hs_junxiang | 1 | -0/+2 | |
2023-10-11 | ~ | g4f v-0.1.6.1 | abc | 2 | -2/+2 | |
some bug fixes | |||||
2023-10-10 | ~ | remove DeepAi | abc | 2 | -83/+0 | |
2023-10-10 | ~ | g4f `v-0.1.5.8`0.1.5.8 | abc | 1 | -1/+1 | |
2023-10-10 | make user agent easily changeable in deepai | Commenter123321 | 1 | -2/+3 | |
2023-10-10 | fix deepai :) | Commenter123321 | 1 | -18/+17 | |
2023-10-10 | remove unused import in Bing.py | Commenter123321 | 1 | -1/+0 | |
2023-10-10 | Aivvm is the best provider no cap | Commenter123321 | 1 | -3/+6 | |
2023-10-10 | Some small fixes | Heiner Lohaus | 9 | -35/+32 | |
2023-10-10 | Update Aivvm.py | Commenter123321 | 1 | -3/+3 | |
2023-10-10 | ~ | abc | 1 | -0/+62 | |
Conversion from str Provider to g4f.Provider | |||||
2023-10-09 | add cool testing for gpt-3.5 and and gpt-4 | Commenter123321 | 2 | -20/+27 | |
2023-10-09 | Add Proxy Support and Create Provider to Readme | Heiner Lohaus | 7 | -41/+57 | |
Add proxy support to many providers | |||||
2023-10-09 | Add proxy support to all providers | Heiner Lohaus | 28 | -102/+144 | |
2023-10-08 | Add Messages and AsyncResult typing | Heiner Lohaus | 5 | -31/+42 | |
Add system_message in Yqcloud | |||||
2023-10-08 | Add Cromicle to provider list | Heiner Lohaus | 5 | -27/+62 | |
2023-10-07 | ~ | `v-0.1.5.5` | abc | 3 | -5/+10 | |
Aiivm working again | |||||
2023-10-07 | Remove Aivvm from working providers | Heiner Lohaus | 3 | -7/+5 | |
2023-10-07 | Improve code with ai | Heiner Lohaus | 1 | -9/+16 | |
2023-10-07 | Improve code by AI | Heiner Lohaus | 2 | -25/+27 | |
2023-10-07 | Add GptGod Provider | Heiner Lohaus | 13 | -28/+73 | |
Remove timeout from aiohttp providers Disable Opchatgpts and ChatgptLogin provider | |||||
2023-10-07 | Add GPTalk and GptForLove Provider | Heiner Lohaus | 5 | -0/+6618 | |
2023-10-06 | Fix timeout in create_async | Heiner Lohaus | 9 | -30/+17 | |
2023-10-06 | ~ | abc | 1 | -2/+4 | |
2023-10-06 | Fix: TypeError: 'type' object is not subscriptable | hs_junxiang | 2 | -0/+8 | |
2023-10-05 | Add AiAsk, Chatgpt4Online, ChatgptDemo | Heiner Lohaus | 30 | -163/+578 | |
and ChatgptX Provider Fix Bing, Liaobots and ChatgptAi Provider Add "gpt_35_long" model and custom timeout | |||||
2023-10-04 | Update Cromicle.py | Hexye | 1 | -2/+2 | |
2023-10-04 | Create Cromicle.py | Hexye | 1 | -0/+50 | |
2023-10-04 | ~ | g4f v-0.1.4.8 - Fixed `g4f.Provider.Bing` | abc | 1 | -8/+34 | |
implemented new "X-Sydney-EncryptedConversationSignature" found in headers from "turing/conversation/create" | |||||
2023-10-04 | Sort providers in new dirs | Heiner Lohaus | 26 | -61/+70 | |
2023-10-04 | Use custom user dir | Heiner Lohaus | 2 | -26/+16 | |
2023-10-03 | Fix fetch_access_token in openai | Heiner Lohaus | 1 | -10/+16 | |
2023-10-03 | Add streaming in openai chat | Heiner Lohaus | 2 | -24/+75 | |
Fetch access token with chromedriver | |||||
2023-10-02 | Bing Updates: | Heiner Lohaus | 1 | -33/+45 | |
Add retry create conversation Removed get_cookies fallback Add creative tone parameter | |||||
2023-10-02 | Add Phind Provider | Heiner Lohaus | 3 | -9/+91 | |
Add release_curl in url_cffi requets Support create image response in Bing | |||||
2023-10-02 | feat: add custom header to deepai | Giancarlo-Ma | 1 | -0/+1 | |
2023-10-02 | Fix: There is no current event loop in thread | Heiner Lohaus | 4 | -15/+34 | |
2023-10-02 | Remove fake_useragent module | Heiner Lohaus | 1 | -4/+0 | |
2023-10-02 | +Curl +Async +Stream Requests | Heiner Lohaus | 7 | -32/+33 | |
Update Model List | |||||
2023-10-02 | fix typo in payload | st4rted | 1 | -2/+2 | |
2023-10-01 | Change event loop policy on windows | Heiner Lohaus | 1 | -2/+9 | |
Support more versions from curl_cffi | |||||
2023-10-01 | aivvm's no life creator keeps patching it, but I'm just better 😉 | Commenter123321 | 1 | -3/+4 | |
2023-10-01 | Disable Wewordle Provider | Heiner Lohaus | 2 | -9/+3 | |
Update Ylokh Provider Improve StreamRequest | |||||
2023-10-01 | Disable PerplexityAi Provider | Heiner Lohaus | 2 | -2/+2 | |
2023-10-01 | Update HuggingChat to new api | Heiner Lohaus | 8 | -91/+183 | |
Impersonate Aivvm Provider Add ChatForAi and FreeGpt Provider Update AItianhuSpace Provider Improve StreamRequest Support Update get_event_loop Helper | |||||
2023-09-29 | Fix Aivvm and add new models in models.py | Commenter123321 | 1 | -16/+15 | |
2023-09-26 | Add ChatgptDuo and Aibn Provider | Heiner Lohaus | 7 | -75/+191 | |
Add support for "nest_asyncio", Reuse event_loops with event_loop_policy Support for "create_async" with synchron provider | |||||
2023-09-26 | AItianhuSpace Provider with GPT 4 added | Heiner Lohaus | 2 | -15/+46 | |
Reduced chunksize to better text completion | |||||
2023-09-26 | "create_async" support for BaseProvider, | Heiner Lohaus | 3 | -2/+78 | |
by using ThreadPoolExecutor Default Model for Vercel | |||||
2023-09-25 | Add Myshell Provider | Heiner Lohaus | 5 | -17/+181 | |
Remove auto proxy prefix | |||||
2023-09-23 | Fix: Aivvm: KeyError: '' | Heiner Lohaus | 1 | -3/+9 | |
and TypeError: issubclass() arg 1 must be a class | |||||
2023-09-23 | ~ | improve Vercel & g4f.Completion.create | abc | 1 | -1/+1 | |
2023-09-23 | ~ | improve Vercel & g4f.Completion.create | abc | 1 | -2/+6 | |
added `.Completion.create` class. ```py response = g4f.Completion.create( model='text-davinci-003', prompt="Hello") print(response) ``` | |||||
2023-09-23 | ~ | abc | 1 | -0/+369 | |
2023-09-23 | Delete g4f/Provider/Vercel.py | Tekky | 1 | -387/+0 | |
2023-09-23 | Improve Vercel Provider: | Heiner Lohaus | 3 | -45/+62 | |
- Fix endless loop - Add proxy, async support - Add default model Fix HuggingChat Provider | |||||
2023-09-23 | ~ | Update Vercel Provider | abc | 1 | -227/+307 | |
2023-09-23 | ~ |Â new providers | abc | 2 | -59/+50 | |
Somwhat fix Aivvm provider, which looks to have a working gpt-4 kinda unstable | |||||
2023-09-23 | ~ | Fix DeepAi | abc | 1 | -1/+1 | |
2023-09-21 | Add RetryProvider | Heiner Lohaus | 2 | -1/+86 | |
2023-09-20 | Fix create_event_loop function | Heiner Lohaus | 3 | -10/+100 | |
Add PerplexityAi Provider | |||||
2023-09-20 | Improve code style in async support | Heiner Lohaus | 1 | -10/+22 | |
2023-09-20 | Add "create_event_loop" helper | Heiner Lohaus | 1 | -9/+13 | |
2023-09-20 | Add check_running_loop requirement | Heiner Lohaus | 1 | -5/+18 | |
Add create_async function in ChatCompletion Use SelectorEventLoop on windows | |||||
2023-09-20 | Cache "snlm0e" in Bard | Heiner Lohaus | 7 | -25/+42 | |
Improve error handling in ChatgptLogin Fix async example in readme | |||||
2023-09-19 | ~ | abc | 1 | -64/+2 | |
2023-09-18 | Improve event loop | Heiner Lohaus | 2 | -42/+44 | |
2023-09-18 | Add GptGo Provider, Fix AItianhu Provider | Heiner Lohaus | 3 | -41/+98 | |
2023-09-17 | ~ | Tekky | 1 | -353/+0 | |
2023-09-17 | Revert "Fix type hint" | Tekky | 25 | -25/+25 | |
2023-09-16 | fix typo: provider -> Provider | MIDORIBIN | 25 | -25/+25 | |
2023-09-12 | Disable not working providers: | Heiner Lohaus | 5 | -14/+9 | |
EasyChat, Equing, GetGpt, Liaobots and Wuguokai No and random best provider for a model Update providers in Readme | |||||
2023-09-12 | Add new providers: Aivvm, Vitalentum and Ylokh | Heiner Lohaus | 7 | -25/+251 | |
2023-09-10 | Add ChatBase Provider | Heiner Lohaus | 2 | -0/+64 | |
2023-09-09 | Add CodeLinkAva Provider, Improve test_async.py | Heiner Lohaus | 4 | -2/+67 | |
2023-09-05 | Fix imports in Bing | Heiner Lohaus | 1 | -16/+7 | |
2023-09-05 | Add to many provider async and stream support, Fix Ails, AItianhu, ChatgptAi, ChatgptLogin Provider, Add fallback cookies to Bing, Improve OpenaiChat Provider | Heiner Lohaus | 17 | -528/+443 | |
2023-09-04 | Join the messages | hs_junxiang | 7 | -29/+14 | |
A better approach is to use the `.join()` method of strings, which reduces string concatenation operations and improves performance. Additionally, using formatted strings (f-strings) makes the code cleaner and more readable. | |||||
2023-09-03 | type hints | msi-JunXiang | 33 | -45/+174 | |
Use `from __future__ import annotations avoid `dict` and `list` cause "TypeErro: 'type' object is not subscriptable". Refer to the following Stack Overflow discussions for more information: 1. https://stackoverflow.com/questions/75202610/typeerror-type-object-is-not-subscriptable-python 2. https://stackoverflow.com/questions/59101121/type-hint-for-a-dict-gives-typeerror-type-object-is-not-subscriptable | |||||
2023-09-01 | Set working=True in Liaobots, Fix bing provider, Update readme | Heiner Lohaus | 4 | -24/+6 | |
2023-08-28 | ~ | v-0.0.2.6 | abc | 1 | -25/+25 | |
2023-08-28 | Update Bing.py | Luneye | 1 | -7/+7 | |
Fixed some errors in my previously precipitated commit. | |||||
2023-08-28 | Update Bing.py | Luneye | 1 | -53/+45 | |
Added support the async function Will implement proper cookie retrieval later but Bing is working for now | |||||
2023-08-28 | Add async support for H2o | Heiner Lohaus | 12 | -311/+461 | |
Add format_prompt helper Fix create_completion in AsyncGeneratorProvider Move get_cookies from constructor to function Add ow HuggingChat implement Remove need auth form Liabots Add staic cache for access_token in OpenaiChat Add OpenAssistant provider Support stream and async in You Support async and add userId in Yqcloud Add log_time module | |||||
2023-08-27 | Update Bing.py | Luneye | 1 | -46/+76 | |
Removed unnecessary check that could prematurely stop the AI's response while answering | |||||
2023-08-27 | ~ | code styling | abc | 30 | -790/+695 | |
2023-08-25 | Add OpenaiChat and Hugchat Provider | Heiner Lohaus | 6 | -79/+259 | |
Add tests for providers with auth Improve async support / 2x faster Shared get_cookies by domain function | |||||
2023-08-25 | Ails Supplementary Identification of Unusual Response Content | zengrr | 1 | -1/+1 | |
2023-08-24 | Improve provider list | Heiner Lohaus | 5 | -11/+11 | |
2023-08-24 | remove whitspace from data: and raise exception | Bagus Indrayana | 1 | -3/+5 | |
2023-08-23 | Ails throw the contents of an error response | zengrr | 1 | -0/+2 | |
2023-08-23 | fix Yqcloud's prompter using only the last message | zengrr | 1 | -1/+4 | |
2023-08-23 | "You" unicode decode and fix prompt just is last message | zengrr | 1 | -5/+8 | |
2023-08-23 | Add create_async method | Heiner Lohaus | 1 | -19/+39 | |
2023-08-22 | Improve providers with tests | Heiner Lohaus | 6 | -20/+18 | |
2023-08-22 | fix Equing response error with no stream | zengrr | 1 | -0/+3 | |
2023-08-22 | set encoding and temperature | zengrr | 3 | -5/+10 | |
2023-08-21 | Fix bing provider | Heiner Lohaus | 1 | -261/+203 | |
2023-08-20 | change link | Bagus Indrayana | 1 | -8/+9 | |
2023-08-20 | fix theb but need auth | Bagus Indrayana | 1 | -15/+72 | |
2023-08-20 | update header & response easychat | Bagus Indrayana | 1 | -9/+30 | |
2023-08-18 | Fix bard provider, add async support | Heiner Lohaus | 1 | -69/+67 | |
2023-08-17 | Update Yqcloud.py | MaxKUlish1 | 1 | -0/+1 | |
# specify the correct encoding forcibly | |||||
2023-08-17 | Update Yqcloud.py | MaxKUlish1 | 1 | -1/+0 | |
2023-08-17 | Update Yqcloud.py | MaxKUlish1 | 1 | -0/+1 | |
# specify the correct encoding forcibly | |||||
2023-08-17 | add provider | Bagus Indrayana | 2 | -1/+68 | |
2023-08-17 | refactor V50 and Raycast | Bagus Indrayana | 2 | -85/+123 | |
2023-08-17 | ~ | major refractoring + new providers | v0.0.2.0 | abc | 4 | -1/+162 | |
g4f.Provider.FastGpt & g4f.Provider.Equing gpt-3.5-turbo-0613 | |||||
2023-08-17 | add proxy and remove stream | Bagus Indrayana | 1 | -1/+1 | |
2023-08-17 | add v50 | Bagus Indrayana | 2 | -0/+44 | |
2023-08-17 | ~ | major refractoring | v0.0.2.0 | abc | 2 | -4/+4 | |
2023-08-14 | refactor: refactor provider | MIDORIBIN | 55 | -2095/+2317 | |
2023-08-14 | small fixes & new pypi version | abc | 1 | -0/+110 | |
2023-08-14 | Fix Ails.py | johnd0e | 1 | -1/+1 | |
Fix arguments order | |||||
2023-08-12 | Update EasyChat.py | omidima | 1 | -10/+9 | |
Resolve review comments. | |||||
2023-08-11 | Update EasyChat.py | omidima | 1 | -1/+8 | |
update active servers | |||||
2023-08-09 | Add Raycast Provider | ye4241 | 2 | -0/+51 | |
2023-08-08 | Update EasyChat.py | omidima | 1 | -16/+17 | |
Change model address and add proxy & session for pass cloudflare auth on requests. | |||||
2023-08-05 | Update Ails.py | VastV2 | 1 | -3/+5 | |
after they update the client-v version the page is not working anymore, so I made this to get the version number automatically, this way we don't need to update the version manually. | |||||
2023-08-05 | Update DeepAi.py | omidima | 1 | -26/+52 | |
2023-08-01 | Update __init__.py | kggn | 1 | -1/+1 | |
2023-08-01 | Update __init__.py | kggn | 1 | -0/+1 | |
2023-08-01 | Create opchatgpts.py | kggn | 1 | -0/+42 | |
2023-07-24 | Update Vercel.py | abc | 1 | -109/+8 | |
2023-07-22 | Use the temperature parameter | grandsonneo@gmail.com | 6 | -13/+13 | |
2023-07-21 | Fix the import errors | nonk123 | 1 | -0/+0 | |
2023-07-19 | Update Provider.DfeHub to consider rate-limit | najam-tariq | 1 | -1/+9 | |
2023-07-18 | Rename DFEHub.py to DfeHub.py | xtekky | 1 | -1/+1 | |
2023-07-18 | . | abc | 1 | -1/+1 | |
2023-07-16 | minor fixes | abc | 25 | -63/+101 | |
2023-07-16 | minor fixes | abc | 4 | -5/+4 | |
ails, chatgptai ... | |||||
2023-07-12 | refactor/move provider from testing folder | Bagus Indrayana | 5 | -0/+364 | |
2023-07-10 | Add files via upload | AlephZero255 | 1 | -105/+93 | |
Fix empty H2o output | |||||
2023-07-05 | some more providers | najam-tariq | 5 | -1/+169 | |
2023-06-29 | fix subDomain of LockChat | Lê Anh Tuấn | 1 | -2/+2 | |
2023-06-27 | Fix: There is no current event loop in thread. | Ramon Victor Cardoso | 1 | -12/+13 | |
2023-06-24 | gpt4free v2, first releasev2 | t.me/xtekky | 20 | -0/+1442 | |