Commit f6bf4c66 authored by Kantz's avatar Kantz
Browse files

renaming

parent b11340cd
from app.deterministic_services import context_store, retrieval_service, tool_logging from app.deterministic_services import context_store, retrieval_service, tool_logging
from app.tools import math_tool from app.tools import math_tool
from app.LLM_services import hint_tool, decision_tool, math_intent from app.LLM_services import hint_LLM, decision_LLM, math_intent_LLM
def _append_tool_log(tool_log: list[dict], name: str, args: dict, response: object) -> None: def _append_tool_log(tool_log: list[dict], name: str, args: dict, response: object) -> None:
...@@ -16,7 +16,7 @@ def _bootstrap_context(sheet: dict, query_text: str, tool_log: list[dict]) -> No ...@@ -16,7 +16,7 @@ def _bootstrap_context(sheet: dict, query_text: str, tool_log: list[dict]) -> No
) )
_append_tool_log(tool_log, "retrieve_context", {"query": query_text}, {"context": context, "sources": sources}) _append_tool_log(tool_log, "retrieve_context", {"query": query_text}, {"context": context, "sources": sources})
math_request = math_intent.extract_math_request(query_text) math_request = math_intent_LLM.extract_math_request(query_text)
if math_request: if math_request:
solution = math_tool.sympy_solve(**math_request) solution = math_tool.sympy_solve(**math_request)
context_store.add_math_solution( context_store.add_math_solution(
...@@ -56,7 +56,7 @@ def run_chat(messages: list[dict], draft: str | None = None) -> dict: ...@@ -56,7 +56,7 @@ def run_chat(messages: list[dict], draft: str | None = None) -> dict:
history_text = context_store.format_history(messages) history_text = context_store.format_history(messages)
sheet_text = context_store.format_sheet(sheet) sheet_text = context_store.format_sheet(sheet)
decision = decision_tool.needs_more_context(history_text, sheet_text) decision = decision_LLM.needs_more_context(history_text, sheet_text)
context_store.add_decision(sheet, decision) context_store.add_decision(sheet, decision)
if decision.get("needs_more_context"): if decision.get("needs_more_context"):
...@@ -69,7 +69,7 @@ def run_chat(messages: list[dict], draft: str | None = None) -> dict: ...@@ -69,7 +69,7 @@ def run_chat(messages: list[dict], draft: str | None = None) -> dict:
"history": history_text, "history": history_text,
"context_sheet": sheet_text, "context_sheet": sheet_text,
} }
reply = hint_tool.generate_hint(**hint_args) reply = hint_LLM.generate_hint(**hint_args)
context_store.add_tool_output(sheet, {"name": "generate_hint", "arguments": hint_args, "response": reply}) context_store.add_tool_output(sheet, {"name": "generate_hint", "arguments": hint_args, "response": reply})
_append_tool_log(tool_log, "generate_hint", hint_args, reply) _append_tool_log(tool_log, "generate_hint", hint_args, reply)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment