2023-04-30 06:26:56 +00:00
|
|
|
ai.usesless.com
|
|
|
|
|
|
|
|
to do:
|
|
|
|
|
|
|
|
- use random user agent in header
|
|
|
|
- make the code better I guess (?)
|
|
|
|
|
|
|
|
### Example: `usesless` <a name="example-usesless"></a>
|
|
|
|
|
|
|
|
```python
|
|
|
|
import usesless
|
|
|
|
|
2023-04-30 07:05:51 +00:00
|
|
|
message_id = ""
|
|
|
|
while True:
|
|
|
|
prompt = input("Question: ")
|
|
|
|
if prompt == "!stop":
|
|
|
|
break
|
2023-04-30 06:26:56 +00:00
|
|
|
|
2023-04-30 07:05:51 +00:00
|
|
|
req = usesless.Completion.create(prompt=prompt, parentMessageId=message_id)
|
2023-04-30 06:26:56 +00:00
|
|
|
|
2023-04-30 07:05:51 +00:00
|
|
|
print(f"Answer: {req['text']}")
|
|
|
|
message_id = req["id"]
|
2023-04-30 06:26:56 +00:00
|
|
|
```
|