Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
math_tutor_dev
public_math_tutor
Commits
f6bf4c66
Commit
f6bf4c66
authored
Jan 23, 2026
by
Kantz
Browse files
renaming
parent
b11340cd
Changes
4
Show whitespace changes
Inline
Side-by-side
math-tutor/backend/app/LLM_services/decision_
tool
.py
→
math-tutor/backend/app/LLM_services/decision_
LLM
.py
View file @
f6bf4c66
File moved
math-tutor/backend/app/LLM_services/hint_
tool
.py
→
math-tutor/backend/app/LLM_services/hint_
LLM
.py
View file @
f6bf4c66
File moved
math-tutor/backend/app/LLM_services/math_intent.py
→
math-tutor/backend/app/LLM_services/math_intent
_LLM
.py
View file @
f6bf4c66
File moved
math-tutor/backend/app/deterministic_services/orchestrator.py
View file @
f6bf4c66
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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment