Giter VIP home page Giter VIP logo

smarty-gpt's Introduction

Smarty-GPT

A wrapper of LLMs (chatgpt, gpt4, etc.) that biases its behaviour using prompts

Downloads PyPi

A wrapper of LLMs that biases its behaviour using prompts and contexts in a transparent manner to the end-users.

Installation

sh install.sh

Binder Google Colab GitHub Codespaces

Models

  • text-davinci-003
  • Flan-T5 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: 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 prompts.

Authentication

Users should create a config.txt file like the following to read Open AI bearer:

[auth]
api_key = xxxxxxxxxxxxxxxxxx

Coding examples

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 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.

smarty-gpt's People

Contributors

marcosfp97 avatar lorenzovaquero avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.