From ba9d5ed6bacee835d597c76f528b790be33c8010 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Mon, 20 Nov 2023 14:02:12 +0100 Subject: Add translate readme module Translate readme to german --- README.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 6a1df499..7d2aa860 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ + + Öffnen en DE + + ![248433934-7886223b-c1d1-4260-82aa-da5741f303bb](https://github.com/xtekky/gpt4free/assets/98614666/ea012c87-76e0-496a-8ac4-e2de090cc6c9) Buy Me a Coffee at ko-fi.com @@ -245,12 +249,7 @@ for message in response: ##### Using Browser -Some providers using a browser to bypass the bot protection. -They using the selenium webdriver to control the browser. -The browser settings and the login data are saved in a custom directory. -If the headless mode is enabled, the browser windows are loaded invisibly. -For performance reasons, it is recommended to reuse the browser instances -and close them yourself at the end: +Some providers using a a browser to bypass the bot protection. They using the selenium webdriver to control the browser. The browser settings and the login data are saved in a custom directory. If the headless mode is enabled, the browser windows are loaded invisibly. For performance reasons, it is recommended to reuse the browser instances and close them yourself at the end: ```python import g4f @@ -266,16 +265,16 @@ from g4f.Provider import ( options = ChromeOptions() options.add_argument("--incognito"); -browser = Chrome(options=options, headless=True) +webdriver = Chrome(options=options, headless=True) for idx in range(10): response = g4f.ChatCompletion.create( model=g4f.models.default, provider=g4f.Provider.Phind, messages=[{"role": "user", "content": "Suggest me a name."}], - browser=browser + webdriver=webdriver ) print(f"{idx}:", response) -browser.quit() +webdriver.quit() ``` ##### Cookies Required @@ -605,7 +604,7 @@ if __name__ == "__main__": #### Create Provider with AI Tool -Call in your terminal the "create_provider" script: +Call in your terminal the `create_provider.py` script: ```bash python etc/tool/create_provider.py ``` @@ -628,8 +627,8 @@ from .base_provider import AsyncGeneratorProvider class HogeService(AsyncGeneratorProvider): url = "https://chat-gpt.com" - supports_gpt_35_turbo = True working = True + supports_gpt_35_turbo = True @classmethod async def create_async_generator( @@ -644,7 +643,7 @@ class HogeService(AsyncGeneratorProvider): 4. Here, you can adjust the settings, for example, if the website does support streaming, set `supports_stream` to `True`... 5. Write code to request the provider in `create_async_generator` and `yield` the response, _even if_ it's a one-time response, do not hesitate to look at other providers for inspiration -6. Add the Provider Name in [g4f/Provider/**init**.py](./g4f/Provider/__init__.py) +6. Add the Provider Name in [`g4f/Provider/__init__.py`](./g4f/Provider/__init__.py) ```py from .HogeService import HogeService @@ -708,7 +707,7 @@ along with this program. If not, see .
-This project is licensed under
GNU_GPL_v3.0. +This project is licensed under GNU_GPL_v3.0. -- cgit v1.2.3