mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-24 07:55:07 +01:00
Fix return type of the generate_chat_response method
This commit is contained in:
parent
54d4fd0e08
commit
14f8c151c8
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@ import logging
|
||||||
import asyncio
|
import asyncio
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from typing import Iterator, List, Optional, Union
|
from typing import Iterator, List, Optional, Union, Tuple, Dict
|
||||||
from concurrent.futures import ThreadPoolExecutor
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
|
|
||||||
from fastapi import HTTPException, Request
|
from fastapi import HTTPException, Request
|
||||||
|
@ -109,7 +109,7 @@ def generate_chat_response(
|
||||||
inferred_queries: List[str] = [],
|
inferred_queries: List[str] = [],
|
||||||
conversation_command: ConversationCommand = ConversationCommand.Default,
|
conversation_command: ConversationCommand = ConversationCommand.Default,
|
||||||
user: KhojUser = None,
|
user: KhojUser = None,
|
||||||
) -> Union[ThreadedGenerator, Iterator[str]]:
|
) -> Tuple[Union[ThreadedGenerator, Iterator[str]], Dict[str, str]]:
|
||||||
def _save_to_conversation_log(
|
def _save_to_conversation_log(
|
||||||
q: str,
|
q: str,
|
||||||
chat_response: str,
|
chat_response: str,
|
||||||
|
|
Loading…
Reference in a new issue