https://github.com/citiususc/Smarty-GPT
A wrapper of LLMs that biases its behaviour using prompts and contexts in a transparent manner to the end-users
https://github.com/citiususc/Smarty-GPT
awesome-chatgpt-prompts chatgpt gpt gpt-3 gpt-35-turbo gpt-4 language-model prompt-engineering prompts python t5 wrapper
Last synced: 29 days ago
JSON representation
A wrapper of LLMs that biases its behaviour using prompts and contexts in a transparent manner to the end-users
- Host: GitHub
- URL: https://github.com/citiususc/Smarty-GPT
- Owner: citiususc
- License: gpl-3.0
- Created: 2023-03-07T16:07:44.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-01T21:37:48.000Z (about 2 years ago)
- Last Synced: 2025-03-09T13:19:53.631Z (about 1 month ago)
- Topics: awesome-chatgpt-prompts, chatgpt, gpt, gpt-3, gpt-35-turbo, gpt-4, language-model, prompt-engineering, prompts, python, t5, wrapper
- Language: Jupyter Notebook
- Homepage:
- Size: 117 KB
- Stars: 141
- Watchers: 6
- Forks: 21
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- project-awesome - citiususc/Smarty-GPT - A wrapper of LLMs that biases its behaviour using prompts and contexts in a transparent manner to the end-users (Jupyter Notebook)
- awesome-gpt4 - Smarty GPT - a wrapper of prompts and contexts that supports several models, including GPT4. (Tools / Open-source projects)
- awesome-gpt4-zh-CN - Smarty GPT - 支持多个模型(包括GPT4)的提示和上下文包装器。 (提示- [会议安排](https://github.com/stephanj/Scheduling-using-GPT4) 使用GPT-4。 / 开源项目)
README
# Smarty-GPT
## A wrapper of LLMs (chatgpt, gpt4, etc.) that biases its behaviour using promptsA wrapper of LLMs that biases its behaviour using prompts and contexts in a **transparent** manner to the end-users.
## Installation
```bash
sh install.sh
```[](https://mybinder.org/v2/gh/citiususc/Smarty-GPT/HEAD?labpath=Demo.ipynb) [](https://colab.research.google.com/github/citiususc/Smarty-GPT/blob/master/Demo.ipynb) [](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=citiususc/Smarty-GPT&machine=basicLinux32gb&location=WestEurope)
## Models
- **text-davinci-003**
- [**Flan-T5**](https://huggingface.co/google/flan-t5-small) powered by Google.
- **ChatGPT** and **GPT4** through paid API.## Contexts / Prompts
We support three type of prompts from the moment:
- **Manual prompts**: these prompts are hard-coded and were the first included in this project.
- [**Awesome Chat GPT prompts**](https://github.com/f/awesome-chatgpt-prompts): our system also supports this huge HF dataset in a transparent manner.
- **Custom prompts**: any user can add custom prompts through a file.
- (In progress) Support for [**awesome-gpt4**](https://github.com/radi-cho/awesome-gpt4) prompts.## Authentication
Users should create a *config.txt* file like the following to read Open AI bearer:
```txt
[auth]
api_key = xxxxxxxxxxxxxxxxxx
```## Coding examples
```python
from smartygpt import SmartyGPT, Models
if __name__=="__main__":
s = SmartyGPT(prompt="DoctorAdvice", config_file="/home/user/config.txt")
result = s.wrapper("Can Vitamin D cure COVID-19?")
print(result)
```Check the [**Colab**](https://colab.research.google.com/github/citiususc/Smarty-GPT/blob/master/Demo.ipynb) or test folder for more examples and functionalities
## Philosophy
The main purpose of this project is **joining** in a single environment all the resources (models, prompts, APIs, etc.) related to LLMs.
Moreover, we also think from an **end-user** perspective. It is heavily unlikely that a user would introduce a complex context in a query to bias a model response. This library tries to solve this hidding the implementation details to end-users.
## In progress
More features/models are about to come! Feel free to make a PR, open an issue or to contact me at [email protected]
## Disclaimer
The software is provided "as is" and "with all faults" without warranties of any kind, either express or implied, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose and non-infringement. No warranty is provided that the software will be free from defects or that operation of the software will be uninterrupted. Your use of the software and any other material or services downloaded or made available to you through the software is at your own discretion and risk, and you are solely responsible for any potential damage resulting from their use.