@@ -149,6 +149,12 @@ def main(verbose: int, quiet: bool):
149
149
llm_model_option = click .option (
150
150
"--model" , type = click .Choice (ALL_AVAILABLE_MODELS ), help = "Model to use for generation."
151
151
)
152
+ rag_docs_option = click .option (
153
+ "--rag-docs" ,
154
+ multiple = True ,
155
+ default = [],
156
+ help = "Paths to the docs directories, URLs, or lowercased ontology names." ,
157
+ )
152
158
153
159
154
160
@main .command ()
@@ -216,6 +222,7 @@ def get_labels(repo: str, token: str):
216
222
@use_llm_option
217
223
@llm_provider_option
218
224
@llm_model_option
225
+ @rag_docs_option
219
226
def process_issue (
220
227
input : str ,
221
228
repo : str ,
@@ -230,6 +237,7 @@ def process_issue(
230
237
use_llm : bool = False ,
231
238
provider : str = None ,
232
239
model : str = None ,
240
+ rag_docs : tuple [str ] = None ,
233
241
):
234
242
"""Run processes based on issue label.
235
243
@@ -281,6 +289,7 @@ def process_issue(
281
289
ctx .params ["prompt" ] = issue [BODY ]
282
290
ctx .params ["provider" ] = provider
283
291
ctx .params ["model" ] = model
292
+ ctx .params ["docs" ] = rag_docs
284
293
response = extract_commands (execute .invoke (ctx ))
285
294
KGCL_COMMANDS = [
286
295
command .replace ('"' , "'" ) for command in ast .literal_eval (response )
@@ -293,8 +302,8 @@ def process_issue(
293
302
click .echo (f"{ issue [TITLE ]} does not need ontobot's attention." )
294
303
else :
295
304
click .echo (
296
- f""" { issue [TITLE ]} does not need ontobot's
297
- attention unless `--use-llm` flag is True."" "
305
+ f"{ issue [TITLE ]} does not need ontobot's"
306
+ " attention unless `--use-llm` flag is True."
298
307
)
299
308
300
309
new_output = output if output else input
0 commit comments