mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-01 20:03:30 +02:00
feat: add language support across configurations and prompts
This commit is contained in:
parent
402039f02f
commit
045537aa79
16 changed files with 242 additions and 18 deletions
|
|
@ -578,6 +578,7 @@ async def write_answer_outline(
|
|||
num_sections = configuration.num_sections
|
||||
user_id = configuration.user_id
|
||||
search_space_id = configuration.search_space_id
|
||||
language = configuration.language # Get language from configuration
|
||||
|
||||
writer(
|
||||
{
|
||||
|
|
@ -628,7 +629,7 @@ async def write_answer_outline(
|
|||
|
||||
# Create messages for the LLM
|
||||
messages = [
|
||||
SystemMessage(content=get_answer_outline_system_prompt()),
|
||||
SystemMessage(content=get_answer_outline_system_prompt(language=language)),
|
||||
HumanMessage(content=human_message_content),
|
||||
]
|
||||
|
||||
|
|
@ -2000,6 +2001,7 @@ async def handle_qna_workflow(
|
|||
"relevant_documents": all_documents, # Use combined documents
|
||||
"user_id": configuration.user_id,
|
||||
"search_space_id": configuration.search_space_id,
|
||||
"language": configuration.language,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue