-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a CLI for using potpie locally #224
Comments
/bounty 10 |
💎 $10 bounty • potpie.aiSteps to solve:
Thank you for contributing to potpie-ai/potpie! Add a bounty • Share on socials
|
/attempt #224 Options |
/attempt #224 Hey I am solving this issue but I will project structure refactoring, @dhirenmathur will go to need your help to improve Options |
@DeepeshKalura go for it! Please share a plan before implementing! Thank you for your contribution! |
@dhirenmathur Yeah, I was going to tell you that. So, Currently, I see that we manage the server startup with Let's start the I will use click to create CLI as it pre-install the package with fastAPI. And super easy to use. ( If you want i don't mind using a more traditional So, If I see this PR and just focus that thing in mind then. I will add the click code on the server code. For example, would be. in app > main.py. def start_server():
uvicorn.run(app, host="0.0.0.0", port=8034,)
def stop_server():
pass
@click.group()
def cli():
pass
@cli.command()
def start():
start_server()
@cli.command()
def stop():
stop_server()
if __name__ == "__main__":
cli() Just add these lines on the end. Yes all of these will work, Similarly then I will create singletion instance of cli and pass where I need from the serve code as the reference and make a wrapper similar code with cli. I think it work for small projects. ( Yeah I know it destroys the separate of concern case here ) but it will work. Key points will 1. Single Instance of CLI and use the server ( fastapi ) wrapper around the CLI if needed. I think you will avoid such code. I will also avoid it. So, I was thinking to create a separate CLI logic that will be the same but it will separate instance. More like one file or folder. Maybe I am in right directions of thinking. |
Would like to give it a try as I have worked on CLI's before... |
/attempt #224 |
Hey @Savio629 I think @DeepeshKalura is already working on this issue. |
Hey @DeepeshKalura . Using click is good. Please DM me on discord if you're still working on this, I would like to understand your proposal better. |
@dhirenmathur yes I am working on this can, Ok joining discord |
Create Development CLI for Local PotPie Usage
Objective
Create a command-line interface for local development interactions with PotPie.
Commands
0. init
and
commands to turn on and off the server.
1. parse
2. chat
Requirements
Success Criteria
The text was updated successfully, but these errors were encountered: