Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
c7eb06b
Fix format
twokindswater Nov 26, 2024
91cbf5f
bug fix
twokindswater Nov 26, 2024
a4605c2
bug fix
twokindswater Nov 26, 2024
76315bc
big fix
twokindswater Nov 27, 2024
ef46f5a
remove unnecessary sidebar (collections, assistant, tools, models)
twokindswater Nov 27, 2024
8847559
remove unnecessary sidebar (collections, assistant, tools, models)
twokindswater Nov 27, 2024
c945329
remove unnecessary sidebar (collections, assistant, tools, models)
twokindswater Nov 27, 2024
0b27df1
override azure model and api-version
twokindswater Nov 27, 2024
db3eeb8
set provider to 'azure'
twokindswater Nov 27, 2024
c54bb88
set provider to 'azure'
twokindswater Nov 27, 2024
65a763a
change model to babbage-002
twokindswater Nov 28, 2024
8f1a955
change model to babbage-002
twokindswater Nov 28, 2024
d4eeea4
change model to babbage-002
twokindswater Nov 28, 2024
31c15b5
change model to babbage-002
twokindswater Nov 28, 2024
f792ce5
change model to babbage-002
twokindswater Nov 28, 2024
3104131
change model to 'gpt-35-turbo-16k'
twokindswater Nov 28, 2024
95ce70c
npm install langsmith
twokindswater Nov 28, 2024
e51981f
use langsmith with wrapper
twokindswater Nov 28, 2024
c3f2504
Revert "remove unnecessary sidebar (collections, assistant, tools, mo…
twokindswater Nov 28, 2024
546c17d
Skip API Step
twokindswater Dec 2, 2024
f8a45ee
Skip API Step
twokindswater Dec 2, 2024
6db596a
change chat message placeholder
twokindswater Dec 2, 2024
b53f467
Implement jailbreaking model
twokindswater Dec 4, 2024
5cc5261
Implement jailbreaking model
twokindswater Dec 4, 2024
b4fcc42
Implement ESLint
twokindswater Dec 6, 2024
2814d49
add custom model
twokindswater Dec 6, 2024
17d48ea
Implement custom model
twokindswater Dec 6, 2024
d7f240f
Implement finetuning llm
twokindswater Dec 9, 2024
d87497a
Implement finetuning llm
twokindswater Dec 9, 2024
f6cdacf
Implement finetuning llm
twokindswater Dec 9, 2024
19314f1
Implement finetuning llm
twokindswater Dec 9, 2024
a8838e5
Implement finetuning llm
twokindswater Dec 9, 2024
dda7415
Implement finetuning llm
twokindswater Dec 9, 2024
eba21ce
Implement finetuning llm
twokindswater Dec 9, 2024
7e75905
Implement finetuning llm
twokindswater Dec 9, 2024
6e2527c
Implement finetuning llm
twokindswater Dec 9, 2024
8fe2e2d
reset chat/azrue
twokindswater Dec 9, 2024
638ea79
custom llm with langsmith
twokindswater Dec 9, 2024
d51d4d2
set azure api key
twokindswater Dec 9, 2024
7730ebc
disable presets, prompts, models, collections, assistants, tools
twokindswater Dec 9, 2024
2de6b8c
set defaultQuery in openai
twokindswater Dec 9, 2024
2ae2917
Add temperature, max_tokens configurations
twokindswater Dec 9, 2024
a22fca5
Implement default header
twokindswater Dec 9, 2024
3f73c2b
Implement openai with langsmith
twokindswater Dec 9, 2024
0e7cd5c
custom api test
twokindswater Dec 9, 2024
36141ce
Revert "custom api test"
twokindswater Dec 9, 2024
90e700e
Change endpoint for finetunning model
twokindswater Dec 10, 2024
88be185
Update langchain pkg
twokindswater Dec 11, 2024
eb6132d
version upgrade [email protected]
twokindswater Dec 11, 2024
4d3bf53
change home page
twokindswater Dec 14, 2024
332224e
upgrade langchain pkg version
twokindswater Dec 14, 2024
80209f7
delete yarn.lock
twokindswater Dec 14, 2024
8a40b8a
npm install
twokindswater Dec 14, 2024
614534b
change langchain pdf, csv loader
twokindswater Dec 14, 2024
afbe390
Implement team and department
twokindswater Dec 14, 2024
ca5457c
delete multiple imports
twokindswater Dec 14, 2024
54701a6
update setup
twokindswater Dec 14, 2024
1838e21
update setup
twokindswater Dec 14, 2024
095e92a
Implement score
twokindswater Dec 14, 2024
6d1d675
Implement score
twokindswater Dec 14, 2024
139bdf9
update game_result RLS
twokindswater Dec 14, 2024
881d047
update game_result RLS
twokindswater Dec 14, 2024
52c9ebc
Implement update game result
twokindswater Dec 15, 2024
0935656
reformat database table
twokindswater Dec 15, 2024
42dc19e
reformat database table
twokindswater Dec 15, 2024
6dfa8f1
update type (game_result.score null)
twokindswater Dec 15, 2024
1cb77b8
error handling
twokindswater Dec 15, 2024
bf8ba47
error handling
twokindswater Dec 15, 2024
f80b49c
add board sidebar
twokindswater Dec 17, 2024
53a099b
add board sidebar
twokindswater Dec 18, 2024
752740d
add board sidebar
twokindswater Dec 18, 2024
f971014
add board sidebar
twokindswater Dec 18, 2024
e8afc49
add board sidebar
twokindswater Dec 18, 2024
247993f
add board sidebar
twokindswater Dec 18, 2024
b011240
add board sidebar
twokindswater Dec 18, 2024
b900cd2
add board sidebar
twokindswater Dec 18, 2024
6eeaa7f
add board sidebar
twokindswater Dec 18, 2024
795895d
rename content type 'board' to 'game_result'
twokindswater Dec 18, 2024
502df48
Implement game_result sidebar
twokindswater Dec 18, 2024
ad1dc99
add folder_id in types.ts game_result
twokindswater Dec 19, 2024
991000c
Implement game result
twokindswater Dec 19, 2024
4524c0e
Implement game result
twokindswater Dec 19, 2024
af8f568
Implement game_result sidebar
twokindswater Dec 19, 2024
b1a3177
Implement game_result sidebar
twokindswater Dec 19, 2024
850328c
Implement game_result sidebar
twokindswater Dec 19, 2024
11fb59c
Implement game_result sidebar
twokindswater Dec 19, 2024
4a64c63
update models in workespace home
twokindswater Dec 20, 2024
96fde2e
implement finetuned submit
twokindswater Dec 20, 2024
354fb32
Add department and team
twokindswater Dec 21, 2024
af59382
Implement fine tuning score
twokindswater Dec 21, 2024
4380bdf
Implement public chat
twokindswater Dec 21, 2024
fde9b71
bug fix
twokindswater Dec 21, 2024
ba1a24e
refactoring chat response
twokindswater Dec 21, 2024
8f96963
add ignore commend to custom response
twokindswater Dec 21, 2024
786955d
add ignore commend to custom response
twokindswater Dec 21, 2024
dc477cd
Implement share sidebar
twokindswater Dec 21, 2024
dacc296
Implement share sidebar
twokindswater Dec 21, 2024
cda8883
Implement share sidebar
twokindswater Dec 21, 2024
0249de9
Implement share sidebar
twokindswater Dec 21, 2024
ae08ed9
Implement share sidebar
twokindswater Dec 21, 2024
f93226d
Implement share sidebar
twokindswater Dec 21, 2024
983940b
Implement share sidebar
twokindswater Dec 21, 2024
042cdf4
Add langSmith option
twokindswater Dec 22, 2024
25e9fcd
bug fix - set validate department value
twokindswater Dec 22, 2024
6b3717d
Add background color to easily find own result
twokindswater Dec 22, 2024
7f7bd94
change default department to '경기과학기술대'
twokindswater Dec 22, 2024
6617285
change submit button disabled condition
twokindswater Dec 22, 2024
df638e2
Implement review comments
twokindswater Jan 1, 2025
7aaa720
메인페이지 문구 변경
twokindswater Jan 2, 2025
34a63e9
질문 리스트 변경
twokindswater Jan 2, 2025
d8fe2bf
채점 수정
twokindswater Jan 2, 2025
5238efe
error handling
twokindswater Jan 3, 2025
ad3e1d5
update submit and ui
ry-eon Jan 5, 2025
65d92dd
fix/build-error
ry-eon Jan 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ sw.js
sw.js.map
workbox-*.js
workbox-*.js.map

