Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
luca3m committed Nov 22, 2024
1 parent d48148e commit 059f610
Showing 1 changed file with 45 additions and 46 deletions.
91 changes: 45 additions & 46 deletions integuru/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,51 @@
import asyncio
import click

if __name__ == "__main__":

@click.command()
@click.option(
"--model", default="gpt-4o", help="The LLM model to use (default is gpt-4o)"
)
@click.option("--prompt", required=True, help="The prompt for the model")
@click.option(
"--har-path",
default="./network_requests.har",
help="The HAR file path (default is ./network_requests.har)",
)
@click.option(
"--cookie-path",
default="./cookies.json",
help="The cookie file path (default is ./cookies.json)",
)
@click.option(
"--max_steps", default=20, type=int, help="The max_steps (default is 20)"
)
@click.option(
"--input_variables",
multiple=True,
type=(str, str),
help="Input variables in the format key value",
)
@click.option(
"--generate-code",
is_flag=True,
default=False,
help="Whether to generate the full integration code",
)
def cli(
model, prompt, har_path, cookie_path, max_steps, input_variables, generate_code
):
input_vars = dict(input_variables)
asyncio.run(
call_agent(
model,
prompt,
har_path,
cookie_path,
input_variables=input_vars,
max_steps=max_steps,
to_generate_code=generate_code,
)
@click.command()
@click.option(
"--model", default="gpt-4o", help="The LLM model to use (default is gpt-4o)"
)
@click.option("--prompt", required=True, help="The prompt for the model")
@click.option(
"--har-path",
default="./network_requests.har",
help="The HAR file path (default is ./network_requests.har)",
)
@click.option(
"--cookie-path",
default="./cookies.json",
help="The cookie file path (default is ./cookies.json)",
)
@click.option(
"--max_steps", default=20, type=int, help="The max_steps (default is 20)"
)
@click.option(
"--input_variables",
multiple=True,
type=(str, str),
help="Input variables in the format key value",
)
@click.option(
"--generate-code",
is_flag=True,
default=False,
help="Whether to generate the full integration code",
)
def cli(
model, prompt, har_path, cookie_path, max_steps, input_variables, generate_code
):
input_vars = dict(input_variables)
asyncio.run(
call_agent(
model,
prompt,
har_path,
cookie_path,
input_variables=input_vars,
max_steps=max_steps,
to_generate_code=generate_code,
)
)

if __name__ == "__main__":
cli()

0 comments on commit 059f610

Please sign in to comment.