ファイルへ移動
2023-05-13 10:39:01 +01:00
g4f initial commit 2023-05-13 10:39:01 +01:00
testing initial commit 2023-05-13 10:39:01 +01:00
README.md initial commit 2023-05-13 10:39:01 +01:00

g4f.Providers class

default:

./g4f/Providers/ProviderName.py:

import os


url: str = 'https://{site_link}'
model: str = 'gpt-[version]'

def _create_completion(prompt: str, args...):
    return ...
    or
    yield ...


params = f'g4f.Providers.{os.path.basename(__file__)[:-3]} supports: ' + \
    ', '.join([f"{name}: {get_type_hints(_create_completion)[name].__name__}" for name in _create_completion.__code__.co_varnames[:_create_completion.__code__.co_argcount]])