# local env
.idea
16 changes: 16 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"arrowParens": "avoid",
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"bracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false
}
6 changes: 3 additions & 3 deletions app/[locale]/[workspaceid]/chat/[chatid]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client"
'use client';

import { ChatUI } from "@/components/chat/chat-ui"
import { ChatUI } from '@/components/chat/chat-ui';

export default function ChatIDPage() {
return <ChatUI />
return <ChatUI />;
}
96 changes: 74 additions & 22 deletions app/[locale]/[workspaceid]/chat/page.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,87 @@
"use client"

import { ChatHelp } from "@/components/chat/chat-help"
import { useChatHandler } from "@/components/chat/chat-hooks/use-chat-handler"
import { ChatInput } from "@/components/chat/chat-input"
import { ChatSettings } from "@/components/chat/chat-settings"
import { ChatUI } from "@/components/chat/chat-ui"
import { QuickSettings } from "@/components/chat/quick-settings"
import { Brand } from "@/components/ui/brand"
import { ChatbotUIContext } from "@/context/context"
import useHotkey from "@/lib/hooks/use-hotkey"
import { useTheme } from "next-themes"
import { useContext } from "react"
'use client';

import { ChatHelp } from '@/components/chat/chat-help';
import { useChatHandler } from '@/components/chat/chat-hooks/use-chat-handler';
import { ChatInput } from '@/components/chat/chat-input';
import { ChatSettings } from '@/components/chat/chat-settings';
import { ChatUI } from '@/components/chat/chat-ui';
import { QuickSettings } from '@/components/chat/quick-settings';
import { Brand } from '@/components/ui/brand';
import { ChatbotUIContext } from '@/context/context';
import useHotkey from '@/lib/hooks/use-hotkey';
import { useTheme } from 'next-themes';
import { useContext } from 'react';

