Commit History

"筆記 Note-taking": "你是一個樂於助人的AI tutor,也是Cornell Note-taking method專家。首先,你會察看我關於{}的筆記,然後透過以下的方式加深我對筆記中涵蓋的核心概念的理解: 1.辨識並解釋我遺漏的任何核心概念 2.提供每個概念可用的具體範例。 3.比較和比對所有核心概念。 4.請幫助我連接<之前學過類似的概念>與筆記中所有的核心概念, 如果你明白,請讓我知道,並請我提交筆記內容",
1a11184

youngtsai commited on

scenario_name = """【{}】""".format(scenario)
475c2b5

youngtsai commited on

scenario_name = """【{}】|""".format(scenario)
8b4a0e6

youngtsai commited on

"交錯練習 Interleaving": "你是一個樂於助人的AI tutor,你會透過不斷提問的方式以確認我對這個主題的理解程度,請你透過 interleaving 策略,混合相關的觀念與知識,以幫助我以幫助我更理解及促進不同概念間的連結,你一次只問一個問題,你會先從prior knowledge開始你的問題,請向我提問關於 {} 的問題 "
9684a91

youngtsai commited on

"交錯練習 Interleaving": "你是一個樂於助人的AI tutor,你會透過不斷提問的方式以確認我對這個主題: {} ,的理解程度,請你透過 interleaving 策略,混合相關的觀念與知識,以幫助我以幫助我更理解及促進不同概念間的連結,你一次只問一個問題,你會先從prior knowledge開始你的問題,請向我提問"
7d367ca

youngtsai commited on

, style=btn_style
07d8380

youngtsai commited on

with gr.Column(scale=1):
dffef23

youngtsai commited on

學習策略對話介面
05bb954

youngtsai commited on

# print(output) # Debugging: Print the output format.
6defc64

youngtsai commited on

gr.Markdown("## 學習策略 Learning Strategies")
a42be51

youngtsai commited on

with gr.Row():
ad5acc0

youngtsai commited on

inputs=[chatbot, openai_key, chat_model],
8e98398

youngtsai commited on

system_instruction = {"role": "system", "content": "You are a helpful AI tutor. Always communicate in Traditional Chinese. zh-TW,並且在反問時,不直接提供答案"}
df7475d

youngtsai commited on

if content:
0af21e4

youngtsai commited on

history = history[-MAX_HISTORY_LENGTH:]
8ed3ff4

youngtsai commited on

messages = [system_instruction] + [{"role": "user", "content": msg[0]} if not msg[1] else {"role": "assistant", "content": msg[1]} for msg in history[:-1]]
fccd578

youngtsai commited on

system_instruction = {"role": "system", "content": "You are a helpful AI tutor. Always communicate in Traditional Chinese. zh-TW"}
5194e18

youngtsai commited on

def show_message(user_message, chatbot_history):
3a5dabe

youngtsai commited on

{"role": "sys", "content": {"sys_param": {"language": "Zh-TW"}}}, # Add this line for system message.
028c40d

youngtsai commited on

def show_message(user_message, chatbot_history):
f20c8d1

youngtsai commited on

def show_message(user_message, chatbot_history):
e06cbc2

youngtsai commited on

def handle_scenario(topic, scenario, chatbot_history=[]):
baffaed

youngtsai commited on

def handle_scenario(topic, scenario, chatbot_history=[]):
4481557

youngtsai commited on

def handle_scenario(topic, scenario, chatbot_history=[]):
866e933

youngtsai commited on

def handle_scenario(topic, scenario, chatbot_history):
c18f4d6

youngtsai commited on

available_models = ['gpt-4','gpt-3.5-turbo']
6f8f9ee

youngtsai commited on

for scenario in PROMPTS.keys():
13241e1

youngtsai commited on

MAX_WITHOUT_KEY = 30
671f063

youngtsai commited on

PROMPTS
ed15cb2

youngtsai commited on

topic_input = gr.Textbox(label="主題", placeholder="輸入主題...")
6e33032

youngtsai commited on

with gr.Row():
ddab20c

youngtsai commited on

with gr.Row():
53575d1

youngtsai commited on

with gr.Column(scale=2):
62dfaa2

youngtsai commited on

def show_message(user_message, chatbot_history):
5fcd3f4

youngtsai commited on

debug
6efaff4

youngtsai commited on

streaming_event_kwargs
d0ff831

youngtsai commited on

streaming_event_kwargs = dict(
35a7807

youngtsai commited on

btn.click(lambda topic, chatbot_history: handle_scenario(topic, scenario, chatbot_history), [topic_input, chatbot], [chatbot], queue=False).then(**streaming_event_kwargs)
bb3df01

youngtsai commited on

uvicorn
adff78b

youngtsai commited on

uvicorn==0.15.0
ba51afc

youngtsai commited on

# audio.stream
e109b5b

youngtsai commited on

for scenario in PROMPTS.keys():
53235a0

youngtsai commited on

OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
272bf64

youngtsai commited on

uvicorn==0.15.0
c0200ad

youngtsai commited on

gradio==3.1.6
6600a9b

youngtsai commited on

use_key = gr.Checkbox(label="Use OpenAI Key", default=True)
3099340

youngtsai commited on

MAX_WITHOUT_KEY
422a4ed

youngtsai commited on

gradio==3.30
541bd4e

youngtsai commited on

gradio==3.29.0
2c92d42

youngtsai commited on

update
d8a3676

1lint commited on