Skip to content

Commit c49c1c6

Browse files
authored
Merge pull request #96 from INCATools/rag-docs
Rag docs
2 parents 2100409 + 23c2e68 commit c49c1c6

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

poetry.lock

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ python = ">=3.9,<4.0.0"
1313
oaklib = ">=0.5.0"
1414
PyGithub = "^2.3.0"
1515
setuptools = ">=70.1.1"
16-
llm-change-agent = {version = "^0.0.7", extras = ["llm"], optional = true}
16+
llm-change-agent = {version = "^0.0.9", extras = ["llm"], optional = true}
1717

1818

1919
[tool.poetry.group.dev.dependencies]

src/ontobot_change_agent/cli.py

+11-2
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ def main(verbose: int, quiet: bool):
149149
llm_model_option = click.option(
150150
"--model", type=click.Choice(ALL_AVAILABLE_MODELS), help="Model to use for generation."
151151
)
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+
)
152158

153159

154160
@main.command()
@@ -216,6 +222,7 @@ def get_labels(repo: str, token: str):
216222
@use_llm_option
217223
@llm_provider_option
218224
@llm_model_option
225+
@rag_docs_option
219226
def process_issue(
220227
input: str,
221228
repo: str,
@@ -230,6 +237,7 @@ def process_issue(
230237
use_llm: bool = False,
231238
provider: str = None,
232239
model: str = None,
240+
rag_docs: tuple[str] = None,
233241
):
234242
"""Run processes based on issue label.
235243
@@ -281,6 +289,7 @@ def process_issue(
281289
ctx.params["prompt"] = issue[BODY]
282290
ctx.params["provider"] = provider
283291
ctx.params["model"] = model
292+
ctx.params["docs"] = rag_docs
284293
response = extract_commands(execute.invoke(ctx))
285294
KGCL_COMMANDS = [
286295
command.replace('"', "'") for command in ast.literal_eval(response)
@@ -293,8 +302,8 @@ def process_issue(
293302
click.echo(f"{issue[TITLE]} does not need ontobot's attention.")
294303
else:
295304
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."
298307
)
299308

300309
new_output = output if output else input

0 commit comments

Comments
 (0)