Add files via upload

This commit is contained in:
Daniel Ringel 2026-01-03 17:14:47 +01:00 committed by GitHub
parent 8ba94c1481
commit 910dcd31b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 13086 additions and 0 deletions

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 Daniel Ringel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

7
next.config.ts Normal file
View File

@ -0,0 +1,7 @@
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
};
export default nextConfig;

12904
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

89
package.json Normal file
View File

@ -0,0 +1,89 @@
{
"name": "my-ai-3",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint"
},
"dependencies": {
"@ai-sdk/deepseek": "^1.0.31",
"@ai-sdk/fireworks": "^1.0.29",
"@ai-sdk/groq": "^2.0.32",
"@ai-sdk/openai": "^2.0.77",
"@ai-sdk/react": "^2.0.107",
"@ai-sdk/xai": "^2.0.39",
"@hookform/resolvers": "^5.2.2",
"@pinecone-database/pinecone": "^6.1.3",
"@radix-ui/react-accordion": "^1.2.12",
"@radix-ui/react-alert-dialog": "^1.1.15",
"@radix-ui/react-aspect-ratio": "^1.1.8",
"@radix-ui/react-avatar": "^1.1.11",
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-collapsible": "^1.1.12",
"@radix-ui/react-context-menu": "^2.2.16",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-hover-card": "^1.1.15",
"@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-menubar": "^1.1.16",
"@radix-ui/react-navigation-menu": "^1.2.14",
"@radix-ui/react-popover": "^1.1.15",
"@radix-ui/react-progress": "^1.1.8",
"@radix-ui/react-radio-group": "^1.3.8",
"@radix-ui/react-scroll-area": "^1.2.10",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-separator": "^1.1.8",
"@radix-ui/react-slider": "^1.3.6",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-switch": "^1.2.6",
"@radix-ui/react-tabs": "^1.1.13",
"@radix-ui/react-toggle": "^1.1.10",
"@radix-ui/react-toggle-group": "^1.1.11",
"@radix-ui/react-tooltip": "^1.2.8",
"@radix-ui/react-use-controllable-state": "^1.2.2",
"@xyflow/react": "^12.10.0",
"ai": "^5.0.107",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"date-fns": "^4.1.0",
"embla-carousel-react": "^8.6.0",
"exa-js": "^2.0.11",
"input-otp": "^1.4.2",
"lucide-react": "^0.555.0",
"motion": "^12.23.25",
"nanoid": "^5.1.6",
"next": "16.0.7",
"next-themes": "^0.4.6",
"openai": "^6.10.0",
"react": "19.2.1",
"react-day-picker": "^9.11.3",
"react-dom": "19.2.1",
"react-hook-form": "^7.68.0",
"react-resizable-panels": "^3.0.6",
"react-syntax-highlighter": "^16.1.0",
"recharts": "^3.5.1",
"sonner": "^2.0.7",
"streamdown": "^1.6.10",
"tailwind-merge": "^3.4.0",
"tokenlens": "^1.3.1",
"use-stick-to-bottom": "^1.1.1",
"vaul": "^1.1.2",
"zod": "^4.1.13"
},
"devDependencies": {
"@tailwindcss/postcss": "^4",
"@types/node": "^24",
"@types/react": "^19",
"@types/react-dom": "^19",
"@types/react-syntax-highlighter": "^15.5.13",
"eslint": "^9",
"eslint-config-next": "16.0.7",
"tailwindcss": "^4",
"tw-animate-css": "^1.4.0",
"typescript": "^5"
}
}

7
postcss.config.mjs Normal file
View File

@ -0,0 +1,7 @@
const config = {
plugins: {
"@tailwindcss/postcss": {},
},
};
export default config;

58
prompts.ts Normal file
View File

@ -0,0 +1,58 @@
import { DATE_AND_TIME, OWNER_NAME } from './config';
import { AI_NAME } from './config';
export const IDENTITY_PROMPT = `
You are ${AI_NAME}, an agentic assistant. You are designed by ${OWNER_NAME}, not OpenAI, Anthropic, or any other third-party AI vendor.
`;
export const TOOL_CALLING_PROMPT = `
- In order to be as truthful as possible, call tools to gather context before answering.
- Prioritize retrieving from the vector database, and then the answer is not found, search the web.
`;
export const TONE_STYLE_PROMPT = `
- Maintain a friendly, approachable, and helpful tone at all times.
- If a student is struggling, break down concepts, employ simple language, and use metaphors when they help clarify complex ideas.
`;
export const GUARDRAILS_PROMPT = `
- Strictly refuse and end engagement if a request involves dangerous, illegal, shady, or inappropriate activities.
`;
export const CITATIONS_PROMPT = `
- Always cite your sources using inline markdown, e.g., [Source #](Source URL).
- Do not ever just use [Source #] by itself and not provide the URL as a markdown link-- this is forbidden.
`;
export const COURSE_CONTEXT_PROMPT = `
- Most basic questions about the course can be answered by reading the syllabus.
`;
export const SYSTEM_PROMPT = `
${IDENTITY_PROMPT}
<tool_calling>
${TOOL_CALLING_PROMPT}
</tool_calling>
<tone_style>
${TONE_STYLE_PROMPT}
</tone_style>
<guardrails>
${GUARDRAILS_PROMPT}
</guardrails>
<citations>
${CITATIONS_PROMPT}
</citations>
<course_context>
${COURSE_CONTEXT_PROMPT}
</course_context>
<date_time>
${DATE_AND_TIME}
</date_time>
`;