KrishnaCosmic commited on
Commit
ad2ceb8
·
1 Parent(s): a8b3a89

Add PR persistence feature

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -229,7 +229,7 @@ async def rag_chat(request: RAGChatRequest):
229
  Passes directly to rag_chatbot_service.answer_question()
230
  """
231
  try:
232
- result = rag_chatbot_service.answer_question(
233
  question=request.question,
234
  repo_name=request.repo_name,
235
  top_k=request.top_k
@@ -248,7 +248,7 @@ async def rag_index(request: RAGIndexRequest):
248
  Passes directly to rag_chatbot_service.index_repository()
249
  """
250
  try:
251
- result = rag_chatbot_service.index_repository(
252
  repo_name=request.repo_name,
253
  github_access_token=request.github_access_token
254
  )
@@ -262,7 +262,7 @@ async def rag_index(request: RAGIndexRequest):
262
  async def rag_suggestions(repo_name: Optional[str] = None):
263
  """Get suggested questions for RAG chatbot."""
264
  try:
265
- suggestions = rag_chatbot_service.get_suggested_questions(repo_name)
266
  return {"suggestions": suggestions}
267
  except Exception as e:
268
  logger.error(f"RAG suggestions error: {e}")
 
229
  Passes directly to rag_chatbot_service.answer_question()
230
  """
231
  try:
232
+ result = await rag_chatbot_service.answer_question(
233
  question=request.question,
234
  repo_name=request.repo_name,
235
  top_k=request.top_k
 
248
  Passes directly to rag_chatbot_service.index_repository()
249
  """
250
  try:
251
+ result = await rag_chatbot_service.index_repository(
252
  repo_name=request.repo_name,
253
  github_access_token=request.github_access_token
254
  )
 
262
  async def rag_suggestions(repo_name: Optional[str] = None):
263
  """Get suggested questions for RAG chatbot."""
264
  try:
265
+ suggestions = await rag_chatbot_service.get_suggested_questions(repo_name)
266
  return {"suggestions": suggestions}
267
  except Exception as e:
268
  logger.error(f"RAG suggestions error: {e}")