mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-28 02:23:53 +02:00
feat: enhance Obsidian plugin schema with HeadingRef class
This commit is contained in:
parent
1d324f169f
commit
6eeaa2db4d
4 changed files with 38 additions and 3 deletions
|
|
@ -53,7 +53,6 @@ from app.schemas.obsidian_plugin import (
|
|||
ManifestResponse,
|
||||
NotePayload,
|
||||
)
|
||||
from app.services.llm_service import get_user_long_context_llm
|
||||
from app.utils.document_converters import generate_unique_identifier_hash
|
||||
from app.utils.document_versioning import create_version_snapshot
|
||||
|
||||
|
|
@ -102,7 +101,7 @@ def _build_metadata(
|
|||
"extension": payload.extension,
|
||||
"frontmatter": payload.frontmatter,
|
||||
"tags": payload.tags,
|
||||
"headings": payload.headings,
|
||||
"headings": [h.model_dump() for h in payload.headings],
|
||||
"outgoing_links": payload.resolved_links,
|
||||
"unresolved_links": payload.unresolved_links,
|
||||
"embeds": payload.embeds,
|
||||
|
|
@ -237,6 +236,8 @@ async def upsert_note(
|
|||
|
||||
document = prepared[0]
|
||||
|
||||
from app.services.llm_service import get_user_long_context_llm
|
||||
|
||||
llm = await get_user_long_context_llm(session, str(user_id), search_space_id)
|
||||
return await pipeline.index(document, connector_doc, llm)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue