Skip to content
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

[docs] add some guidelines for bash scripting #23

Closed
signebedi opened this issue Mar 27, 2023 · 0 comments
Closed

[docs] add some guidelines for bash scripting #23

signebedi opened this issue Mar 27, 2023 · 0 comments

Comments

@signebedi
Copy link
Owner

signebedi commented Mar 27, 2023

There area couple ways to script the CLI using bash. For example, you can automate the process of sending multiple questions to the gptty query command using a bash script. This can be particularly useful if you have a list of questions stored in a file, and you want to process them all at once. For example, let's say you have a file questions.txt with each question on a new line, like below.

What are the key differences between machine learning, deep learning, and artificial intelligence?
How do I choose the best programming language for a specific project or task?
Can you recommend some best practices for code optimization and performance improvement?
What are the essential principles of good software design and architecture?
How do I get started with natural language processing and text analysis in Python?
What are some popular Python libraries or frameworks for building web applications?
Can you suggest some resources to learn about data visualization and its implementation in Python?
What are some important concepts in cybersecurity, and how can I apply them to my projects?
How do I ensure that my machine learning models are fair, ethical, and unbiased?
Can you recommend strategies for staying up-to-date with the latest trends and advancements in technology and programming?

You can send each question from the questions.txt file to the gptty query command using the following bash one-liner:

xargs -d '\n' -I {} gptty query --question "{}" < questions.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant