feat(forefront): support config temp email type in .env

このコミットが含まれているのは:
xiang 2023-06-05 22:53:43 +08:00
コミット f05e5db576
2個のファイルの変更5行の追加2行の削除

ファイルの表示

@ -1,8 +1,9 @@
This is a replication project for the typescript version of [gpt4free](https://github.com/xtekky/gpt4free)
## Demo [GPTGOD](http://gptgod.site)
### GPTGOD Support
- [x] Midjourney The Most Powerful AI Drawing System in History.
- [x] Stable Diffusion
- [x] Claude
@ -51,7 +52,9 @@ http_proxy=http://host:port
# you should config this if you use forefront api, this apikey is used for receive register email
# get api key here https://rapidapi.com/calvinloveland335703-0p6BxLYIH8f/api/temp-mail44
rapid_api_key=xxxxxxxxxx
EMAIL_TYPE=temp-email44 # temp email type
DEBUG=0 # default:0 when you set 1 make sure run with chromium ui
POOL_SIZE=1 # forefront concurrency size
```
```

ファイルの表示

@ -59,7 +59,7 @@ export class Forefrontnew extends Chat {
await page.waitForSelector('.cl-rootBox > .cl-card > .cl-main > .cl-form > .cl-formButtonPrimary')
await page.click('.cl-rootBox > .cl-card > .cl-main > .cl-form > .cl-formButtonPrimary')
const emailBox = CreateEmail(TempEmailType.TempEmail44)
const emailBox = CreateEmail(process.env.EMAIL_TYPE as TempEmailType || TempEmailType.TempEmail44)
const emailAddress = await emailBox.getMailAddress();
// 将文本键入焦点元素
await page.keyboard.type(emailAddress, {delay: 10});