gabykim commited on
Commit
a610ed1
·
1 Parent(s): 9644b48

combine code and summary into chunk

Browse files
src/know_lang_bot/summarizer/summarizer.py CHANGED
@@ -96,6 +96,14 @@ Provide a clean, concise and focused summary. Don't include unnecessary nor gene
96
  async def process_and_store_chunk(self, chunk: CodeChunk):
97
  """Process a chunk and store it in ChromaDB"""
98
  summary = await self.summarize_chunk(chunk)
 
 
 
 
 
 
 
 
99
 
100
  # Create a unique ID for the chunk
101
  chunk_id = f"{chunk.file_path}:{chunk.start_line}-{chunk.end_line}"
 
96
  async def process_and_store_chunk(self, chunk: CodeChunk):
97
  """Process a chunk and store it in ChromaDB"""
98
  summary = await self.summarize_chunk(chunk)
99
+
100
+ summary = f"""
101
+ CODE:
102
+ {chunk.content}
103
+
104
+ SUMMARY:
105
+ {summary}
106
+ """
107
 
108
  # Create a unique ID for the chunk
109
  chunk_id = f"{chunk.file_path}:{chunk.start_line}-{chunk.end_line}"