Skip to content

Commit

Permalink
Added option to provide RAG docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hrshdhgd committed Sep 6, 2024
1 parent 2100409 commit 9071045
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ python = ">=3.9,<4.0.0"
oaklib = ">=0.5.0"
PyGithub = "^2.3.0"
setuptools = ">=70.1.1"
llm-change-agent = {version = "^0.0.7", extras = ["llm"], optional = true}
llm-change-agent = {version = "^0.0.8", extras = ["llm"], optional = true}


[tool.poetry.group.dev.dependencies]
Expand Down
11 changes: 9 additions & 2 deletions src/ontobot_change_agent/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,12 @@ def main(verbose: int, quiet: bool):
llm_model_option = click.option(
"--model", type=click.Choice(ALL_AVAILABLE_MODELS), help="Model to use for generation."
)


rag_docs_option = click.option(
"--rag-docs",
multiple=True,
default=[],
help=f"Paths to the docs directories, URLs, or lowercased ontology names.",
)
@main.command()
@repo_option
@state_option
Expand Down Expand Up @@ -216,6 +220,7 @@ def get_labels(repo: str, token: str):
@use_llm_option
@llm_provider_option
@llm_model_option
@rag_docs_option
def process_issue(
input: str,
repo: str,
Expand All @@ -230,6 +235,7 @@ def process_issue(
use_llm: bool = False,
provider: str = None,
model: str = None,
rag_docs: tuple[str] = None,
):
"""Run processes based on issue label.
Expand Down Expand Up @@ -281,6 +287,7 @@ def process_issue(
ctx.params["prompt"] = issue[BODY]
ctx.params["provider"] = provider
ctx.params["model"] = model
ctx.params["docs"] = rag_docs
response = extract_commands(execute.invoke(ctx))
KGCL_COMMANDS = [
command.replace('"', "'") for command in ast.literal_eval(response)
Expand Down

0 comments on commit 9071045

Please sign in to comment.