XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

docs(README): current available link Provider path

acdcad31
Guspan Tanadi <36249910+guspan-tanadi@users.noreply.github.com>
提交于

代码差异

1 个文件 +4 -4
Modified README.md +4 -4
@@ -327,7 +327,7 @@ python -m g4f.api
327 327 ```py
328 328 import openai
329 329
330 openai.api_key = "Empty if you don't use embeddings, otherwise your hugginface token"
330 openai.api_key = "Empty if you don't use embeddings, otherwise your Hugging Face token"
331 331 openai.api_base = "http://localhost:1337/v1"
332 332
333 333
@@ -546,8 +546,8 @@ python etc/tool/create_provider.py
546 546 #### Create Provider
547 547
548 548 1. Check out the current [list of potential providers](https://github.com/zukixa/cool-ai-stuff#ai-chat-websites), or find your own provider source!
549 2. Create a new file in [g4f/provider](./g4f/provider) with the name of the Provider
550 3. Implement a class that extends [BaseProvider](./g4f/provider/base_provider.py).
549 2. Create a new file in [g4f/Provider](./g4f/Provider) with the name of the Provider
550 3. Implement a class that extends [BaseProvider](./g4f/Provider/base_provider.py).
551 551
552 552 ```py
553 553 from __future__ import annotations
@@ -573,7 +573,7 @@ class HogeService(AsyncGeneratorProvider):
573 573
574 574 4. Here, you can adjust the settings, for example, if the website does support streaming, set `supports_stream` to `True`...
575 575 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
576 6. Add the Provider Name in [g4f/provider/**init**.py](./g4f/provider/__init__.py)
576 6. Add the Provider Name in [g4f/Provider/**init**.py](./g4f/Provider/__init__.py)
577 577
578 578 ```py
579 579 from .HogeService import HogeService