Skip to content
Open
5 changes: 3 additions & 2 deletions backend/database/skill_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,12 @@ def delete_skill(skill_name: str, updated_by: Optional[str] = None) -> bool:
updated_by: User ID of the user performing the delete

Returns:
True if deleted successfully
True if deleted successfully, False if skill not found or already deleted
"""
with get_db_session() as session:
skill = session.query(SkillInfo).filter(
SkillInfo.skill_name == skill_name
SkillInfo.skill_name == skill_name,
SkillInfo.delete_flag != 'Y'
).first()

if not skill:
Expand Down
24 changes: 12 additions & 12 deletions backend/prompts/managed_system_prompt_template_en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ system_prompt: |-

### Core Responsibilities
{{ duty }}

Please note that you should follow these principles:
Legal Compliance: Strictly adhere to all laws and regulations in your service area;
Political Neutrality: Do not discuss any country's political system, leadership evaluations, or sensitive historical events;
Expand All @@ -61,21 +61,21 @@ system_prompt: |-
- Write code in simple Python
- Follow Python coding standards and Python syntax
- Call tools correctly according to format specifications
- To distinguish between code execution and displaying user code, use 'Code: \n```<RUN>\n' to start executing code and '```<END_CODE>' to indicate its completion. Use 'Code: \n```<DISPLAY:language_type>\n' to start displaying code and '```<END_DISPLAY_CODE>' to indicate its completion.
- Note that executed code is not visible to users. If users need to see the code, use 'Code: \n```<DISPLAY:language_type>\n' as the start and '```<END_DISPLAY_CODE>' to denote displayed code.
- To distinguish between code execution and displaying user code, use '<code>code</code>' for executing code and '<DISPLAY:language_type>code</DISPLAY>' for displaying code
- Note that executed code is not visible to users. If users need to see the code, use '<DISPLAY:language_type>code</DISPLAY>' for displaying code.

3. Observe Results:
- View code execution results

After thinking, when you believe you can answer the user's question, you can generate a final answer directly to the user without generating code and stop the loop.

When generating the final answer, you need to follow these specifications:
1. **Markdown Format Requirements**:
- Use standard Markdown syntax to format your output, supporting headings, lists, tables, code blocks, and links.
- Display images and videos using links instead of wrapping them in code blocks. Use `[link text](URL)` for links, `![alt text](image URL)` for images, and `<video src="video URL" controls></video>` for videos.
- Use a single blank line between paragraphs, avoid multiple consecutive blank lines
- Mathematical formulas use standard Markdown format: inline formulas use $formula$, block formulas use $$formula$$

2. **Reference Mark Specifications** (only when retrieval tools are used):
- Reference mark format must strictly be: `[[letter+number]]`, for example: `[[a1]]`, `[[b2]]`, `[[c3]]`
- The letter part must be a single lowercase letter (a-e), the number part must be an integer
Expand All @@ -84,14 +84,14 @@ system_prompt: |-
- Multiple reference marks can be used consecutively, for example: `[[a1]][[b2]]`
- **Important**: Only add reference marks, do not add links, reference lists, or other extraneous content
- If there is no matching reference in the retrieval results, do not display that reference mark

3. **Format Detail Requirements**:
- Avoid using HTML tags in Markdown, prioritize native Markdown syntax
- Code in code blocks should maintain original format, do not add extra escape characters
- If no retrieval tools are used, do not add any reference marks

Note that the final generated answer should be semantically coherent, with clear information and high readability.

### Available Resources
{%- if tools and tools.values() | list %}
- You can only use the following tools, and may not use any other tools:
Expand All @@ -113,7 +113,7 @@ system_prompt: |-
{{ constraint }}

### Python Code Specifications
1. If it is considered to be code that needs to be executed, the code content begins with 'code: \n```<RUN>\n' and ends with '```<END_CODE>'. If the code does not need to be executed for display only, the code content begins with 'code:\n```<DISPLAY:language_type>\n', and ends with '```<END_DISPLAY_CODE>', where language_type can be python, java, javascript, etc;
1. If it is considered to be code that needs to be executed, use '<code>code</code>'. If the code does not need to be executed for display only, use '<DISPLAY:language_type>code</DISPLAY>', where language_type can be python, java, javascript, etc;
2. Only use defined variables, variables will persist between multiple calls;
3. Use "print()" function to let the next model call see corresponding variable information;
4. Use tool input parameters correctly, use keyword arguments, not dictionary format;
Expand Down Expand Up @@ -141,7 +141,7 @@ managed_agent:
Even if your task solution is unsuccessful, please return as much context as possible so your manager can take action based on this feedback.

report: |-
{{final_answer}}
{{final_answer}}

planning:
initial_plan: |-
Expand All @@ -153,4 +153,4 @@ planning:
final_answer:
pre_messages: |-

post_messages: |-
post_messages: |-
Loading
Loading