Spaces:
Running
Running
忘記放入 題型
Browse files
app.py
CHANGED
@@ -217,6 +217,7 @@ Ensure that question numbers and answer numbers correspond exactly. Do not use a
|
|
217 |
|
218 |
logger.info(f"發送請求到 LLM 模型: {model_name}")
|
219 |
logger.info(f"使用語言: {lang}, 題型: {types_str}, 題目數量: {num_questions}")
|
|
|
220 |
|
221 |
response = client.chat.completions.create(
|
222 |
model=model_name,
|
@@ -405,8 +406,8 @@ def build_gradio_blocks():
|
|
405 |
value=["單選選擇題"])
|
406 |
num_questions = gr.Slider(1, 20, value=10, step=1, label="題目數量")
|
407 |
llm_key = gr.Textbox(label="LLM Key (不會儲存)", type="password", placeholder="請輸入你的 LLM API Key")
|
408 |
-
baseurl = gr.Textbox(label="Base URL (如 https://api.groq.com/openai/v1 )",
|
409 |
-
model_box = gr.Textbox(label="Model 名稱", placeholder="如 gpt-4.1, qwen-qwq-32b, ...")
|
410 |
generate_btn = gr.Button("✏️ 開始出題 quiz")
|
411 |
|
412 |
with gr.Column():
|
|
|
217 |
|
218 |
logger.info(f"發送請求到 LLM 模型: {model_name}")
|
219 |
logger.info(f"使用語言: {lang}, 題型: {types_str}, 題目數量: {num_questions}")
|
220 |
+
logger.info(f"選擇的題型: {question_types}")
|
221 |
|
222 |
response = client.chat.completions.create(
|
223 |
model=model_name,
|
|
|
406 |
value=["單選選擇題"])
|
407 |
num_questions = gr.Slider(1, 20, value=10, step=1, label="題目數量")
|
408 |
llm_key = gr.Textbox(label="LLM Key (不會儲存)", type="password", placeholder="請輸入你的 LLM API Key")
|
409 |
+
baseurl = gr.Textbox(label="Base URL (如 https://api.groq.com/openai/v1 )",value="https://api.openai.com/v1", placeholder="請輸入 API Base URL")
|
410 |
+
model_box = gr.Textbox(label="Model 名稱", value="gpt-4.1", placeholder="如 gpt-4.1, qwen-qwq-32b, ...")
|
411 |
generate_btn = gr.Button("✏️ 開始出題 quiz")
|
412 |
|
413 |
with gr.Column():
|