-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use simple in-memory vector database instead of Pinecone (#4)
* Add simple in-memory vector database * switch to blue color style * better UI --------- Co-authored-by: florian <[email protected]>
- Loading branch information
Showing
39 changed files
with
795 additions
and
825 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
PINECONE_TOKEN=your-api-token | ||
STORAGE_BACKEND=BLOB | ||
STORAGE_BACKEND_BLOB_ACCOUNT_NAME= | ||
STORAGE_BACKEND_BLOB_CONTAINER_NAME= | ||
STORAGE_BACKEND_BLOB_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// app/components/GoogleAnalytics.tsx | ||
"use client"; | ||
|
||
import { useEffect } from "react"; | ||
|
||
const GoogleAnalytics = () => { | ||
useEffect(() => { | ||
const trackingId = process.env.NEXT_PUBLIC_GA_TRACKING_ID; | ||
if (trackingId) { | ||
const script1 = document.createElement("script"); | ||
script1.async = true; | ||
script1.src = `https://www.googletagmanager.com/gtag/js?id=${trackingId}`; | ||
document.head.appendChild(script1); | ||
|
||
const script2 = document.createElement("script"); | ||
script2.innerHTML = ` | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
gtag('config', '${trackingId}'); | ||
`; | ||
document.head.appendChild(script2); | ||
} | ||
}, []); | ||
|
||
return null; | ||
}; | ||
|
||
export default GoogleAnalytics; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { useState } from "react"; | ||
import GitHubButton from "./GitHubButton"; | ||
import SupportButton from "./SupportButton"; | ||
import { FaBars, FaTimes } from "react-icons/fa"; | ||
|
||
const Header: React.FC = () => { | ||
const [isMenuOpen, setIsMenuOpen] = useState(false); | ||
|
||
const toggleMenu = () => { | ||
setIsMenuOpen(!isMenuOpen); | ||
}; | ||
|
||
return ( | ||
<header className="w-full flex justify-end items-center p-4 bg-sky-950"> | ||
<div className="hidden md:flex space-x-4 "> | ||
<GitHubButton /> | ||
<SupportButton /> | ||
</div> | ||
<div className="md:hidden flex-grow flex justify-end"> | ||
<button | ||
onClick={toggleMenu} | ||
className="text-white focus:outline-none focus:ring-2 focus:ring-sky-700" | ||
> | ||
{isMenuOpen ? <FaTimes size={24} /> : <FaBars size={24} />} | ||
</button> | ||
</div> | ||
{isMenuOpen && ( | ||
<div className="absolute top-16 right-4 bg-sky-900 p-4 rounded shadow-lg flex flex-col space-y-4 md:hidden"> | ||
<GitHubButton /> | ||
<SupportButton /> | ||
</div> | ||
)} | ||
</header> | ||
); | ||
}; | ||
|
||
export default Header; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.