Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Co <alex.tuan@mindvalley.com>
  • Loading branch information
onimsha committed Nov 11, 2024
1 parent f180a71 commit 8b24405
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions backend/danswer/llm/answering/prompts/citations_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,35 @@
from danswer.db.search_settings import get_multilingual_expansion
from danswer.file_store.utils import InMemoryChatFile
from danswer.llm.answering.models import PromptConfig
from danswer.llm.factory import get_llms_for_persona
from danswer.llm.factory import get_main_llm_from_tuple
from danswer.llm.factory import get_llms_for_persona, get_main_llm_from_tuple
from danswer.llm.interfaces import LLMConfig
from danswer.llm.utils import build_content_with_imgs
from danswer.llm.utils import check_number_of_tokens
from danswer.llm.utils import get_max_input_tokens
from danswer.llm.utils import (
build_content_with_imgs,
check_number_of_tokens,
get_max_input_tokens,
)
from danswer.prompts.chat_prompts import REQUIRE_CITATION_STATEMENT
from danswer.prompts.constants import DEFAULT_IGNORE_STATEMENT
from danswer.prompts.direct_qa_prompts import CITATIONS_PROMPT
from danswer.prompts.direct_qa_prompts import CITATIONS_PROMPT_FOR_TOOL_CALLING
from danswer.prompts.prompt_utils import add_date_time_to_prompt
from danswer.prompts.prompt_utils import add_employee_context_to_prompt
from danswer.prompts.prompt_utils import build_complete_context_str
from danswer.prompts.prompt_utils import build_task_prompt_reminders
from danswer.prompts.token_counts import ADDITIONAL_INFO_TOKEN_CNT
from danswer.prompts.token_counts import CHAT_USER_PROMPT_WITH_CONTEXT_OVERHEAD_TOKEN_CNT
from danswer.prompts.token_counts import CITATION_REMINDER_TOKEN_CNT
from danswer.prompts.token_counts import CITATION_STATEMENT_TOKEN_CNT
from danswer.prompts.token_counts import LANGUAGE_HINT_TOKEN_CNT
from danswer.prompts.direct_qa_prompts import (
CITATIONS_PROMPT,
CITATIONS_PROMPT_FOR_TOOL_CALLING,
)
from danswer.prompts.prompt_utils import (
add_date_time_to_prompt,
add_employee_context_to_prompt,
build_complete_context_str,
build_task_prompt_reminders,
)
from danswer.prompts.token_counts import (
ADDITIONAL_INFO_TOKEN_CNT,
CHAT_USER_PROMPT_WITH_CONTEXT_OVERHEAD_TOKEN_CNT,
CITATION_REMINDER_TOKEN_CNT,
CITATION_STATEMENT_TOKEN_CNT,
LANGUAGE_HINT_TOKEN_CNT,
)
from danswer.search.models import InferenceChunk
from danswer.utils.logger import setup_logger
from langchain.schema.messages import HumanMessage
from langchain.schema.messages import SystemMessage
from langchain.schema.messages import HumanMessage, SystemMessage

logger = setup_logger()

Expand Down

0 comments on commit 8b24405

Please sign in to comment.