2023-04-27 19:10:43 +00:00
|
|
|
from openai_rev import forefront
|
2023-04-27 09:34:05 +00:00
|
|
|
|
|
|
|
# create an account
|
|
|
|
token = forefront.Account.create(logging=True)
|
|
|
|
print(token)
|
|
|
|
|
|
|
|
# get a response
|
2023-04-27 19:10:43 +00:00
|
|
|
for response in forefront.StreamingCompletion.create(token=token, prompt='hello world', model='gpt-4'):
|
2023-04-27 20:57:06 +00:00
|
|
|
print(response.text, end='')
|