Update main.py
This commit is contained in:
1 parent
d3edf267d2
commit
b88c77828b
1 file changed
-7
@@ -67,8 +67,6 @@ def _load_system_prompt() -> str:
|
|||||||
"Never simulate or guess results — always call the appropriate tool."
|
"Never simulate or guess results — always call the appropriate tool."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# ── Hafıza ────────────────────────────────────────────────────────────────────
|
|
||||||
_last_memory_input = ""
|
_last_memory_input = ""
|
||||||
|
|
||||||
|
|
||||||
@@ -94,8 +92,6 @@ def _update_memory_async(user_text: str, jarvis_text: str) -> None:
|
|||||||
if "429" not in str(e):
|
if "429" not in str(e):
|
||||||
print(f"[Memory] ⚠️ {e}")
|
print(f"[Memory] ⚠️ {e}")
|
||||||
|
|
||||||
|
|
||||||
# ── Tool declarations ─────────────────────────────────────────────────────────
|
|
||||||
TOOL_DECLARATIONS = [
|
TOOL_DECLARATIONS = [
|
||||||
{
|
{
|
||||||
"name": "open_app",
|
"name": "open_app",
|
||||||
@@ -527,7 +523,6 @@ class JarvisLive:
|
|||||||
print(f"[JARVIS] 🔧 {name} {args}")
|
print(f"[JARVIS] 🔧 {name} {args}")
|
||||||
self.ui.set_state("THINKING")
|
self.ui.set_state("THINKING")
|
||||||
|
|
||||||
# ── save_memory: sessiz, hızlı, Gemini'ye bildirim yok ───────────────
|
|
||||||
if name == "save_memory":
|
if name == "save_memory":
|
||||||
category = args.get("category", "notes")
|
category = args.get("category", "notes")
|
||||||
key = args.get("key", "")
|
key = args.get("key", "")
|
||||||
@@ -639,7 +634,6 @@ class JarvisLive:
|
|||||||
|
|
||||||
print(f"[JARVIS] 📤 {name} → {str(result)[:80]}")
|
print(f"[JARVIS] 📤 {name} → {str(result)[:80]}")
|
||||||
|
|
||||||
# ── Result: tek cümle söyle, dur ──────────────────────────────────────
|
|
||||||
return types.FunctionResponse(
|
return types.FunctionResponse(
|
||||||
id=fc.id, name=name,
|
id=fc.id, name=name,
|
||||||
response={"result": result}
|
response={"result": result}
|
||||||
@@ -725,7 +719,6 @@ class JarvisLive:
|
|||||||
await self.session.send_tool_response(
|
await self.session.send_tool_response(
|
||||||
function_responses=fn_responses
|
function_responses=fn_responses
|
||||||
)
|
)
|
||||||
# ── Boş turn YOK — bu "Anladım." sorununu yaratıyordu ──
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"[JARVIS] ❌ Recv: {e}")
|
print(f"[JARVIS] ❌ Recv: {e}")
|
||||||
|
|||||||
Reference in new issue
Block a user