mxp1404 commited on
Commit
27c86ec
·
verified ·
1 Parent(s): 417fb82

Upload chatbot/prompts.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. chatbot/prompts.py +2 -7
chatbot/prompts.py CHANGED
@@ -1,6 +1,4 @@
1
- """
2
- System prompt, context formatting, and chunk deduplication for the RAG chatbot.
3
- """
4
 
5
  from chatbot.config import MAX_CONTEXT_CHARS, MAX_CHUNK_CHARS
6
  from chatbot.retriever import ChunkResult
@@ -70,10 +68,7 @@ def build_messages(
70
  context: str,
71
  history: list[dict] | None = None,
72
  ) -> list[dict]:
73
- """
74
- Build the Ollama chat messages list.
75
- `history` is a list of prior {"role": ..., "content": ...} entries.
76
- """
77
  messages = [{"role": "system", "content": SYSTEM_PROMPT}]
78
 
79
  if history:
 
1
+ """Prompt construction, context formatting, and chunk deduplication."""
 
 
2
 
3
  from chatbot.config import MAX_CONTEXT_CHARS, MAX_CHUNK_CHARS
4
  from chatbot.retriever import ChunkResult
 
68
  context: str,
69
  history: list[dict] | None = None,
70
  ) -> list[dict]:
71
+ """Build the chat messages list with system prompt, history, and context."""
 
 
 
72
  messages = [{"role": "system", "content": SYSTEM_PROMPT}]
73
 
74
  if history: