mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-09-12 08:29:30 -04:00
fix forefront sample
This commit is contained in:
parent
21715f4480
commit
34fb3fc185
@ -2,15 +2,18 @@
|
||||
|
||||
```python
|
||||
from gpt4free import forefront
|
||||
|
||||
|
||||
# create an account
|
||||
token = forefront.Account.create(logging=False)
|
||||
print(token)
|
||||
account_data = forefront.Account.create(logging=False)
|
||||
|
||||
# get a response
|
||||
for response in forefront.StreamingCompletion.create(
|
||||
token=token,
|
||||
prompt='hello world',
|
||||
model='gpt-4'
|
||||
account_data=account_data,
|
||||
prompt='hello world',
|
||||
model='gpt-4'
|
||||
):
|
||||
print(response.choices[0].text, end='')
|
||||
print("")
|
||||
|
||||
```
|
Loading…
Reference in New Issue
Block a user