DeL-TaiseiOzaki commited on
Commit
8baa940
1 Parent(s): 8969ec5
Files changed (1) hide show
  1. services/llm_service.py +11 -1
services/llm_service.py CHANGED
@@ -109,4 +109,14 @@ class LLMService:
109
  return answer, None
110
 
111
  except Exception as e:
112
- return None, f"エラーが発生しました: {str(e)}"
 
 
 
 
 
 
 
 
 
 
 
109
  return answer, None
110
 
111
  except Exception as e:
112
+ return None, f"エラーが発生しました: {str(e)}"
113
+
114
+ @staticmethod
115
+ def format_code_content(files: List[FileInfo]) -> str:
116
+ """ファイル内容をプロンプト用にフォーマット"""
117
+ formatted_content = []
118
+ for file_info in files:
119
+ formatted_content.append(
120
+ f"#ファイルパス\n{file_info.path}\n------------\n{file_info.content}\n"
121
+ )
122
+ return "\n".join(formatted_content)