mirror of
https://github.com/PinkSheep27/SBU-Hackathon.git
synced 2026-10-10 23:00:25 -04:00
added chatbot and exportType folder with the types
This commit is contained in:
@@ -1,7 +0,0 @@
|
|||||||
// app/api/auth/[auth0]/route.js
|
|
||||||
|
|
||||||
import { handleAuth } from '@auth0/nextjs-auth0';
|
|
||||||
|
|
||||||
export const runtime = 'nodejs';
|
|
||||||
|
|
||||||
export const GET = handleAuth();
|
|
||||||
@@ -4,7 +4,7 @@ import { useState, useEffect, useRef, useCallback } from "react";
|
|||||||
import { useSearchParams } from "next/navigation";
|
import { useSearchParams } from "next/navigation";
|
||||||
import ChatInput from "../utils/component/ui/ChatInput";
|
import ChatInput from "../utils/component/ui/ChatInput";
|
||||||
import MessageWindow from "../utils/component/ui/MessageWindow";
|
import MessageWindow from "../utils/component/ui/MessageWindow";
|
||||||
import { ChatHistory, ChatSetting, Message , MessageRole } from "./exportType/types";
|
import { ChatHistory, ChatSetting, Message , MessageRole } from "@/app/exportType/types";
|
||||||
|
|
||||||
export default function Home(){
|
export default function Home(){
|
||||||
const [history, setHistory] = useState<ChatHistory>([])
|
const [history, setHistory] = useState<ChatHistory>([])
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
export type MessageRole = "user" | "model";
|
||||||
|
|
||||||
|
export type MessagePart = {
|
||||||
|
text: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Message{
|
||||||
|
role: MessageRole;
|
||||||
|
parts:MessagePart[];
|
||||||
|
}
|
||||||
|
export type ChatHistory = Message[];
|
||||||
|
|
||||||
|
export interface GenerateConfig{
|
||||||
|
temperature : number;
|
||||||
|
topP : number;
|
||||||
|
responseMimeType : string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ChatSetting{
|
||||||
|
temperature :number;
|
||||||
|
model: string;
|
||||||
|
sysTemInstructions: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CardData {
|
||||||
|
id: number;
|
||||||
|
title: string;
|
||||||
|
tracks: string[];
|
||||||
|
summary: string;
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import React, { useState, useEffect, useCallback } from "react";
|
import React, { useState, useEffect, useCallback } from "react";
|
||||||
import FormPage from './FormPage';
|
import FormPage from './FormPage';
|
||||||
import { ChatSetting, CardData } from "../exportType/types";
|
import { ChatSetting, CardData } from "@/app/exportType/types";
|
||||||
import { FormData, PROFICIENCY_LEVELS } from './formTypes';
|
import { FormData, PROFICIENCY_LEVELS } from './formTypes';
|
||||||
import SwipeCards from '../cards/page';
|
import SwipeCards from '../cards/page';
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ES2017",
|
"target": "ES2018",
|
||||||
"lib": ["dom", "dom.iterable", "esnext"],
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user