Spaces:
Paused
Paused
matt HOFFNER
commited on
Commit
Β·
d8af7ef
1
Parent(s):
53763e2
cleanup
Browse files- README.md +6 -3
- package.json +4 -5
- public/readme.png +0 -0
- src/pages/api/llm.js +1 -2
README.md
CHANGED
@@ -8,8 +8,11 @@ app_port: 3000
|
|
8 |
pinned: false
|
9 |
---
|
10 |
|
11 |
-
|
12 |
|
13 |
-
|
|
|
|
|
|
|
|
|
14 |
|
15 |
-
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
|
|
8 |
pinned: false
|
9 |
---
|
10 |
|
11 |
+

|
12 |
|
13 |
+
# google-clone
|
14 |
+
|
15 |
+
Diet Coke and Taco Bell. A Google clone with OpenAI.
|
16 |
+
|
17 |
+
This is a fork of https://github.com/sahandghavidel/google-clone-nextjs13 with the new OpenAI functions API. Thanks to https://github.com/JohannLai/openai-function-calling-tools.
|
18 |
|
|
package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
-
"name": "
|
3 |
-
"version": "0.
|
4 |
"private": true,
|
5 |
"scripts": {
|
6 |
"dev": "next dev",
|
@@ -9,10 +9,7 @@
|
|
9 |
"lint": "next lint"
|
10 |
},
|
11 |
"dependencies": {
|
12 |
-
"@dqbd/tiktoken": "^1.0.7",
|
13 |
"@next/font": "13.1.6",
|
14 |
-
"eslint": "8.34.0",
|
15 |
-
"eslint-config-next": "13.1.6",
|
16 |
"eventsource-parser": "^1.0.0",
|
17 |
"html-react-parser": "^3.0.9",
|
18 |
"next": "13.1.6",
|
@@ -29,6 +26,8 @@
|
|
29 |
"@types/node": "20.3.1",
|
30 |
"@types/react": "18.2.13",
|
31 |
"autoprefixer": "^10.4.13",
|
|
|
|
|
32 |
"postcss": "^8.4.21",
|
33 |
"tailwindcss": "^3.2.7"
|
34 |
}
|
|
|
1 |
{
|
2 |
+
"name": "serp-chat",
|
3 |
+
"version": "0.2.0",
|
4 |
"private": true,
|
5 |
"scripts": {
|
6 |
"dev": "next dev",
|
|
|
9 |
"lint": "next lint"
|
10 |
},
|
11 |
"dependencies": {
|
|
|
12 |
"@next/font": "13.1.6",
|
|
|
|
|
13 |
"eventsource-parser": "^1.0.0",
|
14 |
"html-react-parser": "^3.0.9",
|
15 |
"next": "13.1.6",
|
|
|
26 |
"@types/node": "20.3.1",
|
27 |
"@types/react": "18.2.13",
|
28 |
"autoprefixer": "^10.4.13",
|
29 |
+
"eslint": "8.34.0",
|
30 |
+
"eslint-config-next": "13.1.6",
|
31 |
"postcss": "^8.4.21",
|
32 |
"tailwindcss": "^3.2.7"
|
33 |
}
|
public/readme.png
ADDED
![]() |
src/pages/api/llm.js
CHANGED
@@ -3,7 +3,6 @@ import { LLMError, LLMStream } from './stream';
|
|
3 |
|
4 |
const handler = async (req, res) => {
|
5 |
try {
|
6 |
-
|
7 |
const googleCustomSearch = new GoogleCustomSearch({
|
8 |
apiKey: process.env.API_KEY,
|
9 |
googleCSEId: process.env.CONTEXT_KEY,
|
@@ -30,7 +29,7 @@ const handler = async (req, res) => {
|
|
30 |
|
31 |
if (text !== 'null') {
|
32 |
data += text;
|
33 |
-
res.write(text === 'null' ? '
|
34 |
}
|
35 |
}
|
36 |
|
|
|
3 |
|
4 |
const handler = async (req, res) => {
|
5 |
try {
|
|
|
6 |
const googleCustomSearch = new GoogleCustomSearch({
|
7 |
apiKey: process.env.API_KEY,
|
8 |
googleCSEId: process.env.CONTEXT_KEY,
|
|
|
29 |
|
30 |
if (text !== 'null') {
|
31 |
data += text;
|
32 |
+
res.write(text === 'null' ? 'loading' : data);
|
33 |
}
|
34 |
}
|
35 |
|