Skip to content

Commit

Permalink
feat(phind): support
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangsx committed Jun 14, 2023
1 parent 874ad31 commit a3d9f2b
Show file tree
Hide file tree
Showing 7 changed files with 280 additions and 433 deletions.
31 changes: 21 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ If you do not want your website to appear here, please raise an issue and I will
|[chatdemo]()|👍gpt3.5|![Active](https://img.shields.io/badge/Active-brightgreen)|after 2023-06-13|
|[forefront.ai](https://chat.forefront.ai)|GPT-4/gpt3.5|![Active](https://img.shields.io/badge/Active-brightgreen)|after 2023-06-13|
|[you.com](https://you.com)|👍GPT-3.5|![Active](https://img.shields.io/badge/Active-brightgreen)|after 2023-06-13
|[phind.com](https://www.phind.com/)|GPT-4 / Internet / good search|![Active](https://img.shields.io/badge/Active-grey)|
|[phind.com](https://www.phind.com/)|GPT-4 / Internet / good search|!![Active](https://img.shields.io/badge/Active-brightgreen)|after 2023-06-14
|[bing.com/chat](https://bing.com/chat)|GPT-4/3.5||
|[poe.com](https://poe.com)| GPT-4/3.5||
|[writesonic.com](https://writesonic.com)| GPT-3.5 / Internet||
Expand All @@ -56,16 +56,20 @@ rapid_api_key=xxxxxxxxxx
EMAIL_TYPE=temp-email44
DEBUG=0
POOL_SIZE=1
PHIND_POOL_SIZE=3
```

- `http_proxy`: config your proxy if you can not access target website directly
- `rapid_api_key`: you should config this if you use forefront api, this apikey is used for receive register email, get api key here
- `EMAIL_TYPE`: temp email type includes `temp-email` `temp-email44` `tempmail-lol`
- [temp-email](https://rapidapi.com/Privatix/api/temp-mail): soft limit 100req/days, if over use money, need bind credit card! Very Stable!
- [temp-email44](https://rapidapi.com/calvinloveland335703-0p6BxLYIH8f/api/temp-mail44): hard limit 100req/days! Stable!
- [tempmail-lol](): nothing need, limit 25request/5min. Not Stable.
- `DEBUG`: Valid when use `forefront` You can set =1 when you run local. show reverse process
- `POOL_SIZE`: `forefront` concurrency size. Keep set=1 until you run it successfully!!! You can engage in {POOL_SIZE} conversations concurrently. More pool size, More conversation can be done simultaneously, But use more RAM
- `forefront` use env:
- `rapid_api_key`: you should config this if you use forefront api, this apikey is used for receive register email, get api key here
- `EMAIL_TYPE`: temp email type includes `temp-email` `temp-email44` `tempmail-lol`
- [temp-email](https://rapidapi.com/Privatix/api/temp-mail): soft limit 100req/days, if over use money, need bind credit card! Very Stable!
- [temp-email44](https://rapidapi.com/calvinloveland335703-0p6BxLYIH8f/api/temp-mail44): hard limit 100req/days! Stable!
- [tempmail-lol](): nothing need, limit 25request/5min. Not Stable.
- `DEBUG`: Valid when use `forefront` You can set =1 when you run local. show reverse process
- `POOL_SIZE`: `forefront` concurrency size. Keep set=1 until you run it successfully!!! You can engage in {POOL_SIZE} conversations concurrently. More pool size, More conversation can be done simultaneously, But use more RAM
- `phind` use env:
- `PHIND_POOL_SIZE`: `phind` concurrency size.You can engage in {POOL_SIZE} conversations concurrently. More pool size, More conversation can be done simultaneously, But use more RAM

### Run local 🖥️

Expand Down Expand Up @@ -103,8 +107,15 @@ docker-compose up --build -d
- `prompt`: your question. It can be a `string` or `jsonstr`.
- example `jsonstr`:`[{"role":"user","content":"hello\n"},{"role":"assistant","content":"Hi there! How can I assist you today?"},{"role":"user","content":"who are you"}]`
- example `string`: `who are you`
- `model`: default `gpt3.5-turbo`. model include:`gpt4` `gpt3.5-turbo`
- `site`: default `you`. target site, include `forefront` `you` `chatdemo`
- `model`: default `gpt3.5-turbo`. model include:`gpt4` `gpt3.5-turbo` `net-gpt3.5-turbo`
- `site`: default `you`. target site, include `forefront` `you` `chatdemo` `phind`

### Site Support Model 🧩

- `forefront` :`gpt4`
- `you`: `gpt3.5-turbo`
- `chatdemo`: `gpt3.5-turbo`
- `phind`: `net-gpt3.5-turbo`

### Response Params 🔙

Expand Down
26 changes: 19 additions & 7 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,26 @@
```env
http_proxy=http://host:port
rapid_api_key=xxxxxxxxxx
EMAIL_TYPE=temp-email44
DEBUG=0
POOL_SIZE=1
PHIND_POOL_SIZE=3
```

- `http_proxy`: 你的本地代理,目前仅支持http协议
- `rapid_api_key`: 如果你使用forefront,这个必填,为了接收临时邮箱
- `EMAIL_TYPE`: `forefront`临时邮箱类型 `temp-email` `temp-email44` `tempmail-lol`
- [temp-email](https://rapidapi.com/Privatix/api/temp-mail): 软限制 免费100请求/days 如果超过了 每条收0.0038$ 具体查看下方网站,官方api非常稳定
- [temp-email44](https://rapidapi.com/calvinloveland335703-0p6BxLYIH8f/api/temp-mail44): 硬限制 免费100req/days! 超过就会报错,也很稳定
- [tempmail-lol](): 什么都不需要配置 硬限制 25request/5min. 不怎么稳定.
- `DEBUG`: `forefront`专属配置 设置成1,会显示运行过程
- `POOL_SIZE`: 默认配置成1,修改之前确定你可以运行成功,并且知道此值的含义!!!`forefront` 可以同时进行的对话数目,数值越大,同时进行的对话数越多,但是使用的内存越大,如果个人使用设置1即可
- 使用`forefront`才需要配置的env:
- `rapid_api_key`: 如果你使用forefront,这个必填,为了接收临时邮箱
- `EMAIL_TYPE`: `forefront`临时邮箱类型 `temp-email` `temp-email44` `tempmail-lol`
- [temp-email](https://rapidapi.com/Privatix/api/temp-mail): 软限制 免费100请求/days 如果超过了 每条收0.0038$ 具体查看下方网站,官方api非常稳定
- [temp-email44](https://rapidapi.com/calvinloveland335703-0p6BxLYIH8f/api/temp-mail44): 硬限制 免费100req/days! 超过就会报错,也很稳定
- [tempmail-lol](): 什么都不需要配置 硬限制 25request/5min. 不怎么稳定.
- `DEBUG`: `forefront`专属配置 设置成1,会显示运行过程
- `POOL_SIZE`: 默认配置成1,修改之前确定你可以运行成功,并且知道此值的含义!!!`forefront` 可以同时进行的对话数目,数值越大,同时进行的对话数越多,但是使用的内存越大,如果个人使用设置1即可
- 使用`phind`才需要的配置
- `PHIND_POOL_SIZE`: 默认配置成=3,`phind` 可以同时进行的对话数目,数值越大,同时进行的对话数越多,但是使用的内存越大,如果个人使用设置1即可

### 本地运行 🖥️

Expand Down Expand Up @@ -104,6 +110,12 @@ docker-compose up --build -d
- `model`: 默认 `gpt3.5-turbo`. 模型:`gpt4` `gpt3.5-turbo`
- `site`: 默认 `you`. 目标网站 `forefront` `you` `chatdemo`

### 网站支持模型类型 🧩

- `forefront` :`gpt4`
- `you`: `gpt3.5-turbo`
- `chatdemo`: `gpt3.5-turbo`
- `phind`: `net-gpt3.5-turbo`

### 返回参数 🔙

Expand Down
1 change: 1 addition & 0 deletions model/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type Message = {
export enum ModelType {
GPT3p5Turbo = 'gpt3.5-turbo',
GPT4 = 'gpt4',
NetGpt3p5 = 'net-gpt3.5-turbo',
}

export interface ChatRequest {
Expand Down
Loading

0 comments on commit a3d9f2b

Please sign in to comment.