Enhance sandbox functionality and MCP tools
This commit enhances the sandbox functionality by: - Adding a new jj_log tool to retrieve commit history - Refactoring sandbox tools into dedicated modules - Improving project management with session-based active projects - Updating Docker configuration to properly mount the sandbox volume - Adding proper error handling and documentation for all tools - Updating dependencies and configuration files
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import json
|
||||
import re
|
||||
|
||||
from ollama import prompt
|
||||
|
||||
|
||||
@@ -21,8 +22,8 @@ def structure_to_json(text, schema):
|
||||
full_prompt = f"""Transform the following structured text into JSON according to the given schema.
|
||||
|
||||
**Return only valid JSON, without any Markdown formatting :**
|
||||
- no backticks,
|
||||
- no code blocks,
|
||||
- no backticks,
|
||||
- no code blocks,
|
||||
- no extra text
|
||||
|
||||
Input text:
|
||||
@@ -32,7 +33,7 @@ Schema:
|
||||
{schema_json}"""
|
||||
|
||||
# Send to Ollama
|
||||
response = prompt("ollama:qwen3:0.6b", full_prompt, allow_pull=True)
|
||||
response = prompt("qwen3:0.6b", full_prompt, allow_pull=True)
|
||||
|
||||
# Remove any markdown formatting (backticks, code blocks) that Ollama might include
|
||||
# Only remove backticks at the beginning or end of the response, not those within the JSON
|
||||
|
||||
Reference in New Issue
Block a user