Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/npm_and_yarn-securit…
Browse files Browse the repository at this point in the history
…y-group-8ad25f4c4b
  • Loading branch information
14790897 authored Feb 22, 2024
2 parents 9b27ba0 + 28d63ea commit baaf5a3
Show file tree
Hide file tree
Showing 2,496 changed files with 1,722 additions and 806,672 deletions.
15 changes: 15 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Update these with your Supabase details from your project settings > API
# https://app.supabase.com/project/_/settings/api
NEXT_PUBLIC_SUPABASE_URL=https://yidfukfbrluizjvfrrsj.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InlpZGZ1a2Zicmx1aXpqdmZycnNqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDQ4NjMyNjEsImV4cCI6MjAyMDQzOTI2MX0.EXIXAdNIGLFo5wHmwmY2-9bqLO9vyFYDvMMtCtkxgig
# NEXT_PUBLIC_TINYMCE_API_KEY=e983nu390inks6be1wwlsrdxjebot3yc4pld7d44zs6vcrxr
NEXT_PUBLIC_OPENAI_API_KEY=sk-ffe19ebe9fa44d00884330ff1c18cf82
#sess-wZKsUKS8IhPH3jI44krQL41vhl68qH6hwE66hOnL
NEXT_PUBLIC_SEMANTIC_API_KEY=hEQvK6ARe84dzDPcMnpzX4n9jfoqztkMfaftPWnb
NEXT_PUBLIC_PUBMED_API_KEY=057616e7ce6c722f2ae8679e38a8be9b1a09
NEXT_PUBLIC_AI_URL=https://api.deepseek.com # /api/v1/chat/completions
NEXT_PUBLIC_PAPER_URL=/api/paper
#"https://api.openai.com/v1/chat/completions" "https://api.liuweiqing.top" "https://api.liuweiqing.top/v1/chat/completions"
#node转发设置为 /api/v1/chat/completions https://one.caifree.com sk-aiHrrRLYUUelHstX69E9484509254dBf92061d6744FfFaD1
VERCEL_URL=https://www.paperai.life
NODE_ENV=development
3 changes: 2 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ NEXT_PUBLIC_OPENAI_API_KEY=sk-ffe19ebe9fa44d00884330ff1c18cf82
NEXT_PUBLIC_PAPER_URL=/api/paper
NEXT_PUBLIC_SEMANTIC_API_KEY=hEQvK6ARe84dzDPcMnpzX4n9jfoqztkMfaftPWnb
NEXT_PUBLIC_PUBMED_API_KEY=057616e7ce6c722f2ae8679e38a8be9b1a09
VERCEL_URL=https://www.paperai.life
VERCEL_URL=https://www.paperai.life
NODE_ENV=production
66 changes: 0 additions & 66 deletions .github/workflows/github-pages.yml

This file was deleted.

10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ yarn-debug.log*
yarn-error.log*

# local env files
.env*.local
# .env*.local

# vercel
.vercel
Expand All @@ -43,3 +43,11 @@ post.md

# Sentry Config File
.sentryclirc