export default function ChatPage() {
useHotkey("o", () => handleNewChat())
useHotkey("l", () => {
handleFocusChatInput()
})
useHotkey('o', () => handleNewChat());
useHotkey('l', () => {
handleFocusChatInput();
});

const { chatMessages, models, setModels } = useContext(ChatbotUIContext);

// update models
if (!models.find(model => model.model_id === 'FineTuning_LLM')) {
models.push({
api_key: '',
base_url: 'http://223.130.135.187:8001/v1',
context_length: 0,
created_at: '',
description: '',
folder_id: null,
id: '',
sharing: '',
updated_at: null,
user_id: '',
model_id: 'FineTuning_LLM',
name: 'FineTuning_LLM'
});
setModels(models);
}

const modelIds = [
'jailbreaking-level-1',
'jailbreaking-level-2',
'jailbreaking-level-3',
'jailbreaking-level-4',
'jailbreaking-level-5',
'jailbreaking-level-6',
'jailbreaking-level-7',
'jailbreaking-level-8',
'jailbreaking-level-9',
'jailbreaking-level-10'
];

const { chatMessages } = useContext(ChatbotUIContext)
for (const modelId of modelIds) {
if (!models.find(model => model.model_id === modelId)) {
models.push({
api_key: '',
base_url: 'https://pcp-ai.openai.azure.com/openai',
context_length: 0,
created_at: '',
description: '',
folder_id: null,
id: '',
sharing: '',
updated_at: null,
user_id: '',
model_id: modelId,
name: modelId
});
}
setModels(models);
}

const { handleNewChat, handleFocusChatInput } = useChatHandler()
const { handleNewChat, handleFocusChatInput } = useChatHandler();

const { theme } = useTheme()
const { theme } = useTheme();

return (
<>
{chatMessages.length === 0 ? (
<div className="relative flex h-full flex-col items-center justify-center">
<div className="top-50% left-50% -translate-x-50% -translate-y-50% absolute mb-20">
<Brand theme={theme === "dark" ? "dark" : "light"} />
{/*<Brand theme={theme === 'dark' ? 'dark' : 'light'} />*/}
</div>

<div className="absolute left-2 top-2">
Expand All @@ -54,5 +106,5 @@ export default function ChatPage() {
<ChatUI />
)}
</>
)
);
}
7 changes: 7 additions & 0 deletions app/[locale]/[workspaceid]/game/[gametype]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use client';

import { GameResult } from '@/components/game/game-result';

export default function GameResultPage() {
return <GameResult />;
}
33 changes: 33 additions & 0 deletions app/[locale]/[workspaceid]/game/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
'use client';

import { ChatHelp } from '@/components/chat/chat-help';
import { useChatHandler } from '@/components/chat/chat-hooks/use-chat-handler';
import { ChatInput } from '@/components/chat/chat-input';
import { ChatSettings } from '@/components/chat/chat-settings';
import { ChatUI } from '@/components/chat/chat-ui';
import { QuickSettings } from '@/components/chat/quick-settings';
import { Brand } from '@/components/ui/brand';
import { ChatbotUIContext } from '@/context/context';
import useHotkey from '@/lib/hooks/use-hotkey';
import { useTheme } from 'next-themes';
import { useContext } from 'react';
import GameResultPage from '@/app/[locale]/[workspaceid]/game/[gametype]/page';

export default function ChatPage() {
useHotkey('o', () => handleNewChat());
useHotkey('l', () => {
handleFocusChatInput();
});

const { chatMessages } = useContext(ChatbotUIContext);

const { handleNewChat, handleFocusChatInput } = useChatHandler();

const { theme } = useTheme();

return (
<div className="relative flex h-full flex-col items-center justify-center">
<GameResultPage />
</div>
);
}
Loading