mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-04 21:29:12 +00:00
Use user chat models for train of thought when no server chat settings
Update chat actors to use user's chat model for train of thought. This requires passing the user info as argument to all the chat actors. Whether the user is subscribed or not can be inferred from the user info being passed, so it doesn't need to be passed as a separate argument to chat actor functions Let send_message_to_model function infer chat model instead of passing it as an argument from some chat actors. Better if this logic can be done in a single place.
This commit is contained in:
@@ -25,7 +25,6 @@ async def text_to_image(
|
||||
location_data: LocationData,
|
||||
references: List[Dict[str, Any]],
|
||||
online_results: Dict[str, Any],
|
||||
subscribed: bool = False,
|
||||
send_status_func: Optional[Callable] = None,
|
||||
uploaded_image_url: Optional[str] = None,
|
||||
agent: Agent = None,
|
||||
@@ -66,8 +65,8 @@ async def text_to_image(
|
||||
note_references=references,
|
||||
online_results=online_results,
|
||||
model_type=text_to_image_config.model_type,
|
||||
subscribed=subscribed,
|
||||
uploaded_image_url=uploaded_image_url,
|
||||
user=user,
|
||||
agent=agent,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user