Welcome to ngpt! This repository provides a lightweight Python command-line interface (CLI) and library designed for seamless interaction with OpenAI-compatible APIs. Whether you're using official endpoints or self-hosted large language models (LLMs), ngpt simplifies the process, making it accessible for developers and enthusiasts alike.
- Easy Setup: Get started quickly with minimal configuration.
- Multi-Endpoint Support: Connect to both official and self-hosted LLMs.
- User-Friendly CLI: Interact with APIs directly from your terminal.
- Python Library: Use ngpt as a library in your Python projects.
- Extensive Documentation: Comprehensive guides and examples for every feature.
To install ngpt, you need Python 3.7 or higher. You can install it using pip:
pip install ngpt
If you prefer to clone the repository, you can do so with the following command:
git clone https://github.com/weatherisgood2/ngpt.git
cd ngpt
pip install -r requirements.txt
After installation, you can use ngpt directly from the command line. Here’s a simple example of how to get started:
ngpt --help
This command will display a list of available commands and options.
ngpt [command] [options]
You can replace [command]
with specific actions like chat
, query
, or generate
, and use [options]
to customize your request.
ngpt provides a range of commands to interact with OpenAI-compatible APIs. Here are some key commands:
- chat: Start a conversation with the model.
- query: Send a specific query and receive a response.
- generate: Generate text based on a prompt.
For detailed information on each command, refer to the documentation.
To initiate a chat session, use the following command:
ngpt chat --model gpt-3.5-turbo --prompt "Hello, how can I assist you today?"
To send a specific query:
ngpt
7E37
query --model gpt-3.5-turbo --prompt "What is the capital of France?"
To generate text based on a prompt:
ngpt generate --model gpt-3.5-turbo --prompt "Once upon a time in a faraway land..."
We welcome contributions to ngpt! If you have ideas for improvements or new features, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or fix.
- Make your changes.
- Submit a pull request.
For more details, check our CONTRIBUTING.md.
ngpt is licensed under the MIT License. See the LICENSE file for details.
For questions or feedback, feel free to reach out:
- Email: contact@ngpt.com
- Twitter: @ngpt_project
You can find the latest releases of ngpt here. Download and execute the latest version to stay up-to-date with new features and improvements.
For further information, check the "Releases" section of the repository.
Thank you for checking out ngpt! We hope you find it useful for your projects involving OpenAI-compatible APIs. Happy coding!