{"id":15515801,"url":"https://github.com/citiususc/smarty-gpt","last_synced_at":"2025-04-09T21:23:29.557Z","repository":{"id":142759814,"uuid":"610856043","full_name":"citiususc/Smarty-GPT","owner":"citiususc","description":"A wrapper of LLMs that biases its behaviour using prompts and contexts in a transparent manner to the end-users","archived":false,"fork":false,"pushed_at":"2023-04-01T21:37:48.000Z","size":120,"stargazers_count":141,"open_issues_count":1,"forks_count":21,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-02T19:05:46.350Z","etag":null,"topics":["awesome-chatgpt-prompts","chatgpt","gpt","gpt-3","gpt-35-turbo","gpt-4","language-model","prompt-engineering","prompts","python","t5","wrapper"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/citiususc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-03-07T16:07:44.000Z","updated_at":"2025-03-20T04:39:38.000Z","dependencies_parsed_at":"2024-01-11T20:43:29.262Z","dependency_job_id":"75cc06f6-cc6e-4c6a-a271-43ea2326c4e5","html_url":"https://github.com/citiususc/Smarty-GPT","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citiususc%2FSmarty-GPT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citiususc%2FSmarty-GPT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citiususc%2FSmarty-GPT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citiususc%2FSmarty-GPT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/citiususc","download_url":"https://codeload.github.com/citiususc/Smarty-GPT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248113134,"owners_count":21049788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["awesome-chatgpt-prompts","chatgpt","gpt","gpt-3","gpt-35-turbo","gpt-4","language-model","prompt-engineering","prompts","python","t5","wrapper"],"created_at":"2024-10-02T10:04:25.133Z","updated_at":"2025-04-09T21:23:29.513Z","avatar_url":"https://github.com/citiususc.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook"],"sub_categories":[],"readme":"# Smarty-GPT\n## A wrapper of LLMs (chatgpt, gpt4, etc.) that biases its behaviour using prompts\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pepy.tech/project/smarty-gpt/\"\u003e\u003cimg alt=\"Downloads\" src=\"https://img.shields.io/badge/dynamic/json?style=flat-square\u0026maxAge=3600\u0026label=downloads\u0026query=$.total_downloads\u0026url=https://api.pepy.tech/api/projects/smarty-gpt\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pypi.python.org/pypi/smarty-gpt/\"\u003e\u003cimg alt=\"PyPi\" src=\"https://img.shields.io/pypi/v/smarty-gpt.svg?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nA wrapper of LLMs that biases its behaviour using prompts and contexts in a **transparent** manner to the end-users.\n\n## Installation \n\n```bash\nsh install.sh\n```\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/citiususc/Smarty-GPT/HEAD?labpath=Demo.ipynb) [![Google Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/citiususc/Smarty-GPT/blob/master/Demo.ipynb) [![GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true\u0026ref=main\u0026repo=citiususc/Smarty-GPT\u0026machine=basicLinux32gb\u0026location=WestEurope)\n\n\n## Models\n\n- **text-davinci-003**\n- [**Flan-T5**](https://huggingface.co/google/flan-t5-small) powered by Google.\n- **ChatGPT** and **GPT4** through paid API.\n\n## Contexts / Prompts\n\nWe support three type of prompts from the moment:\n\n- **Manual prompts**: these prompts are hard-coded and were the first included in this project.\n- [**Awesome Chat GPT prompts**](https://github.com/f/awesome-chatgpt-prompts): our system also supports this huge HF dataset in a transparent manner.\n- **Custom prompts**: any user can add custom prompts through a file.\n- (In progress) Support for [**awesome-gpt4**](https://github.com/radi-cho/awesome-gpt4) prompts.\n\n\n## Authentication\n\nUsers should create a *config.txt* file like the following to read Open AI bearer:\n\n```txt\n[auth]\napi_key = xxxxxxxxxxxxxxxxxx\n```\n\n## Coding examples\n\n```python\nfrom smartygpt import SmartyGPT, Models\nif __name__==\"__main__\":\n    s = SmartyGPT(prompt=\"DoctorAdvice\", config_file=\"/home/user/config.txt\") \n    result = s.wrapper(\"Can Vitamin D cure COVID-19?\")\n    print(result)\n```\n\n\nCheck the [**Colab**](https://colab.research.google.com/github/citiususc/Smarty-GPT/blob/master/Demo.ipynb) or test folder for more examples and functionalities\n\n## Philosophy\n\nThe main purpose of this project is **joining** in a single environment all the resources (models, prompts, APIs, etc.) related to LLMs. \n\nMoreover, 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.\n\n## In progress\n\nMore features/models are about to come! Feel free to make a PR, open an issue or to contact me at marcosfernandez.pichel@usc.es\n\n## Disclaimer \n\nThe 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitiususc%2Fsmarty-gpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcitiususc%2Fsmarty-gpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitiususc%2Fsmarty-gpt/lists"}