t.me/xtekky 21c82d873a Merge branch 'main' of https://github.com/xtekky/gpt4free | преди 1 година | |
---|---|---|
.. | ||
cocalc | преди 1 година | |
forefront | преди 1 година | |
quora | преди 1 година | |
theb | преди 1 година | |
usesless | преди 1 година | |
you | преди 1 година | |
README.md | преди 1 година | |
__init__.py | преди 1 година |
gpt4free is a python package that provides some language model api's
pip install gpt4free
import gpt4free
from gpt4free import Provider, quora, forefront
# usage You
response = gpt4free.Completion.create(Provider.You, prompt='Write a poem on Lionel Messi')
print(response)
# usage Poe
token = quora.Account.create(logging=False)
response = gpt4free.Completion.create(Provider.Poe, prompt='Write a poem on Lionel Messi', token=token, model='ChatGPT')
print(response)
# usage forefront
token = forefront.Account.create(logging=False)
response = gpt4free.Completion.create(
Provider.ForeFront, prompt='Write a poem on Lionel Messi', model='gpt-4', token=token
)
print(response)
print(f'END')
# usage theb
response = gpt4free.Completion.create(Provider.Theb, prompt='Write a poem on Lionel Messi')
print(response)
# usage cocalc
response = gpt4free.Completion.create(Provider.CoCalc, prompt='Write a poem on Lionel Messi', cookie_input='')
print(response)
gpt4free.Completion.create()
method has two required arguments
Some of the keyword arguments are optional, while others are required.
safe_search
: boolean - default value is False
include_links
: boolean - default value is False
detailed
: boolean - default value is False
token
: str - this needs to be provided by the usermodel
: str - default value is gpt-4
.
(Available models: ['Sage', 'GPT-4', 'Claude+', 'Claude-instant', 'ChatGPT', 'Dragonfly', 'NeevaAI']
)
ForeFront:
token
: str - this need to be provided by the userTheb: (no keyword arguments required)
CoCalc:
cookie_input
: str - this needs to be provided by userfrom gpt4free import quora
token = quora.Account.create(logging=False)
from gpt4free import forefront
token = forefront.Account.create(logging=False)
This program is licensed under the GNU GPL v3
xtekky/gpt4free: multiple reverse engineered language-model api's to decentralise the ai industry.
Copyright (C) 2023 xtekky
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.