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
da7d39aa
Commit
da7d39aa
authored
Feb 05, 2026
by
Kantz
Browse files
anpassung der string rep von Source ID um none zu vermeiden
parent
9a69712d
Changes
1
Hide whitespace changes
Inline
Side-by-side
math-tutor/backend/app/deterministic_services/vector_store.py
View file @
da7d39aa
...
...
@@ -273,11 +273,18 @@ class SourceID:
chapter_title
:
Optional
[
str
]
section_title
:
Optional
[
str
]
subsection_title
:
Optional
[
str
]
title
:
Optional
[
str
]
title
:
str
doc_type
:
str
def
to_string
(
self
)
->
str
:
return
f
"[
{
self
.
chapter_title
}
|
{
self
.
section_title
}
|
{
self
.
subsection_title
}
|
{
self
.
title
}
|
{
self
.
doc_type
}
]"
string_rep
=
self
.
title
if
self
.
subsection_title
:
string_rep
=
f
"
{
self
.
subsection_title
}
|
{
string_rep
}
"
if
self
.
section_title
:
string_rep
=
f
"
{
self
.
section_title
}
|
{
string_rep
}
"
if
self
.
chapter_title
:
string_rep
=
f
"
{
self
.
chapter_title
}
|
{
string_rep
}
"
return
f
"[
{
string_rep
}
|
{
self
.
doc_type
}
]"
def
_row_to_retrieved
(
row
:
Dict
[
str
,
Any
])
->
Retrieved
:
...
...
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