Spaces:
Running
Running
File size: 681 Bytes
d4adf88 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
ai.usesless.com
### Example: `usesless` <a name="example-usesless"></a>
### Token generation
<p>This will create account.json that contains email and token in json</p>
```python
from gpt4free import usesless
token = usesless.Account.create(logging=True)
print(token)
```
### Completion
<p>Insert token from account.json</p>
```python
import usesless
message_id = ""
token = <TOKENHERE> # usesless.Account.create(logging=True)
while True:
prompt = input("Question: ")
if prompt == "!stop":
break
req = usesless.Completion.create(prompt=prompt, parentMessageId=message_id, token=token)
print(f"Answer: {req['text']}")
message_id = req["id"]
```
|