Skip to content

Commit

Permalink
Merge branch 'xiangsx:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
choogoo authored May 9, 2023
2 parents 83c55f4 + 3ff993a commit 33a9700
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
This is a replication project for the typescript version of [gpt4free](https://github.com/xtekky/gpt4free)

## Demo [GPTGOD](http://gptgod.site)

In the next two weeks, I will open source all the code for GPTGOD. If you need, Please watch this project or follow me to receive notifications.

Why now? because there are stil some secret config shoule be removed from that project.

## Reverse target
Still striving to keep updating.

Have implemented models here:
- [x] you.com GPT-3.5 / Internet / good search **not active**
- [x] forefront.ai GPT-4/3.5 ***It work perfect in 2023-05-07***
- [ ] poe.com GPT-4/3.5
- [ ] writesonic.com GPT-3.5 / Internet
- [ ] t3nsor.com GPT-3.5
- [ ] sqlchat.ai GPT-3.5
- [ ] bard.google.com custom / search
- [ ] bing.com/chat GPT-4/3.5
- [ ] italygpt.it GPT-3.5
- [x] [you.com](you.com) GPT-3.5 / Internet / good search **not active because of new auth method**
- [x] [forefront.ai](forefront.ai) GPT-4/3.5 ***It still work perfect after 2023-05-07***
- [ ] [bing.com/chat](bing.com/chat) GPT-4/3.5
- [ ] [poe.com](poe.com) GPT-4/3.5
- [ ] [writesonic.com](writesonic.com) GPT-3.5 / Internet
- [ ] [t3nsor.com](t3nsor.com) GPT-3.5


## Run local
Expand Down Expand Up @@ -77,7 +81,9 @@ curl "http://127.0.0.1:3000/ask/stream?prompt=hello&model=forefront&gptmodel=gpt
curl "http://127.0.0.1:3000/ask/stream?prompt=hello&model=you"
```

Due to legal and personal issues, the development speed of this Repository may slow down over the next one to two weeks. I apologize for any inconvenience this may cause. I have been putting a lot of effort into this small personal/educational project, and it is now on the verge of being taken down.
## 🌟 Star History

[![Star History Chart](https://api.star-history.com/svg?repos=xiangsx/gpt4free-ts&type=Date)](https://star-history.com/#xiangsx/gpt4free-ts&&type=Date)

<p>You may join our discord: <a href="https://discord.com/invite/gpt4free">discord.gg/gpt4free<a> for further updates. <a href="https://discord.gg/gpt4free"><img align="center" alt="gpt4free Discord" width="22px" src="https://raw.githubusercontent.com/peterthehan/peterthehan/master/assets/discord.svg" /></a></p>

Expand Down
6 changes: 3 additions & 3 deletions model/forefront/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,14 @@ export class Forefront extends Chat {
if (this.options?.proxy) {
session.proxy = this.options.proxy;
}
const signEmailRes = await session.post('https://clerk.forefront.ai/v1/client/sign_ups?_clerk_js_version=4.38.4',
const signEmailRes = await session.post('https://clerk.forefront.ai/v1/client/sign_ups?_clerk_js_version=4.39.0',
{data: {'email_address': mailAddress}});
const traceToken = (signEmailRes.data as any)?.response?.id;
if (!traceToken) {
throw new Error('Failed to create account! sign email res parse token failed!');
}

const verifyRes = await session.post(`https://clerk.forefront.ai/v1/client/sign_ups/${traceToken}/prepare_verification?_clerk_js_version=4.38.4`, {
const verifyRes = await session.post(`https://clerk.forefront.ai/v1/client/sign_ups/${traceToken}/prepare_verification?_clerk_js_version=4.39.0`, {
data: {
'strategy': 'email_link',
'redirect_url': 'https://accounts.forefront.ai/sign-up/verify'
Expand All @@ -242,7 +242,7 @@ export class Forefront extends Chat {
throw new Error('Error while obtaining verfication URL!')
}
const validateRes = await session.get(validateURL)
const loginRes = await session.get('https://clerk.forefront.ai/v1/client?_clerk_js_version=4.38.4');
const loginRes = await session.get('https://clerk.forefront.ai/v1/client?_clerk_js_version=4.39.0');
const token = (loginRes.data as any).response.sessions[0].last_active_token.jwt;
const sessionID = (loginRes.data as any).response.sessions[0].id
const userID = (loginRes.data as any).response.sessions[0].user.id
Expand Down

0 comments on commit 33a9700

Please sign in to comment.