Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -184,9 +184,13 @@ def generate_response(user_input):
|
|
| 184 |
|
| 185 |
# Step 2: モード別の応答生成
|
| 186 |
if st.session_state.current_mode == "通常モード":
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
qwen_prompt = f"""
|
| 188 |
以下のユーザー入力に対してコーディングアシスタントとして回答してください。
|
| 189 |
-
Mistral Sabaの分析結果と{
|
| 190 |
最適なソリューションを提供してください。
|
| 191 |
|
| 192 |
ユーザー入力: {user_input}
|
|
@@ -194,7 +198,7 @@ def generate_response(user_input):
|
|
| 194 |
Mistral Sabaの分析:
|
| 195 |
{mistral_analysis}
|
| 196 |
|
| 197 |
-
{
|
| 198 |
"""
|
| 199 |
|
| 200 |
qwen_response = client.chat.completions.create(
|
|
|
|
| 184 |
|
| 185 |
# Step 2: モード別の応答生成
|
| 186 |
if st.session_state.current_mode == "通常モード":
|
| 187 |
+
# 条件分岐を変数で処理
|
| 188 |
+
physics_consideration = " DeepSeekの物理学的知見を考慮して" if is_physics else ""
|
| 189 |
+
deepseek_section = f"DeepSeekの物理学的知見:\n{deepseek_knowledge}" if is_physics else ""
|
| 190 |
+
|
| 191 |
qwen_prompt = f"""
|
| 192 |
以下のユーザー入力に対してコーディングアシスタントとして回答してください。
|
| 193 |
+
Mistral Sabaの分析結果と{physics_consideration}、
|
| 194 |
最適なソリューションを提供してください。
|
| 195 |
|
| 196 |
ユーザー入力: {user_input}
|
|
|
|
| 198 |
Mistral Sabaの分析:
|
| 199 |
{mistral_analysis}
|
| 200 |
|
| 201 |
+
{deepseek_section}
|
| 202 |
"""
|
| 203 |
|
| 204 |
qwen_response = client.chat.completions.create(
|