#vitepress
docs/.vitepress/dist/*
node_modules
dist
cache
# Sentry Config File
.sentryclirc
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog

## [1.6.0](https://www.github.com/14790897/paper-ai/compare/v1.5.0...v1.6.0) (2024-02-19)


### Features

* github登录(测试中) ([4ee0816](https://www.github.com/14790897/paper-ai/commit/4ee08169df05a9bcf487a25c4b56c3785edbea7a))
* 可以进行多轮文献查询 ([9d799f1](https://www.github.com/14790897/paper-ai/commit/9d799f1736a7ff72e09f9e36e916c0ab9e04cec4))
* 增加了一个显示当前任务进度的进度条 ([c55a93c](https://www.github.com/14790897/paper-ai/commit/c55a93c79b20c7fb4b5ff15027110267d6874c24))
* 如果AI多次引用同一文献则只返回第一个文献的引用数字 ([763a106](https://www.github.com/14790897/paper-ai/commit/763a1062f982b5f0b96da5afb3b3bb96fd66eaef))


### Bug Fixes

* ai对话 ([96d780d](https://www.github.com/14790897/paper-ai/commit/96d780dd3a1c04e4c4adbd61cd87d07a42fa3eaa))
* pubmed参数写反 ([07070bf](https://www.github.com/14790897/paper-ai/commit/07070bf253044958931e138b5af0099ddc3fb8dd))
* translation ([03febb1](https://www.github.com/14790897/paper-ai/commit/03febb136415fcd48a4248d19c1086bfc0c95f8d))
* 修复lemon路由 ([5e7afea](https://www.github.com/14790897/paper-ai/commit/5e7afea400af03716d08e2d6d7aadb6eccd3448e))
* 去除暗色模式 ([da5cb4f](https://www.github.com/14790897/paper-ai/commit/da5cb4fac84e800e4e8bcc105a395088af615631))
* 只有在AI返回的内容没有错之后才能添加文献 ([3040c11](https://www.github.com/14790897/paper-ai/commit/3040c11ea1b843f923475ac117516e82de3f4458))
* 图标正常显示 ([8ab1bdd](https://www.github.com/14790897/paper-ai/commit/8ab1bdd3935713595d35ed41471146cfa83cc4f0))
* 导出word时文献不更新,因为usecallback没有添加变量 ([01d3ffe](https://www.github.com/14790897/paper-ai/commit/01d3ffebf7a86c27161d97b73a949a1f0d73a62b))
* 论文引用格式 ([b603365](https://www.github.com/14790897/paper-ai/commit/b603365265314f61122a8bab0da1561bc1c0c5a2))

## [1.5.0](https://www.github.com/14790897/paper-ai/compare/v1.4.0...v1.5.0) (2024-02-13)


Expand Down
40 changes: 24 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
[English Documentation](./README_en.md)

<a href="https://paperai.life">
<img alt="Next.js and Supabase Starter Kit - the fastest way to build apps with Next.js and Supabase" src="https://paperai.life/opengraph-image.png">
<h1 align="center">paper-ai</h1>
<div style="text-align: center;">
<img src="./app/favicon.ico" alt="the fastest way to create a paper with real references" style="display: block; margin-left: auto; margin-right: auto;">
</div> <h1 align="center">paper-ai</h1>
</a>

<p align="center">
使用真实文献最快速完成论文的方法
</p>

<p style="text-align: center;">
<a href='https://docs.paperai.life/' style='font-size: 20px;'><strong>文档网站(教程比较详细,推荐在这里观看)</strong></a>
</p>

<p align="center">
<a href="#功能"><strong>功能</strong></a> ·
<a href="#演示"><strong>演示</strong></a> ·
Expand All @@ -17,14 +22,12 @@
</p>
<br/>



## 功能

### 利用人工智能撰写论文

- **人工智能书写功能**: 点击 "AI 写作 "进行正常对话互动。人工智能将根据您的输入提供写作建议或回答问题。
- **Paper2AI功能**: 点击 "Paper2AI",根据输入的关键词在Semantic Scholar或arxiv或PubMed中搜索论文。系统将把信息整合到您的论文中。
- **寻找文献功能**: 点击 "寻找文献",根据输入的关键词在 Semantic Scholar 或 arxiv 或 PubMed 中搜索论文。系统将把信息整合到您的论文中。

### 编辑和修改

Expand All @@ -35,7 +38,7 @@

您可以在 [paperai.life](https://paperai.life) 查看完整的工作演示。

## 部署到Vercel
## 部署到 Vercel

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/14790897/paper-ai&project-name=paper-ai&repository-name=paper-ai&demo-title=paper-ai&demo-description=This%20starter%20configures%20Supabase%20Auth%20to%20use%20cookies%2C%20making%20the%20user's%20session%20available%20throughout%20the%20entire%20Next.js%20app%20-%20Client%20Components%2C%20Server%20Components%2C%20Route%20Handlers%2C%20Server%20Actions%20and%20Middleware.&demo-url=https%3A%2F%2Fdemo-nextjs-with-supabase.vercel.app%2F&external-id=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fwith-supabase&demo-image=https%3A%2F%2Fpaperai.life%2Fopengraph-image.png)

Expand All @@ -44,11 +47,15 @@
如果只想在本地开发,而不想部署到 Vercel,[请按以下步骤操作](#clone-and-run-locally)

## 镜像运行

1. 拉取镜像

```sh
docker pull 14790897/paperai:latest
```

2. 运行镜像

```sh
docker run -d -p 3000:3000 \
-e NEXT_PUBLIC_AI_URL=自定义AI模型地址\
Expand All @@ -57,10 +64,11 @@ docker run -d -p 3000:3000 \
```

## 环境变量说明
1. NEXT_PUBLIC_OPENAI_API_KEY 设置key,只要在设置界面(右上角齿轮)对应的位置留空就会使用预定的变量
2. NEXT_PUBLIC_AI_URL 设置上游url,只要在设置界面(右上角齿轮)对应的位置留空就会使用预定的变量
3. NEXT_PUBLIC_SEMANTIC_API_KEY 设置semantic scholar的key,可以增加请求量
4. NEXT_PUBLIC_PUBMED_API_KEY 设置pubmed的key,可以增加请求量

1. NEXT_PUBLIC_OPENAI_API_KEY 设置 key,只要在设置界面(右上角齿轮)对应的位置留空就会使用预定的变量
2. NEXT_PUBLIC_AI_URL 设置上游 url,只要在设置界面(右上角齿轮)对应的位置留空就会使用预定的变量
3. NEXT_PUBLIC_SEMANTIC_API_KEY 设置 semantic scholar 的 key,可以增加请求量
4. NEXT_PUBLIC_PUBMED_API_KEY 设置 pubmed 的 key,可以增加请求量

## 克隆并在本地运行

Expand All @@ -77,13 +85,13 @@ npm install
# 运行项目
npm run dev

```
```

## 参考文档

1. semantic scholar api: https://api.semanticscholar.org/api-docs/#tag/Paper-Data/operation/get_graph_paper_relevance_search
2. pubmed api: https://www.ncbi.nlm.nih.gov/books/NBK25500/
2. pubmed api: https://www.ncbi.nlm.nih.gov/books/NBK25500/

## 许可证
MIT



MIT
30 changes: 0 additions & 30 deletions app/[lng]/1global-error.tsx

This file was deleted.

Binary file removed app/[lng]/favicon.ico
Binary file not shown.
30 changes: 0 additions & 30 deletions app/[lng]/layout.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion app/[lng]/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default async function Login({
});
//sentry
const user = data?.user;
if (user) {
if (user && process.env.NODE_ENV === "production") {
Sentry.setUser({
email: user.email,
id: user.id,
Expand Down
7 changes: 7 additions & 0 deletions app/[lng]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ export default async function Index({ params: { lng } }: IndexProps) {
>
{t("give me a star in GitHub")}
</a>
<a
href="https://docs.paperai.life/"
target="_blank"
className="font-bold text-blue-500 hover:underline hover:text-blue-700"
>
<strong>使用文档</strong>
</a>
<FooterBase t={t} lng={lng} />
</div>
</footer>
Expand Down
Loading

0 comments on commit baaf5a3

Please sign in to comment.