Upload 42 files
Browse files- .eslintrc.json +3 -0
- .gitignore +38 -0
- README.md +37 -11
- app/api/page.jsx +44 -0
- app/components/ApiModal.css +26 -0
- app/components/ApiModal.jsx +23 -0
- app/components/Footer.css +81 -0
- app/components/Footer.jsx +62 -0
- app/components/Header.css +75 -0
- app/components/Header.jsx +40 -0
- app/components/Navbar.css +24 -0
- app/components/Navbar.jsx +33 -0
- app/components/PerChatCard.css +3 -0
- app/components/PerChatCard.jsx +26 -0
- app/favicon.ico +0 -0
- app/globals.css +243 -0
- app/layout.jsx +24 -0
- app/others/eidmubarak/[name]/page.jsx +61 -0
- app/others/eidmubarak/[name]/style.css +0 -0
- app/others/eidmubarak/generate/page.jsx +52 -0
- app/others/eidmubarak/generate/style.css +0 -0
- app/page.jsx +71 -0
- jsconfig.json +7 -0
- next.config.mjs +4 -0
- package-lock.json +0 -0
- package.json +32 -0
- pages/api/apiList.js +49 -0
- pages/api/bing.js +50 -0
- pages/api/blackbox.js +18 -0
- pages/api/chatgpt3.js +68 -0
- pages/api/chatgpt4.js +68 -0
- pages/api/geminiweb.js +23 -0
- pages/api/huggingchat.js +80 -0
- pages/api/imagine.js +18 -0
- pages/api/liner.js +42 -0
- pages/api/llama.js +18 -0
- pages/api/mistral.js +18 -0
- pages/api/pretend.js +96 -0
- pages/api/upscaler.js +58 -0
- postcss.config.js +6 -0
- public/apiList.json +98 -0
- tailwind.config.js +18 -0
.eslintrc.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"extends": "next/core-web-vitals"
|
3 |
+
}
|
.gitignore
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
2 |
+
|
3 |
+
# dependencies
|
4 |
+
/node_modules
|
5 |
+
/.pnp
|
6 |
+
.pnp.js
|
7 |
+
.yarn/install-state.gz
|
8 |
+
|
9 |
+
# testing
|
10 |
+
/coverage
|
11 |
+
|
12 |
+
# next.js
|
13 |
+
/.next/
|
14 |
+
/out/
|
15 |
+
|
16 |
+
# production
|
17 |
+
/build
|
18 |
+
|
19 |
+
# misc
|
20 |
+
.DS_Store
|
21 |
+
*.pem
|
22 |
+
|
23 |
+
# debug
|
24 |
+
npm-debug.log*
|
25 |
+
yarn-debug.log*
|
26 |
+
yarn-error.log*
|
27 |
+
|
28 |
+
# local env files
|
29 |
+
.env*.local
|
30 |
+
|
31 |
+
# vercel
|
32 |
+
.vercel
|
33 |
+
|
34 |
+
# typescript
|
35 |
+
*.tsbuildinfo
|
36 |
+
next-env.d.ts
|
37 |
+
|
38 |
+
.vercel
|
README.md
CHANGED
@@ -1,11 +1,37 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
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).
|
2 |
+
|
3 |
+
## Getting Started
|
4 |
+
|
5 |
+
First, run the development server:
|
6 |
+
|
7 |
+
```bash
|
8 |
+
npm run dev
|
9 |
+
# or
|
10 |
+
yarn dev
|
11 |
+
# or
|
12 |
+
pnpm dev
|
13 |
+
# or
|
14 |
+
bun dev
|
15 |
+
```
|
16 |
+
|
17 |
+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
18 |
+
|
19 |
+
You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.
|
20 |
+
|
21 |
+
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
|
22 |
+
|
23 |
+
## Learn More
|
24 |
+
|
25 |
+
To learn more about Next.js, take a look at the following resources:
|
26 |
+
|
27 |
+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
28 |
+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
29 |
+
|
30 |
+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
|
31 |
+
|
32 |
+
## Deploy on Vercel
|
33 |
+
|
34 |
+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
35 |
+
|
36 |
+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
|
37 |
+
"# ts-api"
|
app/api/page.jsx
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use client"
|
2 |
+
|
3 |
+
import React from 'react'
|
4 |
+
|
5 |
+
import PerChatCard from '../components/PerChatCard'
|
6 |
+
|
7 |
+
import axios from 'axios'
|
8 |
+
|
9 |
+
import data from '@/public/apiList.json'
|
10 |
+
|
11 |
+
import Link from 'next/link'
|
12 |
+
import ApiModal from '../components/ApiModal'
|
13 |
+
|
14 |
+
|
15 |
+
const page = () => {
|
16 |
+
|
17 |
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
18 |
+
const [open, setOpen] = React.useState(false)
|
19 |
+
|
20 |
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
21 |
+
const [api, setData] = React.useState({})
|
22 |
+
|
23 |
+
|
24 |
+
return (<>
|
25 |
+
{open && <ApiModal open={open} setOpen={setOpen} api={api}/>}
|
26 |
+
<div className="col" style={{display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', width: '100%'}}>
|
27 |
+
|
28 |
+
<h1 className="gradient-text" style={{fontSize: '50px'}}>API Hub</h1>
|
29 |
+
|
30 |
+
<div className="row" style={{marginTop: '20px', width: '100%', justifyContent: 'center', alignItems: 'center', flexWrap: 'wrap' }}>
|
31 |
+
{
|
32 |
+
data.map((data, index)=>{
|
33 |
+
return <PerChatCard data={data} key={index} open={open} setOpen={setOpen} setData={setData}/>
|
34 |
+
})
|
35 |
+
}
|
36 |
+
</div>
|
37 |
+
|
38 |
+
</div>
|
39 |
+
</>
|
40 |
+
|
41 |
+
)
|
42 |
+
}
|
43 |
+
|
44 |
+
export default page
|
app/components/ApiModal.css
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.row::-webkit-scrollbar{
|
2 |
+
width: 2px;
|
3 |
+
background-color: transparent;
|
4 |
+
border-radius: 10px;
|
5 |
+
cursor: pointer;
|
6 |
+
height: 90%;
|
7 |
+
}
|
8 |
+
|
9 |
+
.row::-webkit-scrollbar-thumb{
|
10 |
+
background: linear-gradient(to bottom, #00c8ff, #2635c1);
|
11 |
+
border-radius: 10px;
|
12 |
+
cursor: pointer;
|
13 |
+
}
|
14 |
+
|
15 |
+
.fade-in {
|
16 |
+
animation: fadeIn 0.3s ease;
|
17 |
+
}
|
18 |
+
|
19 |
+
@keyframes fadeIn {
|
20 |
+
from {
|
21 |
+
opacity: 0;
|
22 |
+
}
|
23 |
+
to {
|
24 |
+
opacity: 1;
|
25 |
+
}
|
26 |
+
}
|
app/components/ApiModal.jsx
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React from 'react'
|
2 |
+
import Link from 'next/link'
|
3 |
+
import '@/app/components/ApiModal.css'
|
4 |
+
const ApiModal = ({open, setOpen, api}) => {
|
5 |
+
return (
|
6 |
+
<div className="fade-in" style={{width: '100vw', height: '100vh', display: 'flex', justifyContent: 'center', alignItems: 'center', position: 'fixed', zIndex: '1000', top: '0', left: '0', backgroundColor: 'rgba(0, 0, 0, 0.8)', backdropFilter: 'blur(10px)'}}>
|
7 |
+
<div className="row" style={{justifyContent: 'space-between', alignItems: 'center', display: 'flex', flexWrap: 'wrap', position: 'fixed', zIndex: '1000', top: '50%', left: '50%', transform: 'translate(-50%, -50%)', backgroundColor: 'rgba(0, 10, 20, 0.8)', borderRadius: '10px', backdropFilter: 'blur(10px)', padding: '20px', width: '90%', maxHeight: '500px', overflowY: 'auto', maxWidth: '700px'}}>
|
8 |
+
<div className="modal-body">
|
9 |
+
<div className="close gradient-text" style={{cursor: 'pointer', position: 'absolute', right: '10px', top: '10px', backgroundImage: 'linear-gradient(to right, #ff0000, #ffaaaa)'}} onClick={()=>setOpen(false)}>Close</div>
|
10 |
+
<h3>URL: </h3><p>{api.url}</p>
|
11 |
+
<h3>Description: </h3><p>{api.description}</p>
|
12 |
+
<h3>Query: </h3><p>{api.query}</p>
|
13 |
+
<h3>Response: </h3><p>{api.response}</p>
|
14 |
+
<h3>Method: </h3><p>{api.method || 'GET'}</p>
|
15 |
+
<h3>Test URL: </h3><Link href={api.testURL|| '#'}>Try it</Link>
|
16 |
+
</div>
|
17 |
+
</div>
|
18 |
+
</div>
|
19 |
+
|
20 |
+
)
|
21 |
+
}
|
22 |
+
|
23 |
+
export default ApiModal
|
app/components/Footer.css
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@tailwind base;
|
2 |
+
@tailwind components;
|
3 |
+
@tailwind utilities;
|
4 |
+
|
5 |
+
.footer{
|
6 |
+
display: flex;
|
7 |
+
flex-direction: row;
|
8 |
+
justify-content: space-between;
|
9 |
+
flex-wrap: wrap;
|
10 |
+
padding: 10px;
|
11 |
+
align-items: flex-start;
|
12 |
+
width: 100%;
|
13 |
+
}
|
14 |
+
|
15 |
+
.col{
|
16 |
+
display: flex;
|
17 |
+
flex-direction: column;
|
18 |
+
padding: 20px;
|
19 |
+
width: max-content;
|
20 |
+
align-items: left;
|
21 |
+
justify-content: left;
|
22 |
+
text-align: left;
|
23 |
+
max-width: 100%;
|
24 |
+
}
|
25 |
+
.row a:hover{
|
26 |
+
padding: 0;
|
27 |
+
color : linear-gradient(to right, #00c8ff, #2635c1);
|
28 |
+
-webkit-background-clip: text; /* Clip the gradient to the text */
|
29 |
+
background-clip: text;
|
30 |
+
-webkit-text-fill-color: transparent; /* Make the text transparent */
|
31 |
+
}
|
32 |
+
.footer a{
|
33 |
+
margin-top: 20px;
|
34 |
+
margin-left: 3px;
|
35 |
+
font-size: small;
|
36 |
+
}
|
37 |
+
|
38 |
+
.footer a:hover{
|
39 |
+
|
40 |
+
}
|
41 |
+
|
42 |
+
h3{
|
43 |
+
font-size: large;
|
44 |
+
font-weight: bold;
|
45 |
+
}
|
46 |
+
|
47 |
+
.footcontainer{
|
48 |
+
display: flex;
|
49 |
+
flex-direction: column;
|
50 |
+
background-color: rgba(0, 0, 0, 0);
|
51 |
+
color: rgba(255, 255, 255, 0.751);
|
52 |
+
backdrop-filter: blur(10px);
|
53 |
+
border:none;
|
54 |
+
border-top: 2px solid rgba(255, 255, 255, 0.233); /* Changed border-bottom style to solid and specified border-color */
|
55 |
+
width: 100%;
|
56 |
+
justify-content: center;
|
57 |
+
align-items: center;
|
58 |
+
text-align: center;
|
59 |
+
}
|
60 |
+
|
61 |
+
.row{
|
62 |
+
display: flex;
|
63 |
+
flex-direction: row;
|
64 |
+
}
|
65 |
+
|
66 |
+
.row a{
|
67 |
+
margin-right: 12px;
|
68 |
+
}
|
69 |
+
|
70 |
+
.row a:hover{
|
71 |
+
padding: 0;
|
72 |
+
background-color: transparent;
|
73 |
+
color: rgba(250, 235, 215, 0.459);
|
74 |
+
}
|
75 |
+
|
76 |
+
.line{
|
77 |
+
width: 100%;
|
78 |
+
height: 2px;
|
79 |
+
background-color: rgba(255, 255, 255, 0.251);
|
80 |
+
margin: 10px 0;
|
81 |
+
}
|
app/components/Footer.jsx
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import '@/app/components/Footer.css';
|
2 |
+
import React from 'react';
|
3 |
+
import Link from 'next/link';
|
4 |
+
import { BsFacebook } from "react-icons/bs";
|
5 |
+
import { SiGmail } from "react-icons/si";
|
6 |
+
import { FaFacebookMessenger } from "react-icons/fa";
|
7 |
+
const Footer = () => {
|
8 |
+
|
9 |
+
|
10 |
+
return (
|
11 |
+
<div className='col footcontainer' style={{}}>
|
12 |
+
<div className='footer'>
|
13 |
+
<div className="col">
|
14 |
+
<h3 className='gradient-text'>Company</h3>
|
15 |
+
<Link href='/About'>About Us</Link>
|
16 |
+
<Link href='/Contact'>Contact Us</Link>
|
17 |
+
<Link href='/Login'>Login</Link>
|
18 |
+
<Link href='/Signup'>Signup</Link>
|
19 |
+
</div>
|
20 |
+
<div className="col">
|
21 |
+
<h3 className='gradient-text'>AI</h3>
|
22 |
+
<Link href='#'>Open AI</Link>
|
23 |
+
<Link href='#'>Liner</Link>
|
24 |
+
<Link href='#'>Herc</Link>
|
25 |
+
</div>
|
26 |
+
<div className="col">
|
27 |
+
<h3 className='gradient-text'>Social Media</h3>
|
28 |
+
<Link href='/'>Facebook</Link>
|
29 |
+
<Link href='/'>Twitter</Link>
|
30 |
+
<Link href='/'>Instagram</Link>
|
31 |
+
<Link href='/'>LinkedIn</Link>
|
32 |
+
</div>
|
33 |
+
<div className="col">
|
34 |
+
<h3 className='gradient-text'>Programming</h3>
|
35 |
+
<Link href='#'>Javascript</Link>
|
36 |
+
<Link href='#'>React JS</Link>
|
37 |
+
<Link href='#'>Next JS</Link>
|
38 |
+
<Link href='#'>Node JS</Link>
|
39 |
+
</div>
|
40 |
+
|
41 |
+
<div className="col">
|
42 |
+
<h3 className='gradient-text'>Contact</h3>
|
43 |
+
<Link href='#'>Contact Page</Link>
|
44 |
+
<span className="row">
|
45 |
+
|
46 |
+
<Link href='#'><BsFacebook size={25}/></Link>
|
47 |
+
<Link href='#'><SiGmail size={25}/></Link>
|
48 |
+
<Link href='#'><FaFacebookMessenger size={25}/></Link>
|
49 |
+
</span>
|
50 |
+
|
51 |
+
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
<div className="line"></div>
|
55 |
+
<div className="copyright gradient-text">
|
56 |
+
<p style={{fontSize: '12px'}}>© 2024 TS API. All rights reserved.</p>
|
57 |
+
</div>
|
58 |
+
</div>
|
59 |
+
);
|
60 |
+
};
|
61 |
+
|
62 |
+
export default Footer;
|
app/components/Header.css
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.header{
|
2 |
+
background-color: rgba(0, 0, 0, 0);
|
3 |
+
color: white;
|
4 |
+
|
5 |
+
border:none;
|
6 |
+
border-bottom: 2px solid rgba(255, 255, 255, 0.233); /* Changed border-bottom style to solid and specified border-color */
|
7 |
+
}
|
8 |
+
|
9 |
+
@media screen and (max-width: 600px) {
|
10 |
+
.links{
|
11 |
+
display: none;
|
12 |
+
}
|
13 |
+
}
|
14 |
+
|
15 |
+
a{
|
16 |
+
margin-left: 20px;
|
17 |
+
transition-duration: 300ms;
|
18 |
+
font-size: medium;
|
19 |
+
}
|
20 |
+
|
21 |
+
a:hover{
|
22 |
+
background: linear-gradient(to right, #00c8ff, #2635c1);
|
23 |
+
|
24 |
+
color: white;
|
25 |
+
padding: 10px;
|
26 |
+
border-radius: 10px;
|
27 |
+
}
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
+
.sidenav {
|
32 |
+
height: 100%;
|
33 |
+
width: 0;
|
34 |
+
position: fixed;
|
35 |
+
z-index: 1;
|
36 |
+
top: 0;
|
37 |
+
right: 0;
|
38 |
+
background-color: rgba(0, 0, 0, 0.5);
|
39 |
+
backdrop-filter: blur(10px);
|
40 |
+
overflow-x: hidden;
|
41 |
+
transition: 0.5s;
|
42 |
+
padding-top: 60px;
|
43 |
+
}
|
44 |
+
|
45 |
+
.sidenav a {
|
46 |
+
padding: 8px 8px 8px 32px;
|
47 |
+
text-decoration: none;
|
48 |
+
font-size: 25px;
|
49 |
+
color: #ffffff;
|
50 |
+
display: block;
|
51 |
+
transition: 0.3s;
|
52 |
+
}
|
53 |
+
|
54 |
+
.sidenav a:hover {
|
55 |
+
color: #808080;
|
56 |
+
}
|
57 |
+
|
58 |
+
.sidenav .closebtn {
|
59 |
+
position: absolute;
|
60 |
+
top: 0;
|
61 |
+
right: 25px;
|
62 |
+
font-size: 36px;
|
63 |
+
margin-left: 50px;
|
64 |
+
}
|
65 |
+
|
66 |
+
|
67 |
+
.menubtn{
|
68 |
+
display: none;
|
69 |
+
}
|
70 |
+
|
71 |
+
@media screen and (max-width: 600px) {
|
72 |
+
.menubtn{
|
73 |
+
display: block;
|
74 |
+
}
|
75 |
+
}
|
app/components/Header.jsx
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use client"
|
2 |
+
|
3 |
+
import React from 'react'
|
4 |
+
import Link from 'next/link'
|
5 |
+
import { GiRobotGrab } from "react-icons/gi";
|
6 |
+
import '@/app/components/Header.css'
|
7 |
+
import Navbar from '@/app/components/Navbar'
|
8 |
+
import Cookies from 'js-cookie';
|
9 |
+
const Header = () => {
|
10 |
+
const [open, setOpen] = React.useState(false)
|
11 |
+
const [loggedIn, setLoggedIn] = React.useState(false)
|
12 |
+
|
13 |
+
React.useEffect(() => {
|
14 |
+
Cookies.get('UserID') ? setLoggedIn(true) : setLoggedIn(false)
|
15 |
+
}, [])
|
16 |
+
function openNav() {
|
17 |
+
setOpen(true)
|
18 |
+
document.getElementById("mySidenav").style.width = "250px";
|
19 |
+
}
|
20 |
+
return (
|
21 |
+
|
22 |
+
<div className='flex-row header' style={{ width: '100%',justifyContent: 'space-between', alignItems: 'center', padding: '10px'}}>
|
23 |
+
<span onClick={()=>window.location.href = '/'} className='gradient-text' style={{display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'center', fontSize: '20px'}}><GiRobotGrab size={25} color='#00c8ff'/>TS API</span>
|
24 |
+
<div className="menubtn gradient-text" style={{cursor: 'pointer'}} onClick={openNav}>☰ Menu</div>
|
25 |
+
<Navbar open={open} />
|
26 |
+
<div className="links" style={{justifyContent: 'space-between', padding: '10px'}}>
|
27 |
+
<Link href='/About'>About</Link>
|
28 |
+
<Link href='/About'>Docs</Link>
|
29 |
+
<Link href='/api'>API</Link>
|
30 |
+
<Link href='/Contact'>Contact</Link>
|
31 |
+
</div>
|
32 |
+
<div className="links" style={{justifyContent: 'space-between', padding: '10px'}}>
|
33 |
+
{loggedIn?<Link className='btn2' href='/api' style={{marginLeft: '10px' ,padding: '10px', borderRadius: '10px'}}><i className="animation"></i>DASHBOARD<i className="animation"></i></Link> :<Link className='btn2' href='/api' style={{marginLeft: '10px' ,padding: '10px', borderRadius: '10px'}}><i className="animation"></i>Get started<i className="animation"></i></Link>}
|
34 |
+
</div>
|
35 |
+
</div>
|
36 |
+
)
|
37 |
+
}
|
38 |
+
|
39 |
+
|
40 |
+
export default Header
|
app/components/Navbar.css
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.sidenav a{
|
2 |
+
font-size: small;
|
3 |
+
width: min-content;
|
4 |
+
}
|
5 |
+
|
6 |
+
.sidenav h3{
|
7 |
+
margin-left: 10px;
|
8 |
+
}
|
9 |
+
|
10 |
+
.sidenav{
|
11 |
+
display: flex;
|
12 |
+
flex-direction: column;
|
13 |
+
justify-content: center;
|
14 |
+
align-items: center;
|
15 |
+
height: 100%;
|
16 |
+
}
|
17 |
+
|
18 |
+
.sidenav .btn{
|
19 |
+
display: flex;
|
20 |
+
flex-direction: row;
|
21 |
+
align-items: center;
|
22 |
+
justify-content: center;
|
23 |
+
padding: 10px;
|
24 |
+
}
|
app/components/Navbar.jsx
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React from 'react'
|
2 |
+
import Link from 'next/link'
|
3 |
+
import '@/app/components/Navbar.css'
|
4 |
+
const Navbar = ({open}) => {
|
5 |
+
|
6 |
+
|
7 |
+
function closeNav() {
|
8 |
+
document.getElementById("mySidenav").style.width = "0";
|
9 |
+
}
|
10 |
+
return (
|
11 |
+
<div id="mySidenav" className="sidenav" style={{}}>
|
12 |
+
<div className="row" style={{justifyContent: 'space-between', padding: '10px', flexDirection: 'row', alignItems: 'center', display: 'flex'}}>
|
13 |
+
<span>Menu Bar</span>
|
14 |
+
<span href="#" className="closebtn" onClick={closeNav}>×</span>
|
15 |
+
</div>
|
16 |
+
<div className="line"></div>
|
17 |
+
<h3 style={{marginBottom: '10px'}}>Routes</h3>
|
18 |
+
<Link className="btn2" style={{marginBottom: '10px', backgroundColor: 'black', color: 'white'}} href="/"><i className="animation"></i>Home<i className="animation"></i></Link>
|
19 |
+
{/* <!--<Link onclick="scrollDown()">Download</Link>--> */}
|
20 |
+
<Link className='btn2' style={{marginBottom: '10px', backgroundColor: 'black', color: 'white'}} href="/api"><i className="animation"></i>API<i className="animation"></i></Link>
|
21 |
+
<Link className='btn2' style={{marginBottom: '10px', backgroundColor: 'black', color: 'white'}} href="/Linkbout"><i className="animation"></i>About<i className="animation"></i></Link>
|
22 |
+
<Link className='btn2' style={{marginBottom: '10px', backgroundColor: 'black', color: 'white'}} href="/support"><i className="animation"></i>Support<i className="animation"></i></Link>
|
23 |
+
|
24 |
+
<div className="line"></div>
|
25 |
+
<h3 style={{marginBottom: '10px'}}>Authenticate</h3>
|
26 |
+
<Link className='btn2' style={{marginBottom: '10px', backgroundColor: 'black', color: 'white'}} href="/login"><i className="animation"></i>Login<i className="animation"></i></Link>
|
27 |
+
<Link className='btn2' style={{marginBottom: '10px', backgroundColor: 'black', color: 'white'}} href="/signup"><i className="animation"></i>Sign UP<i className="animation"></i></Link>
|
28 |
+
<hr></hr>
|
29 |
+
</div>
|
30 |
+
)
|
31 |
+
}
|
32 |
+
|
33 |
+
export default Navbar;
|
app/components/PerChatCard.css
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
.apicard{
|
2 |
+
margin: 10px;
|
3 |
+
}
|
app/components/PerChatCard.jsx
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use client"
|
2 |
+
|
3 |
+
import React from 'react'
|
4 |
+
import Link from 'next/link'
|
5 |
+
import '@/app/components/PerChatCard.css'
|
6 |
+
const PerChatCard = ({data, open, setOpen, setData}) => {
|
7 |
+
//console.log(data)
|
8 |
+
|
9 |
+
const api = data
|
10 |
+
const handleClick = (data)=>{
|
11 |
+
if (!open){
|
12 |
+
setData(data)
|
13 |
+
}
|
14 |
+
setOpen(!open)
|
15 |
+
}
|
16 |
+
return (
|
17 |
+
<div className="apicard">
|
18 |
+
|
19 |
+
<button className="btn2" style={{width: '100%'}} onClick={()=>handleClick(data)}><i className="animation"></i><span className="">{data.name}</span><i className="animation"></i></button>
|
20 |
+
|
21 |
+
</div>
|
22 |
+
|
23 |
+
)
|
24 |
+
}
|
25 |
+
|
26 |
+
export default PerChatCard
|
app/favicon.ico
ADDED
app/globals.css
ADDED
@@ -0,0 +1,243 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@tailwind base;
|
2 |
+
@tailwind components;
|
3 |
+
@tailwind utilities;
|
4 |
+
|
5 |
+
body {
|
6 |
+
color: #ffffff;
|
7 |
+
background: #000000; /* fallback for old browsers */
|
8 |
+
|
9 |
+
}
|
10 |
+
|
11 |
+
.flex-col {
|
12 |
+
display: flex;
|
13 |
+
flex-direction: column;
|
14 |
+
}
|
15 |
+
|
16 |
+
.flex-row{
|
17 |
+
display: flex;
|
18 |
+
flex-direction: row;
|
19 |
+
}
|
20 |
+
|
21 |
+
.fade-in-text {
|
22 |
+
opacity: 0;
|
23 |
+
transition: opacity 0.5s ease-in-out;
|
24 |
+
}
|
25 |
+
|
26 |
+
.fade-in-text.active {
|
27 |
+
opacity: 1;
|
28 |
+
}
|
29 |
+
|
30 |
+
.modal{
|
31 |
+
position: fixed;
|
32 |
+
top: 50%;
|
33 |
+
left: 50%;
|
34 |
+
transform: translate(-50%, -50%);
|
35 |
+
right: 0;
|
36 |
+
bottom: 0;
|
37 |
+
background-color: rgba(0, 0, 0, 0.8);
|
38 |
+
backdrop-filter: blur(10px);
|
39 |
+
display: flex;
|
40 |
+
flex-direction: column;
|
41 |
+
border-radius: 20px;
|
42 |
+
justify-content: center;
|
43 |
+
align-items: center;
|
44 |
+
z-index: 9999;
|
45 |
+
padding: 20px;
|
46 |
+
width: 90%;
|
47 |
+
max-width: 800px;
|
48 |
+
}
|
49 |
+
|
50 |
+
.modal iframe{
|
51 |
+
width: 100%;
|
52 |
+
height: 100%;
|
53 |
+
border-radius: 10px;
|
54 |
+
}
|
55 |
+
|
56 |
+
.btn{
|
57 |
+
padding: 10px;
|
58 |
+
border-radius: 10px;
|
59 |
+
/* background-color: white; */
|
60 |
+
background: radial-gradient(231.94% 231.94% at 50% 100%, #00c8ff 0, rgba(38, 53, 193, 0) 25.24%), linear-gradient(180deg, rgba(243, 238, 255, 0), rgba(243, 238, 255, .04)), rgba(147, 130, 255, .01);
|
61 |
+
background-image: linear-gradient(to right, #00c8ff, #2635c1);
|
62 |
+
|
63 |
+
color: white;
|
64 |
+
transition: 200ms;
|
65 |
+
box-shadow: 0 0 140px rgb(0, 162, 255);
|
66 |
+
-webkit-background-clip: text; /* Clip the gradient to the text */
|
67 |
+
background-clip: text;
|
68 |
+
-webkit-text-fill-color: transparent; /* Make the text transparent */
|
69 |
+
}
|
70 |
+
|
71 |
+
|
72 |
+
input{
|
73 |
+
padding: 10px;
|
74 |
+
border-radius: 10px;
|
75 |
+
border: none;
|
76 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
77 |
+
background-color: transparent;
|
78 |
+
color: white;
|
79 |
+
padding: 10px;
|
80 |
+
border: #00c8ff 2px solid;
|
81 |
+
|
82 |
+
|
83 |
+
}
|
84 |
+
|
85 |
+
|
86 |
+
.btn:hover {
|
87 |
+
|
88 |
+
-webkit-background-clip: text; /* Clip the gradient to the text */
|
89 |
+
background-clip: text;
|
90 |
+
background: linear-gradient(to right, #00c8ff, #2635c1);
|
91 |
+
color: white;
|
92 |
+
-webkit-text-fill-color: white;
|
93 |
+
box-shadow: 0 0 100px rgba(255, 255, 255, 0.55);
|
94 |
+
}
|
95 |
+
|
96 |
+
.gradient-text {
|
97 |
+
background: linear-gradient(to right, #00c8ff, #2635c1);
|
98 |
+
-webkit-background-clip: text; /* Clip the gradient to the text */
|
99 |
+
background-clip: text;
|
100 |
+
-webkit-text-fill-color: transparent; /* Make the text transparent */
|
101 |
+
}
|
102 |
+
.title{
|
103 |
+
font-size: 70px;
|
104 |
+
font-weight: '300';
|
105 |
+
}
|
106 |
+
@media screen and (max-width: 510px) {
|
107 |
+
.title{
|
108 |
+
font-size: 30px;
|
109 |
+
font-weight: bold;
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
|
114 |
+
.thin-scroll::-webkit-scrollbar {
|
115 |
+
width: 4px;
|
116 |
+
background-color: rgba(0, 89, 255, 0.158); /* make scrollbar transparent */
|
117 |
+
border-radius: 10px;
|
118 |
+
cursor: pointer;
|
119 |
+
}
|
120 |
+
|
121 |
+
.thin-scroll::-webkit-scrollbar-thumb {
|
122 |
+
background-color: rgba(0, 89, 255, 0.2); /* make scrollbar thumb transparent */
|
123 |
+
border-radius: 10px;
|
124 |
+
cursor: pointer;
|
125 |
+
|
126 |
+
|
127 |
+
}
|
128 |
+
|
129 |
+
.row{
|
130 |
+
flex-wrap: wrap;
|
131 |
+
}
|
132 |
+
|
133 |
+
.card{
|
134 |
+
|
135 |
+
margin-top: 100px;
|
136 |
+
border-radius: 30px;
|
137 |
+
box-shadow: 0 20px 50px rgba(0, 172, 240, 0.717);
|
138 |
+
background-color: rgba(67, 67, 67, 0.1);
|
139 |
+
backdrop-filter: blur(10px);
|
140 |
+
transition-duration: 300ms;
|
141 |
+
}
|
142 |
+
|
143 |
+
.card h3{
|
144 |
+
background: linear-gradient(to right, #1c758e, #2635c1);
|
145 |
+
font-size: 30px;
|
146 |
+
padding: 10px;
|
147 |
+
border-radius: 30px 30px 0px 0px;
|
148 |
+
font-weight: 200;
|
149 |
+
margin: 0;
|
150 |
+
|
151 |
+
}
|
152 |
+
|
153 |
+
.card p{
|
154 |
+
background: linear-gradient(to right, #1c758e, #2635c1);
|
155 |
+
-webkit-background-clip: text; /* Clip the gradient to the text */
|
156 |
+
background-clip: text;
|
157 |
+
-webkit-text-fill-color: transparent; /* Make the text transparent */
|
158 |
+
|
159 |
+
}
|
160 |
+
|
161 |
+
.card:hover{
|
162 |
+
box-shadow: 0 30px 50px rgba(0, 172, 240, 0.717);
|
163 |
+
transform: translateY(-10px);
|
164 |
+
}
|
165 |
+
|
166 |
+
.card p::before{
|
167 |
+
content: "";
|
168 |
+
display: inline-block;
|
169 |
+
width: 10px;
|
170 |
+
height: 10px;
|
171 |
+
background: linear-gradient(to right, #00c8ff, #2635c1);
|
172 |
+
border-radius: 50%;
|
173 |
+
margin-right: 20px;
|
174 |
+
}
|
175 |
+
|
176 |
+
.card p{
|
177 |
+
color: rgba(255, 255, 255, 0.516);
|
178 |
+
font-size: 17px;
|
179 |
+
text-align: left;
|
180 |
+
margin: 10px;
|
181 |
+
}
|
182 |
+
|
183 |
+
.card .line{
|
184 |
+
background: linear-gradient(to right, #00c8ff, #2635c1);
|
185 |
+
|
186 |
+
}
|
187 |
+
|
188 |
+
.card .n{
|
189 |
+
background-image: none;
|
190 |
+
border-radius: 0px 0px 30px 30px;
|
191 |
+
background-color: rgb(11, 11, 11);
|
192 |
+
display: flex;
|
193 |
+
justify-content: center;
|
194 |
+
align-items: center;
|
195 |
+
padding: 10px;
|
196 |
+
}
|
197 |
+
|
198 |
+
.btn2 {
|
199 |
+
outline: 0;
|
200 |
+
display: inline-flex;
|
201 |
+
align-items: center;
|
202 |
+
justify-content: space-between;
|
203 |
+
background: linear-gradient(to right, #00c8ff, #2635c1);
|
204 |
+
min-width: 200px;
|
205 |
+
border: 0;
|
206 |
+
border-radius: 30px;
|
207 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
|
208 |
+
box-sizing: border-box;
|
209 |
+
padding: 16px 20px;
|
210 |
+
color: #fff;
|
211 |
+
font-size: 12px;
|
212 |
+
font-weight: 600;
|
213 |
+
letter-spacing: 1.2px;
|
214 |
+
text-transform: uppercase;
|
215 |
+
overflow: hidden;
|
216 |
+
cursor: pointer;
|
217 |
+
transition-duration: 400ms;
|
218 |
+
}
|
219 |
+
|
220 |
+
.btn2:hover {
|
221 |
+
opacity: .55;
|
222 |
+
padding: 16px 20px;
|
223 |
+
|
224 |
+
}
|
225 |
+
|
226 |
+
.btn2 .animation {
|
227 |
+
border-radius: 100%;
|
228 |
+
animation: ripple 0.6s linear infinite;
|
229 |
+
}
|
230 |
+
|
231 |
+
@keyframes ripple {
|
232 |
+
0% {
|
233 |
+
box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.1), 0 0 0 20px rgba(255, 255, 255, 0.1), 0 0 0 40px rgba(255, 255, 255, 0.1), 0 0 0 60px rgba(255, 255, 255, 0.1);
|
234 |
+
}
|
235 |
+
|
236 |
+
100% {
|
237 |
+
box-shadow: 0 0 0 20px rgba(255, 255, 255, 0.1), 0 0 0 40px rgba(255, 255, 255, 0.1), 0 0 0 60px rgba(255, 255, 255, 0.1), 0 0 0 80px rgba(255, 255, 255, 0);
|
238 |
+
}
|
239 |
+
}
|
240 |
+
|
241 |
+
.space{
|
242 |
+
height: 100px;
|
243 |
+
}
|
app/layout.jsx
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import {Inter as Inter } from "next/font/google";
|
2 |
+
import "@/app/globals.css";
|
3 |
+
import Header from "./components/Header";
|
4 |
+
import Footer from "./components/Footer";
|
5 |
+
|
6 |
+
const inter = Inter({ subsets: ["latin"] });
|
7 |
+
|
8 |
+
export const metadata = {
|
9 |
+
title: "TS Api",
|
10 |
+
description:
|
11 |
+
"Your one stop destination for all Artificial Intelligence Models and APIs. Explore and try out all the models available.",
|
12 |
+
};
|
13 |
+
|
14 |
+
export default function RootLayout({ children }) {
|
15 |
+
return (
|
16 |
+
<html lang="en">
|
17 |
+
<body className={inter.className}>
|
18 |
+
<Header />
|
19 |
+
{children}
|
20 |
+
<Footer />
|
21 |
+
</body>
|
22 |
+
</html>
|
23 |
+
);
|
24 |
+
}
|
app/others/eidmubarak/[name]/page.jsx
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
import React from "react";
|
4 |
+
import "./style.css";
|
5 |
+
import Link from "next/link";
|
6 |
+
const page = ( {params} ) => {
|
7 |
+
console.log(params.name)
|
8 |
+
return (
|
9 |
+
<div
|
10 |
+
style={{
|
11 |
+
display: "flex",
|
12 |
+
flexDirection: "column",
|
13 |
+
alignItems: "center",
|
14 |
+
justifyContent: "center",
|
15 |
+
width: "100%",
|
16 |
+
minHeight: "100vh",
|
17 |
+
textAlign: "center",
|
18 |
+
|
19 |
+
}}
|
20 |
+
>
|
21 |
+
|
22 |
+
<div
|
23 |
+
className="col"
|
24 |
+
style={{
|
25 |
+
maxWidth: "700px",
|
26 |
+
textAlign: "center",
|
27 |
+
padding: "40px",
|
28 |
+
borderRadius: "30px",
|
29 |
+
boxShadow: "0 0 100px rgba(10, 100, 200, 0.6)",
|
30 |
+
alignItems: "center",
|
31 |
+
justifyContent: "center",
|
32 |
+
width: "90%",
|
33 |
+
marginTop: "50px",
|
34 |
+
marginBottom: "50px",
|
35 |
+
}}
|
36 |
+
>
|
37 |
+
<p style={{color:"cyan"}}> পবিত্র ইদ-উল-ফিতরের শুভেচ্ছা </p>
|
38 |
+
<h3 className="gradient-text" style={{ marginBottom: "30px",fontSize: "60px" }}>
|
39 |
+
ইদ মুবারক
|
40 |
+
</h3>
|
41 |
+
<p style={{ fontSize: "20px", color: "gray" }}>
|
42 |
+
{" "}
|
43 |
+
<span style={{color:"gray"}}>تقبل الله منا ومنكم</span><br />
|
44 |
+
<span style={{color:"gray"}}>তাক্বাব্বালাল্লাহু মিন্না ওয়া মিনকুম🤗🫂</span>
|
45 |
+
<br />
|
46 |
+
এই বিশেষ দিনটি আপনার জন্য আনন্দ, শান্তি এবং সমৃদ্ধি নিয়ে আসুক। 🎉🌙❤️
|
47 |
+
|
48 |
+
<br />
|
49 |
+
<span className="gradient-text mt-4" style={{ fontSize: "18px", marginTop: "30px" }}>
|
50 |
+
#ইদ_মুবারক
|
51 |
+
</span>
|
52 |
+
</p>
|
53 |
+
<p style={{ fontSize: "14px", color: "gray", alignSelf: "flex-end" }}>- {decodeURIComponent(params.name)}</p>
|
54 |
+
|
55 |
+
</div>
|
56 |
+
<Link style={{marginTop: "50px"}} className="btn2" href="/others/eidmubarak/generate"><i className="animation"></i>এবার আপনিও এরকম একটি টেম্পলেট তৈরি করুন<i className="animation"></i></Link>
|
57 |
+
</div>
|
58 |
+
);
|
59 |
+
};
|
60 |
+
|
61 |
+
export default page;
|
app/others/eidmubarak/[name]/style.css
ADDED
File without changes
|
app/others/eidmubarak/generate/page.jsx
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use client"
|
2 |
+
|
3 |
+
import React from "react";
|
4 |
+
import "./style.css";
|
5 |
+
import Link from "next/link";
|
6 |
+
const page = ( {params} ) => {
|
7 |
+
|
8 |
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
9 |
+
const [link, setLink] = React.useState('./')
|
10 |
+
console.log(params.name)
|
11 |
+
return (
|
12 |
+
<div
|
13 |
+
|
14 |
+
className="temp"
|
15 |
+
style={{
|
16 |
+
display: "flex",
|
17 |
+
flexDirection: "column",
|
18 |
+
alignItems: "center",
|
19 |
+
justifyContent: "center",
|
20 |
+
width: "100%",
|
21 |
+
minHeight: "100vh",
|
22 |
+
textAlign: "center",
|
23 |
+
|
24 |
+
}}
|
25 |
+
>
|
26 |
+
|
27 |
+
<div
|
28 |
+
className="col"
|
29 |
+
style={{
|
30 |
+
maxWidth: "700px",
|
31 |
+
textAlign: "center",
|
32 |
+
padding: "40px",
|
33 |
+
borderRadius: "30px",
|
34 |
+
boxShadow: "0 0 100px rgba(10, 100, 200, 0.6)",
|
35 |
+
alignItems: "center",
|
36 |
+
justifyContent: "center",
|
37 |
+
width: "90%",
|
38 |
+
marginTop: "50px",
|
39 |
+
marginBottom: "50px",
|
40 |
+
}}
|
41 |
+
>
|
42 |
+
<p style={{marginBottom:"30px"}}>এখানে আপনার নাম দিনঃ </p>
|
43 |
+
<input style={{width:"100%", padding:"10px", borderRadius:"10px", border:"none", boxShadow:"0 0 10px rgba(0, 0, 0, 0.1)", backgroundColor:"#111111", color:"white", outline:'none', border: "#00c8ff 2px solid"}} onChange={(e)=>{'./others/eidmubarak/'+setLink(e.target.value)}} placeholder="আপনার নাম" onKeyDown={(e)=>{if(e.key === 'Enter'){window.location.href = link || './'}}}></input>
|
44 |
+
|
45 |
+
<Link style={{marginTop: "50px"}} className="btn2" href={link}><i className="animation"></i>লিঙ্ক তৈরি করুন<i className="animation"></i></Link>
|
46 |
+
</div>
|
47 |
+
|
48 |
+
</div>
|
49 |
+
);
|
50 |
+
};
|
51 |
+
|
52 |
+
export default page;
|
app/others/eidmubarak/generate/style.css
ADDED
File without changes
|
app/page.jsx
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
import Image from "next/image";
|
4 |
+
import "@/app/globals.css";
|
5 |
+
import Link from "next/link";
|
6 |
+
|
7 |
+
|
8 |
+
export default function Home() {
|
9 |
+
|
10 |
+
|
11 |
+
return (
|
12 |
+
<div style={{width: '100%', display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center'}}>
|
13 |
+
|
14 |
+
<div className="container col" style={{padding: '20px', alignItems: 'center', justifyContent: 'center', backgroundColor: 'black', width: '100%', padding: '20px'}}>
|
15 |
+
<div style={{display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', width: '100%', minHeight: '80vh', textAlign: 'center'}}>
|
16 |
+
<h1 className="title" style={{ margin: '30px'}}>Power up your projects with the most powerful <span className="gradient-text">AI Models</span></h1>
|
17 |
+
<p style={{maxWidth: '700px', textAlign: 'center', fontWeight: '200'}}>Unleash your insights into your messenger chats. Discover the hidden secrets of your conversations and make informed decisions.</p>
|
18 |
+
<Link className="btn2 mt-8 mb-8" href={'/api'}><i className="animation"></i>Get Started<i className="animation"></i></Link>
|
19 |
+
<p style={{maxWidth: '700px', textAlign: 'center', fontSize: '12px', color: 'gray'}}>As we used reverse engineer technology so they all are as fast as the origin websites and more significantly they all are free!</p>
|
20 |
+
|
21 |
+
</div>
|
22 |
+
|
23 |
+
<div className="col" style={{padding: '20px', alignItems: 'center', justifyContent: 'center', width: '100%', minHeight: 'calc(80vh)', textAlign: 'center'}}>
|
24 |
+
<div className="line mb-10" style={{marginBottom: '30px'}}></div>
|
25 |
+
<h1 className="title gradient-text" style={{marginTop: '100px'}}>
|
26 |
+
Get in touch with AIs like never before
|
27 |
+
</h1>
|
28 |
+
<p className="mt-8" style={{fontSize: '22px', color: 'gray', maxWidth: '70vw'}}>
|
29 |
+
You can literally use the premium AI Models without any api key or any kind of authentication hassel.
|
30 |
+
|
31 |
+
</p>
|
32 |
+
<div className="row" style={{marginTop: '50px', width: '100%', justifyContent: 'space-around', alignItems: 'center'}}>
|
33 |
+
<div className="card">
|
34 |
+
<h3 className="btn2" style={{width: '100%'}}><i className="animation"></i>FREE<i className="animation"></i></h3>
|
35 |
+
<div className="p-6"> <p >No login required</p>
|
36 |
+
<p >No api key required</p>
|
37 |
+
<p >No authentication required</p>
|
38 |
+
<p >No payment required</p></div>
|
39 |
+
<h3 className="n"><button className="btn" style={{fontSize: '12px', margin: '0px'}}>Learn More</button></h3>
|
40 |
+
|
41 |
+
</div>
|
42 |
+
<div className="card">
|
43 |
+
<h3 className="btn2" style={{width: '100%'}}><i className="animation"></i>FAST<i className="animation"></i></h3>
|
44 |
+
<div className="p-6">
|
45 |
+
<p >Works as fast as a blitz</p>
|
46 |
+
<p >Faster response in gpt AIs</p>
|
47 |
+
<p >Fast Response Generation</p>
|
48 |
+
<p >Integrated Optimization</p>
|
49 |
+
</div>
|
50 |
+
<h3 className="n"><button className="btn" style={{fontSize: '12px', margin: '0px'}}>Learn More</button></h3>
|
51 |
+
|
52 |
+
|
53 |
+
</div>
|
54 |
+
<div className="card">
|
55 |
+
<h3 className="btn2" style={{width: '100%'}}><i className="animation"></i>SUPPORT<i className="animation"></i></h3>
|
56 |
+
<div className="p-6"> <p >Supports all programming languages!</p>
|
57 |
+
<p >Uptime 99.99%</p>
|
58 |
+
<p >Supports MS Copilot, Gemini and more!</p>
|
59 |
+
<p >Elegant Syntax</p></div>
|
60 |
+
<h3 className="n"><button className="btn" style={{fontSize: '12px', margin: '0px'}}>Learn More</button></h3>
|
61 |
+
|
62 |
+
</div>
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
|
66 |
+
<div className="space"></div>
|
67 |
+
</div>
|
68 |
+
|
69 |
+
</div>
|
70 |
+
);
|
71 |
+
}
|
jsconfig.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"compilerOptions": {
|
3 |
+
"paths": {
|
4 |
+
"@/*": ["./*"]
|
5 |
+
}
|
6 |
+
}
|
7 |
+
}
|
next.config.mjs
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/** @type {import('next').NextConfig} */
|
2 |
+
const nextConfig = {};
|
3 |
+
|
4 |
+
export default nextConfig;
|
package-lock.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
package.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "ts-api",
|
3 |
+
"version": "0.1.0",
|
4 |
+
"private": true,
|
5 |
+
"scripts": {
|
6 |
+
"dev": "next dev",
|
7 |
+
"build": "next build",
|
8 |
+
"start": "next start",
|
9 |
+
"lint": "next lint"
|
10 |
+
},
|
11 |
+
"dependencies": {
|
12 |
+
"@shuddho11288/blackboxai-api": "^1.2.0",
|
13 |
+
"@shuddho11288/llama-api": "^1.1.0",
|
14 |
+
"@shuddho11288/mistral-api": "^1.1.0",
|
15 |
+
"@shuddho11288/sdxl-imagine": "^1.1.0",
|
16 |
+
"axios": "^1.6.8",
|
17 |
+
"js-cookie": "^3.0.5",
|
18 |
+
"next": "14.1.4",
|
19 |
+
"react": "^18",
|
20 |
+
"react-confetti": "^6.1.0",
|
21 |
+
"react-confetti-explosion": "^2.1.2",
|
22 |
+
"react-dom": "^18",
|
23 |
+
"react-icons": "^5.0.1"
|
24 |
+
},
|
25 |
+
"devDependencies": {
|
26 |
+
"autoprefixer": "^10.0.1",
|
27 |
+
"eslint": "^8",
|
28 |
+
"eslint-config-next": "14.1.4",
|
29 |
+
"postcss": "^8",
|
30 |
+
"tailwindcss": "^3.3.0"
|
31 |
+
}
|
32 |
+
}
|
pages/api/apiList.js
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// pages/api/apiList.js
|
2 |
+
|
3 |
+
import fs from 'fs';
|
4 |
+
import path from 'path';
|
5 |
+
|
6 |
+
export default function handler(req, res) {
|
7 |
+
const apiDir = path.join(process.cwd(), 'pages/api');
|
8 |
+
|
9 |
+
try {
|
10 |
+
// Read the directory synchronously
|
11 |
+
const files = fs.readdirSync(apiDir);
|
12 |
+
|
13 |
+
// Filter out the current file and non-JavaScript files
|
14 |
+
const jsFiles = files.filter(file => file !== 'apiList.js' && file.endsWith('.js'));
|
15 |
+
|
16 |
+
// Initialize an array to store API configurations
|
17 |
+
const apiList = [];
|
18 |
+
|
19 |
+
// Load configurations from each JavaScript file
|
20 |
+
for (const file of jsFiles) {
|
21 |
+
const filePath = path.join(apiDir, file);
|
22 |
+
|
23 |
+
// Read the file content
|
24 |
+
const fileContent = fs.readFileSync(filePath, 'utf-8');
|
25 |
+
|
26 |
+
// Extract JSON using regex
|
27 |
+
const jsonMatch = fileContent.match(/export\s+const\s+config\s+=\s+({[\s\S]*?})/);
|
28 |
+
|
29 |
+
// If JSON is found, parse it and add it to the API list
|
30 |
+
if (jsonMatch && jsonMatch[1]) {
|
31 |
+
console.log(jsonMatch[1])
|
32 |
+
const config = JSON.parse(jsonMatch[1]);
|
33 |
+
apiList.push({...config });
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
// save the json at public/apiList.json (from the root)
|
38 |
+
fs.writeFileSync(
|
39 |
+
path.join(process.cwd(), 'public/apiList.json'),
|
40 |
+
JSON.stringify(apiList, null, 2),
|
41 |
+
);
|
42 |
+
|
43 |
+
// Send the information as a JSON response
|
44 |
+
res.status(200).json(apiList);
|
45 |
+
} catch (error) {
|
46 |
+
console.error('Error reading API directory:', error);
|
47 |
+
res.status(500).json({ error: 'Internal Server Error' });
|
48 |
+
}
|
49 |
+
}
|
pages/api/bing.js
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import axios from "axios";
|
2 |
+
|
3 |
+
export const config = {
|
4 |
+
"name": "bing",
|
5 |
+
"url": "/api/bing",
|
6 |
+
"description": "Get response from Bing. Bing is a very powerful AI that can do a lot of things. It have access to real time internet! It can provide you with the latest news, weather, and more.",
|
7 |
+
"query": "prompt",
|
8 |
+
"response": "text",
|
9 |
+
"testURL": "./api/bing?prompt=hello"
|
10 |
+
}
|
11 |
+
|
12 |
+
export default async function handler(req, res2) {
|
13 |
+
let prompt = req.query.prompt;
|
14 |
+
|
15 |
+
axios.post('https://niansuhai-bingo.hf.space/api/create', {
|
16 |
+
|
17 |
+
}).then((res) => {
|
18 |
+
axios.post('https://niansuhai-bingo.hf.space/api/sydney',{
|
19 |
+
...res.data, "invocationId": 0,
|
20 |
+
"conversationStyle": "Balanced",
|
21 |
+
"prompt": prompt,
|
22 |
+
"allowSearch": true,
|
23 |
+
"context": ""
|
24 |
+
}).then((res) => {
|
25 |
+
let jsonString = res.data
|
26 |
+
// console.log(jsonString)
|
27 |
+
// require('fs').writeFileSync('output.txt', jsonString)
|
28 |
+
// Define the regex pattern to match the desired text
|
29 |
+
const regexPattern = /"message":"(.*?)"/;
|
30 |
+
|
31 |
+
// Use the regex pattern to find matches in the JSON string
|
32 |
+
const matches = jsonString.match(regexPattern);
|
33 |
+
|
34 |
+
// Extract the matched text
|
35 |
+
const extractedText = matches ? matches[matches.length-1] : null;
|
36 |
+
|
37 |
+
function replaceUnicodeWithEmoji(inputString) {
|
38 |
+
return inputString.replace(/\\u([\d\w]{4})/gi, (match, grp) => {
|
39 |
+
return String.fromCharCode(parseInt(grp, 16));
|
40 |
+
});
|
41 |
+
}
|
42 |
+
|
43 |
+
const input = extractedText;
|
44 |
+
const output = replaceUnicodeWithEmoji(input);
|
45 |
+
console.log(output.split('\\n').join('\n'));
|
46 |
+
res2.status(200).json({ "status": "Success", "message": output.split('\\n').join('\n') }); // Output: Hello! How can I assist you today? 😊
|
47 |
+
|
48 |
+
})
|
49 |
+
})
|
50 |
+
}
|
pages/api/blackbox.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import axios from "axios";
|
2 |
+
export const config = {
|
3 |
+
"name": "blackbox",
|
4 |
+
"url": "/api/blackbox",
|
5 |
+
"description": "Get response from Blackbox AI Model. Blackbox AI is a very powerful AI that can do a lot of things.",
|
6 |
+
"query": "prompt",
|
7 |
+
"response": "text",
|
8 |
+
"testURL": "./api/blackbox?prompt=hello"
|
9 |
+
|
10 |
+
}
|
11 |
+
|
12 |
+
const {blackbox} = require('@shuddho11288/blackboxai-api')
|
13 |
+
|
14 |
+
export default async function handler(req, res) {
|
15 |
+
const prompt = req.query.prompt;
|
16 |
+
const response = await blackbox(prompt);
|
17 |
+
res.status(200).json({response});
|
18 |
+
}
|
pages/api/chatgpt3.js
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// pages/api/chat.js
|
2 |
+
|
3 |
+
import axios from 'axios';
|
4 |
+
|
5 |
+
export const config = {
|
6 |
+
"name": "chatgpt3",
|
7 |
+
"url": "/api/chatgpt3",
|
8 |
+
"description": "Get response from Chatgpt3. Chatgpt3 is a ChatGPT API. It can be used to get responses from ChatGPT. It can provide you with the latest news, weather, and more.",
|
9 |
+
"query": "prompt",
|
10 |
+
"response": "text",
|
11 |
+
"testURL": "./api/chatgpt3?prompt=hello"
|
12 |
+
}
|
13 |
+
export default async function handler(req, res) {
|
14 |
+
if (req.method === 'GET') {
|
15 |
+
// Extract prompt from the query parameters
|
16 |
+
const { prompt } = req.query;
|
17 |
+
|
18 |
+
// Define the endpoint URL
|
19 |
+
const url = "https://chatgpt4online.org/wp-json/mwai-ui/v1/chats/submit";
|
20 |
+
|
21 |
+
// Get the HTML content of the chat page to extract the X-Wp-Nonce
|
22 |
+
try {
|
23 |
+
const response = await axios.get('https://chatgpt4online.org/#chat');
|
24 |
+
const string = response.data;
|
25 |
+
const regex = /restNonce":"([^&]+)"/;
|
26 |
+
const match = string.match(regex);
|
27 |
+
|
28 |
+
if (match) {
|
29 |
+
const restNonce = match[1];
|
30 |
+
|
31 |
+
// Define the payload data
|
32 |
+
const payload = {
|
33 |
+
botId: "chatbot-qm966k",
|
34 |
+
newMessage: prompt || "Hi", // Using prompt or "Hi" if prompt is not provided
|
35 |
+
newFileId: null,
|
36 |
+
stream: false
|
37 |
+
};
|
38 |
+
|
39 |
+
// Define the headers
|
40 |
+
const headers = {
|
41 |
+
'X-Wp-Nonce': restNonce
|
42 |
+
};
|
43 |
+
|
44 |
+
// Send POST request with headers
|
45 |
+
const postResponse = await axios.post(url, payload, { headers });
|
46 |
+
|
47 |
+
console.log("Chat message submitted successfully.");
|
48 |
+
// Optionally, you can log the response data
|
49 |
+
console.log("Response data:", postResponse.data);
|
50 |
+
|
51 |
+
res.status(200).json({ message: "Chat message submitted successfully", responseData: postResponse.data });
|
52 |
+
} else {
|
53 |
+
console.log('No match found');
|
54 |
+
res.status(500).json({ message: "Failed to fetch X-Wp-Nonce" });
|
55 |
+
}
|
56 |
+
} catch (error) {
|
57 |
+
console.error("Failed to submit chat message:", error.message);
|
58 |
+
// Optionally, you can log the error response data
|
59 |
+
if (error.response) {
|
60 |
+
console.error("Error response data:", error.response.data);
|
61 |
+
}
|
62 |
+
res.status(error.response?.status || 500).json({ message: "Failed to submit chat message" });
|
63 |
+
}
|
64 |
+
} else {
|
65 |
+
res.setHeader('Allow', ['GET']);
|
66 |
+
res.status(405).end(`Method ${req.method} Not Allowed`);
|
67 |
+
}
|
68 |
+
}
|
pages/api/chatgpt4.js
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// pages/api/chat.js
|
2 |
+
|
3 |
+
import axios from 'axios';
|
4 |
+
|
5 |
+
export const config = {
|
6 |
+
"name": "chatgpt4",
|
7 |
+
"url": "/api/chatgpt4",
|
8 |
+
"description": "Get response from Chatgpt4. Chatgpt4 is a ChatGPT API. It can be used to get responses from ChatGPT. It can provide you with the latest news, weather, and more.",
|
9 |
+
"query": "prompt",
|
10 |
+
"response": "text",
|
11 |
+
"testURL": "./api/chatgpt4?prompt=hello"
|
12 |
+
}
|
13 |
+
export default async function handler(req, res) {
|
14 |
+
if (req.method === 'GET') {
|
15 |
+
// Extract prompt from the query parameters
|
16 |
+
const { prompt } = req.query;
|
17 |
+
|
18 |
+
// Define the endpoint URL
|
19 |
+
const url = "https://chatgpt4online.org/wp-json/mwai-ui/v1/chats/submit";
|
20 |
+
|
21 |
+
// Get the HTML content of the chat page to extract the X-Wp-Nonce
|
22 |
+
try {
|
23 |
+
const response = await axios.get('https://chatgpt4online.org/#chat');
|
24 |
+
const string = response.data;
|
25 |
+
const regex = /restNonce":"([^&]+)"/;
|
26 |
+
const match = string.match(regex);
|
27 |
+
|
28 |
+
if (match) {
|
29 |
+
const restNonce = match[1];
|
30 |
+
|
31 |
+
// Define the payload data
|
32 |
+
const payload = {
|
33 |
+
botId: "default",
|
34 |
+
newMessage: prompt || "Hi", // Using prompt or "Hi" if prompt is not provided
|
35 |
+
newFileId: null,
|
36 |
+
stream: false
|
37 |
+
};
|
38 |
+
|
39 |
+
// Define the headers
|
40 |
+
const headers = {
|
41 |
+
'X-Wp-Nonce': restNonce
|
42 |
+
};
|
43 |
+
|
44 |
+
// Send POST request with headers
|
45 |
+
const postResponse = await axios.post(url, payload, { headers });
|
46 |
+
|
47 |
+
console.log("Chat message submitted successfully.");
|
48 |
+
// Optionally, you can log the response data
|
49 |
+
console.log("Response data:", postResponse.data);
|
50 |
+
|
51 |
+
res.status(200).json({ message: "Chat message submitted successfully", responseData: postResponse.data });
|
52 |
+
} else {
|
53 |
+
console.log('No match found');
|
54 |
+
res.status(500).json({ message: "Failed to fetch X-Wp-Nonce" });
|
55 |
+
}
|
56 |
+
} catch (error) {
|
57 |
+
console.error("Failed to submit chat message:", error.message);
|
58 |
+
// Optionally, you can log the error response data
|
59 |
+
if (error.response) {
|
60 |
+
console.error("Error response data:", error.response.data);
|
61 |
+
}
|
62 |
+
res.status(error.response?.status || 500).json({ message: "Failed to submit chat message" });
|
63 |
+
}
|
64 |
+
} else {
|
65 |
+
res.setHeader('Allow', ['GET']);
|
66 |
+
res.status(405).end(`Method ${req.method} Not Allowed`);
|
67 |
+
}
|
68 |
+
}
|
pages/api/geminiweb.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import axios from "axios";
|
2 |
+
const ENDPOINT = 'https://blackearthauction.com/Bard/api?req='
|
3 |
+
export const config = {
|
4 |
+
"name" : "geminiweb",
|
5 |
+
"url" : "/api/geminiweb",
|
6 |
+
"description" : "Get response from Gemini AI. Gemini AI is a very powerful AI that can do a lot of things. It have access to real time internet! It can provide you with the latest news, weather, and more.",
|
7 |
+
"query" : "prompt",
|
8 |
+
"response" : "text",
|
9 |
+
"testURL" : "./api/geminiweb?prompt=hello"
|
10 |
+
}
|
11 |
+
export default async function handler(req, res) {
|
12 |
+
let prompt = req.query.prompt;
|
13 |
+
let result = await axios.get(ENDPOINT + encodeURIComponent(prompt+' Tone of reply should be Professional'))
|
14 |
+
console.log(result.data.response)
|
15 |
+
|
16 |
+
result = result.data.response
|
17 |
+
res.status(200).json({
|
18 |
+
reply: result
|
19 |
+
});
|
20 |
+
|
21 |
+
|
22 |
+
}
|
23 |
+
|
pages/api/huggingchat.js
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// pages/api/chat.js
|
2 |
+
|
3 |
+
import axios from 'axios';
|
4 |
+
export const config = {
|
5 |
+
"name" : "huggingchat",
|
6 |
+
"url" : "/api/huggingchat",
|
7 |
+
"description" : "Get response from huggingchat AI. huggingchat AI is a very powerful AI that can do a lot of things. It have access to real time internet! It can provide you with the latest news, weather, and more.",
|
8 |
+
"query" : "prompt, web_search",
|
9 |
+
"response" : "text",
|
10 |
+
"testURL" : "./api/huggingchat?prompt=hello&web_search=false"
|
11 |
+
}
|
12 |
+
|
13 |
+
const getUUID = async ()=>{
|
14 |
+
|
15 |
+
const headers = {
|
16 |
+
Cookie: '_ga=GA1.1.263364295.1704009324; __stripe_mid=576d7254-9b38-447d-b03a-0455234c85aa028d68; token=HEiBngeHcwmTbeNyMsqghqEbqamhgoGDNPAkFnaLNdUzfcoRqDBFImcbJrZwxXiAcVgxycPcNYLiGLwxAplmnxYpiwSmJzKfeINQjOfOzRRYkceAMEdDMmAmbOvBoJCB; token=HEiBngeHcwmTbeNyMsqghqEbqamhgoGDNPAkFnaLNdUzfcoRqDBFImcbJrZwxXiAcVgxycPcNYLiGLwxAplmnxYpiwSmJzKfeINQjOfOzRRYkceAMEdDMmAmbOvBoJCB; aws-waf-token=d60bed03-062c-4a5e-a13a-6812ec27064f:HgoAbUVRTiMBAAAA:0mDwu8h4MQwINC18fLNSLZa1kT3/1v4svl7RhEX1M8tXwchT/FqCc6fsn9eg88/G2yxHICSo0ab7R71o+rZlYjLDSsKteYXZSbVJyACrSUoE+x0T30pCqCkepaLaiI7jy5bC5DRPEWmpy5TYVpPmfLWf5EA9o3Jp9HYG7qw2i7t350MCdgb0fmDPxP7wnQoAMioXkyL13f3r2rxYAZVw78KlZdE=; __stripe_sid=94dfd71a-ca40-498b-ad9f-6e29b1f8d7c634c758; hf-chat=699d2836-9e8f-482c-9515-3dd214d419ce; _ga_8Q63TH4CSL=GS1.1.1712576098.12.1.1712576109.49.0.0',
|
17 |
+
'Content-Type': 'application/json'
|
18 |
+
};
|
19 |
+
let url = 'https://huggingface.co/chat/conversation/6614111dbb90af362a0d6ab4/__data.json?x-sveltekit-invalidated=11'
|
20 |
+
|
21 |
+
const response = await axios.get(url, { headers });
|
22 |
+
const data = response.data;
|
23 |
+
|
24 |
+
|
25 |
+
|
26 |
+
function findAllUUIDs(data) {
|
27 |
+
const uuids = []; // Array to store UUIDs
|
28 |
+
|
29 |
+
// Recursive function to traverse nested objects and arrays
|
30 |
+
function traverse(obj) {
|
31 |
+
for (const key in obj) {
|
32 |
+
if (typeof obj[key] === 'string' && obj[key].match(/[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/)) {
|
33 |
+
uuids.push(obj[key]); // If the value is a UUID, push it to the array
|
34 |
+
} else if (typeof obj[key] === 'object' && obj[key] !== null) {
|
35 |
+
traverse(obj[key]); // If the value is an object or array, recursively call the function
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
traverse(data); // Start traversal from the root object
|
41 |
+
|
42 |
+
return uuids;
|
43 |
+
}
|
44 |
+
|
45 |
+
const allUUIDs = findAllUUIDs(data);
|
46 |
+
console.log(allUUIDs);
|
47 |
+
console.log(allUUIDs[allUUIDs.length - 1]);
|
48 |
+
return allUUIDs[allUUIDs.length - 1];
|
49 |
+
}
|
50 |
+
export default async function handler(req, res) {
|
51 |
+
if (req.method === 'GET') {
|
52 |
+
const { prompt, web_search } = req.query;
|
53 |
+
const url = 'https://huggingface.co/chat/conversation/6614111dbb90af362a0d6ab4';
|
54 |
+
const headers = {
|
55 |
+
Cookie: '_ga=GA1.1.263364295.1704009324; __stripe_mid=576d7254-9b38-447d-b03a-0455234c85aa028d68; token=HEiBngeHcwmTbeNyMsqghqEbqamhgoGDNPAkFnaLNdUzfcoRqDBFImcbJrZwxXiAcVgxycPcNYLiGLwxAplmnxYpiwSmJzKfeINQjOfOzRRYkceAMEdDMmAmbOvBoJCB; token=HEiBngeHcwmTbeNyMsqghqEbqamhgoGDNPAkFnaLNdUzfcoRqDBFImcbJrZwxXiAcVgxycPcNYLiGLwxAplmnxYpiwSmJzKfeINQjOfOzRRYkceAMEdDMmAmbOvBoJCB; aws-waf-token=d60bed03-062c-4a5e-a13a-6812ec27064f:HgoAbUVRTiMBAAAA:0mDwu8h4MQwINC18fLNSLZa1kT3/1v4svl7RhEX1M8tXwchT/FqCc6fsn9eg88/G2yxHICSo0ab7R71o+rZlYjLDSsKteYXZSbVJyACrSUoE+x0T30pCqCkepaLaiI7jy5bC5DRPEWmpy5TYVpPmfLWf5EA9o3Jp9HYG7qw2i7t350MCdgb0fmDPxP7wnQoAMioXkyL13f3r2rxYAZVw78KlZdE=; __stripe_sid=94dfd71a-ca40-498b-ad9f-6e29b1f8d7c634c758; hf-chat=699d2836-9e8f-482c-9515-3dd214d419ce; _ga_8Q63TH4CSL=GS1.1.1712576098.12.1.1712576109.49.0.0',
|
56 |
+
'Content-Type': 'application/json'
|
57 |
+
};
|
58 |
+
|
59 |
+
const data = {
|
60 |
+
inputs: prompt || 'hi',
|
61 |
+
id: await getUUID(),
|
62 |
+
is_retry: false,
|
63 |
+
is_continue: false,
|
64 |
+
web_search: web_search=='true',
|
65 |
+
files: []
|
66 |
+
};
|
67 |
+
|
68 |
+
try {
|
69 |
+
const response = await axios.post(url, data, { headers });
|
70 |
+
console.log('API response:', response.data);
|
71 |
+
res.status(response.status).json(JSON.parse(response.data.split('\n')[response.data.split('\n').length - 2]));
|
72 |
+
} catch (error) {
|
73 |
+
console.error('Error:', error);
|
74 |
+
res.status(error.response?.status || 500).json({ message: 'Internal server error' });
|
75 |
+
}
|
76 |
+
} else {
|
77 |
+
res.setHeader('Allow', ['GET']);
|
78 |
+
res.status(405).end(`Method ${req.method} Not Allowed`);
|
79 |
+
}
|
80 |
+
}
|
pages/api/imagine.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import axios from "axios";
|
2 |
+
export const config = {
|
3 |
+
"name": "imagine",
|
4 |
+
"url": "/api/imagine",
|
5 |
+
"description": "Get response from imagine AI Model. imagine AI is a very powerful AI that can do a lot of things.",
|
6 |
+
"query": "prompt",
|
7 |
+
"response": "text",
|
8 |
+
"testURL": "./api/imagine?prompt=cute+cat"
|
9 |
+
|
10 |
+
}
|
11 |
+
|
12 |
+
const {imagine} = require('@shuddho11288/sdxl-imagine')
|
13 |
+
|
14 |
+
export default async function handler(req, res) {
|
15 |
+
const prompt = req.query.prompt;
|
16 |
+
const response = await imagine(prompt);
|
17 |
+
res.status(200).json({...response});
|
18 |
+
}
|
pages/api/liner.js
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import axios from "axios";
|
2 |
+
|
3 |
+
export const config = {
|
4 |
+
"name" : "liner",
|
5 |
+
"url" : "/api/liner",
|
6 |
+
"description" : "Get response from liner AI. Liner Ai is a very powerful AI that can do a lot of things. It have access to real time internet! It can provide you with the latest news, weather, and more.",
|
7 |
+
"query" : "prompt",
|
8 |
+
"response" : "text",
|
9 |
+
"testURL" : "./api/liner?prompt=hello"
|
10 |
+
}
|
11 |
+
const headers = {
|
12 |
+
Cookie:
|
13 |
+
"ab180ClientId=d124745c-b8e0-44c9-8712-82056e1571ed; __stripe_mid=ad30335b-6b5e-4340-8ceb-ac91d6b8cc34a0a896; __stripe_sid=18e0d0e2-0b72-4a6c-8859-ee62b3dcfd02c953ea; connect.sid=s%3AZpWUIMuuF7jh09Z7QriboFEE2chRqxxF.VYhAtox3jyd6ECn2tPDci4e4oSNPicTovuHyOJBv4Wo; _ga_9RRDSJXHYC=GS1.1.1709884220.1.1.1709884314.59.0.0; _ga_67C29LFSEM=GS1.1.1709884222.1.1.1709884316.57.0.1264912748; _dd_s=rum=0&expire=null; amp_ac9120=byJG3kKNpv1SoxEYhgl-ki.OTA4MzY3MQ==..1hoeglaf8.1hoegpbgo.1f.3.1i",
|
14 |
+
"Content-Type": "application/json",
|
15 |
+
};
|
16 |
+
export default function handler(req, res) {
|
17 |
+
let prompt = req.query.prompt;
|
18 |
+
const data = {
|
19 |
+
spaceId: 18572253,
|
20 |
+
threadId: "57117968",
|
21 |
+
userMessageId: 69370497,
|
22 |
+
userId: 9083671,
|
23 |
+
experimentId: 56,
|
24 |
+
query: " " + prompt,
|
25 |
+
agentId: "@liner",
|
26 |
+
platform: "web",
|
27 |
+
regenerate: false,
|
28 |
+
showReferenceChunks: true,
|
29 |
+
};
|
30 |
+
|
31 |
+
// Make POST request
|
32 |
+
axios
|
33 |
+
.post("https://getliner.com/platform/copilot/v3/answer", data, { headers })
|
34 |
+
.then((response) => {
|
35 |
+
let da = response.data.split("\n");
|
36 |
+
console.log(da[da.length - 2]);
|
37 |
+
res.status(200).json( JSON.parse(da[da.length - 2]));
|
38 |
+
});
|
39 |
+
|
40 |
+
|
41 |
+
}
|
42 |
+
|
pages/api/llama.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import axios from "axios";
|
2 |
+
export const config = {
|
3 |
+
"name": "llama",
|
4 |
+
"url": "/api/llama",
|
5 |
+
"description": "Get response from llama AI Model. llama AI is a very powerful AI that can do a lot of things.",
|
6 |
+
"query": "prompt",
|
7 |
+
"response": "text",
|
8 |
+
"testURL": "./api/llama?prompt=hello"
|
9 |
+
|
10 |
+
}
|
11 |
+
|
12 |
+
const {llama} = require('@shuddho11288/llama-api')
|
13 |
+
|
14 |
+
export default async function handler(req, res) {
|
15 |
+
const prompt = req.query.prompt;
|
16 |
+
const response = await llama(prompt);
|
17 |
+
res.status(200).json({...response});
|
18 |
+
}
|
pages/api/mistral.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import axios from "axios";
|
2 |
+
export const config = {
|
3 |
+
"name": "mistral",
|
4 |
+
"url": "/api/mistral",
|
5 |
+
"description": "Get response from Mistral AI Model. Mistral AI is a very powerful AI that can do a lot of things.",
|
6 |
+
"query": "prompt",
|
7 |
+
"response": "text",
|
8 |
+
"testURL": "./api/mistral?prompt=hello"
|
9 |
+
|
10 |
+
}
|
11 |
+
|
12 |
+
const {mistral} = require('@shuddho11288/mistral-api')
|
13 |
+
|
14 |
+
export default async function handler(req, res) {
|
15 |
+
const prompt = req.query.prompt;
|
16 |
+
const response = await mistral(prompt);
|
17 |
+
res.status(200).json({...response});
|
18 |
+
}
|
pages/api/pretend.js
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import axios from "axios";
|
2 |
+
export const config = {
|
3 |
+
"name": "pretend",
|
4 |
+
"url": "/api/pretend",
|
5 |
+
"description": "Pretending to be someone, generate response!",
|
6 |
+
"query": "prompt, name",
|
7 |
+
"response": "text",
|
8 |
+
"testURL": "./api/pretend?prompt=hello&name=goku"
|
9 |
+
}
|
10 |
+
|
11 |
+
const getBotData = async (name) => {
|
12 |
+
const url = `https://api.exh.ai/strapi-secondary/api/bots?filters[name][$containsi]=${name}&pagination[page]=1&sort=messagesCount:desc`;
|
13 |
+
|
14 |
+
let res = await axios.get(url);
|
15 |
+
if (res.data.data.length < 1){
|
16 |
+
res = await axios.get(`https://api.exh.ai/strapi-secondary/api/bots?filters[description][$containsi]=${name}&pagination[page]=1&sort=messagesCount:desc`)
|
17 |
+
}
|
18 |
+
let data = res.data.data[0].attributes.name.toLowerCase().split(' ').includes(name.toLowerCase())? res.data.data[0] : res.data.data[1];
|
19 |
+
if (name.split(' ').length > 1) {
|
20 |
+
data = res.data.data[0]
|
21 |
+
}
|
22 |
+
console.log(data)
|
23 |
+
|
24 |
+
//console.log( res.data.data[0].attributes.name.toLowerCase().split(' ').includes(name.toLowerCase()))
|
25 |
+
return data;
|
26 |
+
};
|
27 |
+
|
28 |
+
const getResponse = async (prompt, name) => {
|
29 |
+
const botData = await getBotData(name);
|
30 |
+
|
31 |
+
const tokenData = await axios.get(
|
32 |
+
"https://botify.ai/static/js/main.4f49c262.js"
|
33 |
+
);
|
34 |
+
let token = "";
|
35 |
+
//console.log(response.data);
|
36 |
+
const regex = /ks\.setToken\("([^"]+)"\)/;
|
37 |
+
const match = tokenData.data.match(regex);
|
38 |
+
|
39 |
+
if (match && match[1]) {
|
40 |
+
const _sValue = match[1];
|
41 |
+
token = _sValue;
|
42 |
+
//console.log(_sValue);
|
43 |
+
} else {
|
44 |
+
//console.log("No match found.");
|
45 |
+
}
|
46 |
+
|
47 |
+
const url = "https://api.exh.ai/chatbot/v1/get_response";
|
48 |
+
//console.log(botData.attributes.personaFacts.map((element)=>{ return element.content }))
|
49 |
+
|
50 |
+
|
51 |
+
const firstdata = {
|
52 |
+
name: botData.attributes.name,
|
53 |
+
context: [
|
54 |
+
{ message: prompt, turn: "user" },
|
55 |
+
],
|
56 |
+
|
57 |
+
strapi_bot_id: botData.id,
|
58 |
+
persona_facts: botData.attributes.personaFacts.map((element)=>{ return element.content }) || [],
|
59 |
+
|
60 |
+
access_level: "basic",
|
61 |
+
};
|
62 |
+
|
63 |
+
const headers = {
|
64 |
+
Authorization: "Bearer " + token,
|
65 |
+
};
|
66 |
+
const newResponse = await axios.post(url, firstdata, {
|
67 |
+
headers,
|
68 |
+
})
|
69 |
+
const botFirstMessage = newResponse.data.response;
|
70 |
+
console.log(botFirstMessage)
|
71 |
+
const data = {
|
72 |
+
name: botData.attributes.name,
|
73 |
+
context: [
|
74 |
+
{ message: botFirstMessage, turn: "bot" },
|
75 |
+
{ message: prompt, turn: "user" },
|
76 |
+
],
|
77 |
+
|
78 |
+
strapi_bot_id: botData.id,
|
79 |
+
persona_facts: botData.attributes.personaFacts.map((element)=>{ return element.content }) || [],
|
80 |
+
|
81 |
+
access_level: "basic",
|
82 |
+
};
|
83 |
+
const response = await axios.post(url, data, {
|
84 |
+
headers,
|
85 |
+
});
|
86 |
+
console.log(response.data.response)
|
87 |
+
return {...response.data, input:data};
|
88 |
+
};
|
89 |
+
|
90 |
+
export default async function handler(req, res) {
|
91 |
+
const prompt = req.query.prompt;
|
92 |
+
const name = req.query.name;
|
93 |
+
const response = await getResponse(prompt, name);
|
94 |
+
|
95 |
+
res.status(200).json({...response});
|
96 |
+
}
|
pages/api/upscaler.js
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import axios from "axios";
|
2 |
+
export const config = {
|
3 |
+
|
4 |
+
"name": "upscaler",
|
5 |
+
"url": "/api/upscaler",
|
6 |
+
"description": "Get response from Upscaler AI Model. Upscaler AI can restore the image to its original state.",
|
7 |
+
"query": "url",
|
8 |
+
"response": "text",
|
9 |
+
"testURL": "./api/upscaler?url=https%3A%2F%2Fscontent.fdac27-2.fna.fbcdn.net%2Fv%2Ft39.30808-1%2F386334419_843740254146283_32129838220110611_n.jpg%3Fstp%3Dc0.29.100.100a_dst-jpg_p100x100%26_nc_cat%3D105%26ccb%3D1-7%26_nc_sid%3D5f2048%26_nc_eui2%3DAeGirXPT1E56jzWOq3tJatv5HsWuBCzqiQIexa4ELOqJAuncqimdF8tQfaP-IQsyWKB1k2KRJgwsjLnqlMdyG0gS%26_nc_ohc%3Dic3HON0M4RoAb5e2J7a%26_nc_ad%3Dz-m%26_nc_cid%3D0%26_nc_ht%3Dscontent.fdac27-2.fna%26oh%3D00_AfDQQEelZWQ1AL6mhd32t45Lk5ioYN43ZjAj__UW5d_wuQ%26oe%3D661D418E"
|
10 |
+
|
11 |
+
}
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
export default async function handler(req, res) {
|
16 |
+
const url = req.query.url;
|
17 |
+
|
18 |
+
|
19 |
+
const axios = require("axios");
|
20 |
+
|
21 |
+
const postData = async () => {
|
22 |
+
try {
|
23 |
+
const response = await axios.post(
|
24 |
+
"https://replicate-reverse-engineered.vercel.app/post",
|
25 |
+
{dataToPost:{
|
26 |
+
input: {
|
27 |
+
jpeg: 40,
|
28 |
+
image: url,
|
29 |
+
noise: 15,
|
30 |
+
task_type: "Real-World Image Super-Resolution-Large",
|
31 |
+
},
|
32 |
+
stream: false,
|
33 |
+
}, replicateURL: "https://replicate.com/api/models/jingyunliang/swinir/versions/660d922d33153019e8c263a3bba265de882e7f4f70396546b6c9c8f9d47a021a/predictions"}
|
34 |
+
);
|
35 |
+
|
36 |
+
console.log(response.data);
|
37 |
+
let nurl = 'https://replicate.com/api/predictions/' + response.data.id;
|
38 |
+
nurl = 'https://replicate-reverse-engineered.vercel.app/get?url='+nurl
|
39 |
+
|
40 |
+
let isProcessing = true;
|
41 |
+
while (isProcessing) {
|
42 |
+
const { data } = await axios.get(nurl);
|
43 |
+
//console.log(data);
|
44 |
+
if (data.status === "succeeded") {
|
45 |
+
console.log(data._extras.output_files[0]);
|
46 |
+
isProcessing = false;
|
47 |
+
return data._extras.output_files[0];
|
48 |
+
}
|
49 |
+
}
|
50 |
+
} catch (error) {
|
51 |
+
console.error("Error:", error);
|
52 |
+
}
|
53 |
+
};
|
54 |
+
postData().then((data) => {
|
55 |
+
res.status(200).json({url: data});
|
56 |
+
});
|
57 |
+
|
58 |
+
}
|
postcss.config.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
module.exports = {
|
2 |
+
plugins: {
|
3 |
+
tailwindcss: {},
|
4 |
+
autoprefixer: {},
|
5 |
+
},
|
6 |
+
};
|
public/apiList.json
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"name": "bing",
|
4 |
+
"url": "/api/bing",
|
5 |
+
"description": "Get response from Bing. Bing is a very powerful AI that can do a lot of things. It have access to real time internet! It can provide you with the latest news, weather, and more.",
|
6 |
+
"query": "prompt",
|
7 |
+
"response": "text",
|
8 |
+
"testURL": "./api/bing?prompt=hello"
|
9 |
+
},
|
10 |
+
{
|
11 |
+
"name": "blackbox",
|
12 |
+
"url": "/api/blackbox",
|
13 |
+
"description": "Get response from Blackbox AI Model. Blackbox AI is a very powerful AI that can do a lot of things.",
|
14 |
+
"query": "prompt",
|
15 |
+
"response": "text",
|
16 |
+
"testURL": "./api/blackbox?prompt=hello"
|
17 |
+
},
|
18 |
+
{
|
19 |
+
"name": "chatgpt3",
|
20 |
+
"url": "/api/chatgpt3",
|
21 |
+
"description": "Get response from Chatgpt3. Chatgpt3 is a ChatGPT API. It can be used to get responses from ChatGPT. It can provide you with the latest news, weather, and more.",
|
22 |
+
"query": "prompt",
|
23 |
+
"response": "text",
|
24 |
+
"testURL": "./api/chatgpt3?prompt=hello"
|
25 |
+
},
|
26 |
+
{
|
27 |
+
"name": "chatgpt4",
|
28 |
+
"url": "/api/chatgpt4",
|
29 |
+
"description": "Get response from Chatgpt4. Chatgpt4 is a ChatGPT API. It can be used to get responses from ChatGPT. It can provide you with the latest news, weather, and more.",
|
30 |
+
"query": "prompt",
|
31 |
+
"response": "text",
|
32 |
+
"testURL": "./api/chatgpt4?prompt=hello"
|
33 |
+
},
|
34 |
+
{
|
35 |
+
"name": "geminiweb",
|
36 |
+
"url": "/api/geminiweb",
|
37 |
+
"description": "Get response from Gemini AI. Gemini AI is a very powerful AI that can do a lot of things. It have access to real time internet! It can provide you with the latest news, weather, and more.",
|
38 |
+
"query": "prompt",
|
39 |
+
"response": "text",
|
40 |
+
"testURL": "./api/geminiweb?prompt=hello"
|
41 |
+
},
|
42 |
+
{
|
43 |
+
"name": "huggingchat",
|
44 |
+
"url": "/api/huggingchat",
|
45 |
+
"description": "Get response from huggingchat AI. huggingchat AI is a very powerful AI that can do a lot of things. It have access to real time internet! It can provide you with the latest news, weather, and more.",
|
46 |
+
"query": "prompt, web_search",
|
47 |
+
"response": "text",
|
48 |
+
"testURL": "./api/huggingchat?prompt=hello&web_search=false"
|
49 |
+
},
|
50 |
+
{
|
51 |
+
"name": "imagine",
|
52 |
+
"url": "/api/imagine",
|
53 |
+
"description": "Get response from imagine AI Model. imagine AI is a very powerful AI that can do a lot of things.",
|
54 |
+
"query": "prompt",
|
55 |
+
"response": "text",
|
56 |
+
"testURL": "./api/imagine?prompt=cute+cat"
|
57 |
+
},
|
58 |
+
{
|
59 |
+
"name": "liner",
|
60 |
+
"url": "/api/liner",
|
61 |
+
"description": "Get response from liner AI. Liner Ai is a very powerful AI that can do a lot of things. It have access to real time internet! It can provide you with the latest news, weather, and more.",
|
62 |
+
"query": "prompt",
|
63 |
+
"response": "text",
|
64 |
+
"testURL": "./api/liner?prompt=hello"
|
65 |
+
},
|
66 |
+
{
|
67 |
+
"name": "llama",
|
68 |
+
"url": "/api/llama",
|
69 |
+
"description": "Get response from llama AI Model. llama AI is a very powerful AI that can do a lot of things.",
|
70 |
+
"query": "prompt",
|
71 |
+
"response": "text",
|
72 |
+
"testURL": "./api/llama?prompt=hello"
|
73 |
+
},
|
74 |
+
{
|
75 |
+
"name": "mistral",
|
76 |
+
"url": "/api/mistral",
|
77 |
+
"description": "Get response from Mistral AI Model. Mistral AI is a very powerful AI that can do a lot of things.",
|
78 |
+
"query": "prompt",
|
79 |
+
"response": "text",
|
80 |
+
"testURL": "./api/mistral?prompt=hello"
|
81 |
+
},
|
82 |
+
{
|
83 |
+
"name": "pretend",
|
84 |
+
"url": "/api/pretend",
|
85 |
+
"description": "Pretending to be someone, generate response!",
|
86 |
+
"query": "prompt, name",
|
87 |
+
"response": "text",
|
88 |
+
"testURL": "./api/pretend?prompt=hello&name=goku"
|
89 |
+
},
|
90 |
+
{
|
91 |
+
"name": "upscaler",
|
92 |
+
"url": "/api/upscaler",
|
93 |
+
"description": "Get response from Upscaler AI Model. Upscaler AI can restore the image to its original state.",
|
94 |
+
"query": "url",
|
95 |
+
"response": "text",
|
96 |
+
"testURL": "./api/upscaler?url=https%3A%2F%2Fscontent.fdac27-2.fna.fbcdn.net%2Fv%2Ft39.30808-1%2F386334419_843740254146283_32129838220110611_n.jpg%3Fstp%3Dc0.29.100.100a_dst-jpg_p100x100%26_nc_cat%3D105%26ccb%3D1-7%26_nc_sid%3D5f2048%26_nc_eui2%3DAeGirXPT1E56jzWOq3tJatv5HsWuBCzqiQIexa4ELOqJAuncqimdF8tQfaP-IQsyWKB1k2KRJgwsjLnqlMdyG0gS%26_nc_ohc%3Dic3HON0M4RoAb5e2J7a%26_nc_ad%3Dz-m%26_nc_cid%3D0%26_nc_ht%3Dscontent.fdac27-2.fna%26oh%3D00_AfDQQEelZWQ1AL6mhd32t45Lk5ioYN43ZjAj__UW5d_wuQ%26oe%3D661D418E"
|
97 |
+
}
|
98 |
+
]
|
tailwind.config.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/** @type {import('tailwindcss').Config} */
|
2 |
+
module.exports = {
|
3 |
+
content: [
|
4 |
+
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
|
5 |
+
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
6 |
+
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
7 |
+
],
|
8 |
+
theme: {
|
9 |
+
extend: {
|
10 |
+
backgroundImage: {
|
11 |
+
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
|
12 |
+
"gradient-conic":
|
13 |
+
"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
|
14 |
+
},
|
15 |
+
},
|
16 |
+
},
|
17 |
+
plugins: [],
|
18 |
+
};
|