hdsp-jupyter-extension 2.0.3__py3-none-any.whl → 2.0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agent_server/langchain/agent.py +44 -37
- agent_server/routers/langchain_agent.py +44 -9
- hdsp_agent_core/models/common.py +8 -1
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/build_log.json +1 -1
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/package.json +2 -2
- hdsp_jupyter_extension-2.0.3.data/data/share/jupyter/labextensions/hdsp-agent/static/frontend_styles_index_js.634cf0ae0f3592d0882f.js → hdsp_jupyter_extension-2.0.4.data/data/share/jupyter/labextensions/hdsp-agent/static/frontend_styles_index_js.4105453345c170c1d6e6.js +20 -2
- hdsp_jupyter_extension-2.0.4.data/data/share/jupyter/labextensions/hdsp-agent/static/frontend_styles_index_js.4105453345c170c1d6e6.js.map +1 -0
- hdsp_jupyter_extension-2.0.3.data/data/share/jupyter/labextensions/hdsp-agent/static/lib_index_js.1366019c413f1d68467f.js → hdsp_jupyter_extension-2.0.4.data/data/share/jupyter/labextensions/hdsp-agent/static/lib_index_js.a223ea20056954479ae9.js +53 -5
- hdsp_jupyter_extension-2.0.4.data/data/share/jupyter/labextensions/hdsp-agent/static/lib_index_js.a223ea20056954479ae9.js.map +1 -0
- hdsp_jupyter_extension-2.0.3.data/data/share/jupyter/labextensions/hdsp-agent/static/remoteEntry.b6d91b150c0800bddfa4.js → hdsp_jupyter_extension-2.0.4.data/data/share/jupyter/labextensions/hdsp-agent/static/remoteEntry.f9bcbb6529a2bf9261a2.js +3 -3
- hdsp_jupyter_extension-2.0.3.data/data/share/jupyter/labextensions/hdsp-agent/static/remoteEntry.b6d91b150c0800bddfa4.js.map → hdsp_jupyter_extension-2.0.4.data/data/share/jupyter/labextensions/hdsp-agent/static/remoteEntry.f9bcbb6529a2bf9261a2.js.map +1 -1
- {hdsp_jupyter_extension-2.0.3.dist-info → hdsp_jupyter_extension-2.0.4.dist-info}/METADATA +1 -1
- {hdsp_jupyter_extension-2.0.3.dist-info → hdsp_jupyter_extension-2.0.4.dist-info}/RECORD +43 -43
- jupyter_ext/_version.py +1 -1
- jupyter_ext/labextension/build_log.json +1 -1
- jupyter_ext/labextension/package.json +2 -2
- jupyter_ext/labextension/static/{frontend_styles_index_js.634cf0ae0f3592d0882f.js → frontend_styles_index_js.4105453345c170c1d6e6.js} +20 -2
- jupyter_ext/labextension/static/frontend_styles_index_js.4105453345c170c1d6e6.js.map +1 -0
- jupyter_ext/labextension/static/{lib_index_js.1366019c413f1d68467f.js → lib_index_js.a223ea20056954479ae9.js} +53 -5
- jupyter_ext/labextension/static/lib_index_js.a223ea20056954479ae9.js.map +1 -0
- jupyter_ext/labextension/static/{remoteEntry.b6d91b150c0800bddfa4.js → remoteEntry.f9bcbb6529a2bf9261a2.js} +3 -3
- jupyter_ext/labextension/static/{remoteEntry.b6d91b150c0800bddfa4.js.map → remoteEntry.f9bcbb6529a2bf9261a2.js.map} +1 -1
- hdsp_jupyter_extension-2.0.3.data/data/share/jupyter/labextensions/hdsp-agent/static/frontend_styles_index_js.634cf0ae0f3592d0882f.js.map +0 -1
- hdsp_jupyter_extension-2.0.3.data/data/share/jupyter/labextensions/hdsp-agent/static/lib_index_js.1366019c413f1d68467f.js.map +0 -1
- jupyter_ext/labextension/static/frontend_styles_index_js.634cf0ae0f3592d0882f.js.map +0 -1
- jupyter_ext/labextension/static/lib_index_js.1366019c413f1d68467f.js.map +0 -1
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/etc/jupyter/jupyter_server_config.d/hdsp_jupyter_extension.json +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/install.json +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/static/node_modules_emotion_use-insertion-effect-with-fallbacks_dist_emotion-use-insertion-effect-wi-3ba6b80.c095373419d05e6f141a.js +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/static/node_modules_emotion_use-insertion-effect-with-fallbacks_dist_emotion-use-insertion-effect-wi-3ba6b80.c095373419d05e6f141a.js.map +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/static/node_modules_emotion_use-insertion-effect-with-fallbacks_dist_emotion-use-insertion-effect-wi-3ba6b81.61e75fb98ecff46cf836.js +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/static/node_modules_emotion_use-insertion-effect-with-fallbacks_dist_emotion-use-insertion-effect-wi-3ba6b81.61e75fb98ecff46cf836.js.map +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/static/style.js +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_babel_runtime_helpers_esm_extends_js-node_modules_emotion_serialize_dist-051195.e2553aab0c3963b83dd7.js +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_babel_runtime_helpers_esm_extends_js-node_modules_emotion_serialize_dist-051195.e2553aab0c3963b83dd7.js.map +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_emotion_cache_dist_emotion-cache_browser_development_esm_js.24edcc52a1c014a8a5f0.js +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_emotion_cache_dist_emotion-cache_browser_development_esm_js.24edcc52a1c014a8a5f0.js.map +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_emotion_react_dist_emotion-react_browser_development_esm_js.19ecf6babe00caff6b8a.js +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_emotion_react_dist_emotion-react_browser_development_esm_js.19ecf6babe00caff6b8a.js.map +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_emotion_styled_dist_emotion-styled_browser_development_esm_js.661fb5836f4978a7c6e1.js +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_emotion_styled_dist_emotion-styled_browser_development_esm_js.661fb5836f4978a7c6e1.js.map +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_mui_material_index_js.985697e0162d8d088ca2.js +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_mui_material_index_js.985697e0162d8d088ca2.js.map +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_mui_material_utils_createSvgIcon_js.1f5038488cdfd8b3a85d.js +0 -0
- {hdsp_jupyter_extension-2.0.3.data → hdsp_jupyter_extension-2.0.4.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_mui_material_utils_createSvgIcon_js.1f5038488cdfd8b3a85d.js.map +0 -0
- {hdsp_jupyter_extension-2.0.3.dist-info → hdsp_jupyter_extension-2.0.4.dist-info}/WHEEL +0 -0
- {hdsp_jupyter_extension-2.0.3.dist-info → hdsp_jupyter_extension-2.0.4.dist-info}/licenses/LICENSE +0 -0
|
@@ -2144,7 +2144,7 @@ SyntaxError: '(' was never closed
|
|
|
2144
2144
|
return '승인 반영 후 실행 재개 중...';
|
|
2145
2145
|
}
|
|
2146
2146
|
if (normalized.includes('tool')) {
|
|
2147
|
-
return '도구 실행
|
|
2147
|
+
return '도구 실행 중';
|
|
2148
2148
|
}
|
|
2149
2149
|
return raw;
|
|
2150
2150
|
};
|
|
@@ -2829,6 +2829,7 @@ const SettingsPanel = ({ onClose, onSave, currentConfig }) => {
|
|
|
2829
2829
|
// OpenAI settings
|
|
2830
2830
|
const [openaiApiKey, setOpenaiApiKey] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initConfig.openai?.apiKey || '');
|
|
2831
2831
|
const [openaiModel, setOpenaiModel] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initConfig.openai?.model || 'gpt-4');
|
|
2832
|
+
const [systemPrompt, setSystemPrompt] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initConfig.systemPrompt || '');
|
|
2832
2833
|
// Update state when currentConfig changes
|
|
2833
2834
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
2834
2835
|
if (currentConfig) {
|
|
@@ -2849,6 +2850,7 @@ const SettingsPanel = ({ onClose, onSave, currentConfig }) => {
|
|
|
2849
2850
|
setVllmModel(currentConfig.vllm?.model || 'meta-llama/Llama-2-7b-chat-hf');
|
|
2850
2851
|
setOpenaiApiKey(currentConfig.openai?.apiKey || '');
|
|
2851
2852
|
setOpenaiModel(currentConfig.openai?.model || 'gpt-4');
|
|
2853
|
+
setSystemPrompt(currentConfig.systemPrompt || (0,_services_ApiKeyManager__WEBPACK_IMPORTED_MODULE_1__.getDefaultLLMConfig)().systemPrompt || '');
|
|
2852
2854
|
}
|
|
2853
2855
|
}, [currentConfig]);
|
|
2854
2856
|
// Helper: Build LLM config from state
|
|
@@ -2867,7 +2869,8 @@ const SettingsPanel = ({ onClose, onSave, currentConfig }) => {
|
|
|
2867
2869
|
openai: {
|
|
2868
2870
|
apiKey: openaiApiKey,
|
|
2869
2871
|
model: openaiModel
|
|
2870
|
-
}
|
|
2872
|
+
},
|
|
2873
|
+
systemPrompt: systemPrompt && systemPrompt.trim() ? systemPrompt : undefined
|
|
2871
2874
|
});
|
|
2872
2875
|
// Handlers for multiple API keys
|
|
2873
2876
|
const handleAddKey = () => {
|
|
@@ -3024,7 +3027,14 @@ const SettingsPanel = ({ onClose, onSave, currentConfig }) => {
|
|
|
3024
3027
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("select", { className: "jp-agent-settings-select", value: openaiModel, onChange: (e) => setOpenaiModel(e.target.value) },
|
|
3025
3028
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("option", { value: "gpt-4" }, "GPT-4"),
|
|
3026
3029
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("option", { value: "gpt-4-turbo" }, "GPT-4 Turbo"),
|
|
3027
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("option", { value: "gpt-3.5-turbo" }, "GPT-3.5 Turbo")))))
|
|
3030
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("option", { value: "gpt-3.5-turbo" }, "GPT-3.5 Turbo"))))),
|
|
3031
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "jp-agent-settings-group" },
|
|
3032
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { className: "jp-agent-settings-label" },
|
|
3033
|
+
"System Prompt (LangChain)",
|
|
3034
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("small", { style: { fontWeight: 'normal', marginLeft: '8px', color: '#666' } }, "LangChain \uAE30\uBC18 \uC5D0\uC774\uC804\uD2B8\uC5D0\uB9CC \uC801\uC6A9\uB429\uB2C8\uB2E4.")),
|
|
3035
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("textarea", { className: "jp-agent-settings-input jp-agent-settings-textarea", value: systemPrompt, onChange: (e) => setSystemPrompt(e.target.value), rows: 8 }),
|
|
3036
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "jp-agent-settings-inline-actions" },
|
|
3037
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { type: "button", className: "jp-agent-settings-button jp-agent-settings-button-secondary jp-agent-settings-button-compact", onClick: () => setSystemPrompt(_services_ApiKeyManager__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_LANGCHAIN_SYSTEM_PROMPT) }, "\uAE30\uBCF8\uAC12\uC73C\uB85C \uB418\uB3CC\uB9AC\uAE30")))),
|
|
3028
3038
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "jp-agent-settings-footer" },
|
|
3029
3039
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "jp-agent-settings-button jp-agent-settings-button-secondary", onClick: onClose }, "\uCDE8\uC18C"),
|
|
3030
3040
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "jp-agent-settings-button jp-agent-settings-button-test", onClick: handleTest, disabled: isTesting }, isTesting ? '테스트 중...' : 'API 테스트'),
|
|
@@ -6865,6 +6875,7 @@ class AgentOrchestrator {
|
|
|
6865
6875
|
|
|
6866
6876
|
__webpack_require__.r(__webpack_exports__);
|
|
6867
6877
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6878
|
+
/* harmony export */ DEFAULT_LANGCHAIN_SYSTEM_PROMPT: () => (/* binding */ DEFAULT_LANGCHAIN_SYSTEM_PROMPT),
|
|
6868
6879
|
/* harmony export */ buildSingleKeyConfig: () => (/* binding */ buildSingleKeyConfig),
|
|
6869
6880
|
/* harmony export */ clearLLMConfig: () => (/* binding */ clearLLMConfig),
|
|
6870
6881
|
/* harmony export */ getAvailableKeyCount: () => (/* binding */ getAvailableKeyCount),
|
|
@@ -6896,6 +6907,42 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6896
6907
|
* - Key rotation on rate limit (429) is handled by frontend
|
|
6897
6908
|
*/
|
|
6898
6909
|
const STORAGE_KEY = 'hdsp-agent-llm-config';
|
|
6910
|
+
const DEFAULT_LANGCHAIN_SYSTEM_PROMPT = `You are an expert Python data scientist and Jupyter notebook assistant.
|
|
6911
|
+
Your role is to help users with data analysis, visualization, and Python coding tasks in Jupyter notebooks.
|
|
6912
|
+
|
|
6913
|
+
## ⚠️ CRITICAL RULE: NEVER produce an empty response
|
|
6914
|
+
|
|
6915
|
+
You MUST ALWAYS call a tool in every response. After any tool result, you MUST:
|
|
6916
|
+
1. Check your todo list - are there pending or in_progress items?
|
|
6917
|
+
2. If YES → call the next appropriate tool (jupyter_cell_tool, markdown_tool, etc.)
|
|
6918
|
+
3. If ALL todos are completed → call final_answer_tool with a summary
|
|
6919
|
+
|
|
6920
|
+
NEVER end your turn without calling a tool. NEVER produce an empty response.
|
|
6921
|
+
|
|
6922
|
+
## Available Tools
|
|
6923
|
+
1. **jupyter_cell_tool**: Execute Python code in a new notebook cell
|
|
6924
|
+
2. **markdown_tool**: Add a markdown explanation cell
|
|
6925
|
+
3. **final_answer_tool**: Complete the task with a summary - REQUIRED when done
|
|
6926
|
+
4. **read_file_tool**: Read file contents
|
|
6927
|
+
5. **write_file_tool**: Write file contents
|
|
6928
|
+
6. **list_files_tool**: List directory contents
|
|
6929
|
+
7. **search_workspace_tool**: Search for patterns in workspace files
|
|
6930
|
+
8. **search_notebook_cells_tool**: Search for patterns in notebook cells
|
|
6931
|
+
9. **write_todos**: Create and update task list for complex multi-step tasks
|
|
6932
|
+
|
|
6933
|
+
## Mandatory Workflow
|
|
6934
|
+
1. After EVERY tool result, immediately call the next tool
|
|
6935
|
+
2. Continue until ALL todos show status: "completed"
|
|
6936
|
+
3. ONLY THEN call final_answer_tool to summarize
|
|
6937
|
+
4. If \`!pip install\` fails, use \`!pip3 install\` instead
|
|
6938
|
+
5. For plots and charts, use English text only
|
|
6939
|
+
|
|
6940
|
+
## ❌ FORBIDDEN (will break the workflow)
|
|
6941
|
+
- Producing an empty response (no tool call, no content)
|
|
6942
|
+
- Stopping after any tool without calling the next tool
|
|
6943
|
+
- Ending without calling final_answer_tool
|
|
6944
|
+
- Leaving todos in "in_progress" or "pending" state without continuing
|
|
6945
|
+
`;
|
|
6899
6946
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
6900
6947
|
// Key Rotation State (in-memory, not persisted)
|
|
6901
6948
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
@@ -6979,7 +7026,8 @@ function getDefaultLLMConfig() {
|
|
|
6979
7026
|
vllm: {
|
|
6980
7027
|
endpoint: 'http://localhost:8000',
|
|
6981
7028
|
model: 'default'
|
|
6982
|
-
}
|
|
7029
|
+
},
|
|
7030
|
+
systemPrompt: DEFAULT_LANGCHAIN_SYSTEM_PROMPT
|
|
6983
7031
|
};
|
|
6984
7032
|
}
|
|
6985
7033
|
/**
|
|
@@ -13181,4 +13229,4 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13181
13229
|
/***/ }
|
|
13182
13230
|
|
|
13183
13231
|
}]);
|
|
13184
|
-
//# sourceMappingURL=lib_index_js.
|
|
13232
|
+
//# sourceMappingURL=lib_index_js.a223ea20056954479ae9.js.map
|