mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 01:06:23 +02:00
feat: Basic Streaming
This commit is contained in:
parent
2a269e901b
commit
c7a173456a
2 changed files with 71 additions and 28 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import datetime
|
||||
from langchain.schema import HumanMessage, SystemMessage, AIMessage
|
||||
from app.config import config
|
||||
from typing import Any, List, Optional
|
||||
|
|
@ -31,6 +32,7 @@ class QueryService:
|
|||
# Create system message with instructions
|
||||
system_message = SystemMessage(
|
||||
content=f"""
|
||||
Today's date: {datetime.datetime.now().strftime("%Y-%m-%d")}
|
||||
You are a highly skilled AI assistant specializing in query optimization for advanced research.
|
||||
Your primary objective is to transform a user's initial query into a highly effective search query.
|
||||
This reformulated query will be used to retrieve information from diverse data sources.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue