• Stars
    star
    142
  • Rank 258,495 (Top 6 %)
  • Language
    Jupyter Notebook
  • License
    GNU General Publi...
  • Created almost 2 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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.

More Repositories

1

hipster

Hipster4j is a lightweight and powerful heuristic search library for Java and Android. It contains common, fully customizable algorithms such as Dijkstra, A* (A-Star), DFS, BFS, Bellman-Ford and more.
Java
323
star
2

calendula

An Android assistant for personal medication management
Java
199
star
3

veryfasttree

Efficient phylogenetic tree inference for massive taxonomic datasets
C++
89
star
4

SparkBWA

SparkBWA is a new tool that exploits the capabilities of a Big Data technology as Apache Spark to boost the performance of one of the most widely adopted sequence aligner, the Burrows-Wheeler Aligner (BWA).
C
69
star
5

Linguakit

Multilingual toolkit for NLP: dependency parser, PoS tagger, NERC, multiword extractor, sentiment analysis, etc.
Perl
64
star
6

construe

An abductive framework for the interpretation of time series, with special application to ECG data.
Python
55
star
7

BigSeqKit

BigSeqKit: a parallel Big Data toolkit to process FASTA and FASTQ files at scale
Go
46
star
8

jflap-lib

An improved version of JFLAP 7.0 to be used as a library as well as a command line tool.
Java
44
star
9

pyplexity

Cleaning tool for web scraped text
Python
39
star
10

BigBWA

BigBWA is a new tool that uses the Big Data technology Hadoop to boost the performance of the Burrows–Wheeler aligner (BWA).
C
30
star
11

stac

Statistical Tests for Algorithms Comparison (STAC) is a new platform for statistical analysis to verify the results obtained from computational intelligence algorithms.
JavaScript
28
star
12

citius-invaders

An old-style HTML5 arcade game for teaching genetic algorithms to kids, made with PhaserJS
JavaScript
25
star
13

voila

Variational Inference for Langevin Equations
R
19
star
14

servando

An open distributed telemedicine platform
Java
19
star
15

SimpleNLG-ES

SimpleNLG-ES is a Java API for Natural Language Generation in Spanish. It is a bilingual English/Spanish adaptation of the SimpleNLG v4.4.8 library, following the structure used in SimpleNLG-EnFr.
Java
16
star
16

composit

Semantic Web Service Composition Engine
Java
12
star
17

DepPattern

Dependency syntactic parser and formal grammar for Natural Languages
Perl
12
star
18

qrsdel

A noise robust QRS delineation algorithm
Python
11
star
19

pastaspark

PASTASpark is an extension to PASTA (Practical Alignments using SATé and TrAnsitivity) that allows to execute it on a distributed memory cluster making use of Apache Spark.
Python
10
star
20

perldoop

Efficient Execution of Perl Scripts on Hadoop Clusters
Java
10
star
21

VERY-NEG-and-VERY-POS-Lexicons

Two lexicons for extreme words
7
star
22

frog

Java library for building Fuzzy Rule Bases
Java
5
star
23

SPLM-Lexicon

5
star
24

servando-core

Servando core modules and data model
Java
4
star
25

calendula-backend

Calendula app backend server
JavaScript
4
star
26

olivia

A Developer-Friendly Lidar Visualizer with 3D Stereo
Java
4
star
27

SimpleNLG-GL

SimpleNLG-GL is a Java API for Natural Language Generation in Galician language. It is a trilingual English/Spanish/Galician adaptation of the SimpleNLG v4.4.8 library, following the structure used in SimpleNLG-EnFr.
Java
4
star
28

fracdet

An R package for the simultaneous estimation of deterministic and fractal components in non-stationary time series
R
3
star
29

explorador-diacronico

Herramienta para observar el cambio de significado en las palabras a lo largo del tiempo. Puede ver más información en: http://tec.citius.usc.es/explorador-diacronico/ o en: http://explorador-diacronico.readthedocs.io/es/latest/
JavaScript
3
star
30

onto-evol-llm

Evaluation of ontology evolution with LLMs
Python
2
star
31

composit-iserve

ComposIT / iServe bindings for integration
Java
2
star
32

ho-mnist

Hardware Oriented CNN for MNIST recognition
Jupyter Notebook
2
star
33

jsonschema2shacl

A Python program that creates SHACL shapes from JSON Schema
Python
2
star
34

poster-svg-template

CiTIUS Poster template (non-official) in SVG format
1
star
35

lastpminer

LA-STPminer algorithm
Java
1
star
36

docker-citius-notebook

Dockerized version of ipython notebook for CiTIUS
Python
1
star
37

polypus

Polypus: a Big Data Self-Deployable Architecture for Microblogging Text Extraction and Real-Time Sentiment Analysis
1
star
38

GPTCopyCheck

Software to test if our books, papers, or whatever online document has been ingested by OpenAI model
Python
1
star