Portability lib for OpenAI, Hugging Face, and FastChat local model APIs
This library was written for examples in a book I wrote
You can read my book free online or can be purchased:
Safe For Humans AI - A "humans-first" approach to designing and building AI systems
Supported APIs
- get_completion(prompt, max_tokens=64)
- create_local_embeddings_files_in_dir(path_to_document_files_dir)
- query_local_embeddings(query)
These APIs are implemented separately in two Python classes:
- OpenAiWrapper
- HuggingFaceAiWrapper
Supported APIs and Models
Currently this compatibiolity library only works with selected OpenAI APIs and the small Hugging Face model facebook/opt-iml-1.3b that can be run locally on a laptop with no GPU and only 8G of RAM.
Run the example programs:
python test_completion_openai.py
python test_local_index_openai.py
python test_completion_hf.py
python test_local_index_hf.py
Metadata
Release files for llmlib 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llmlib-0.2.0.tar.gz | 8.0 kB | Without provenance | Details for llmlib-0.2.0.tar.gz |
Release files / llmlib-0.2.0.tar.gz
| Download URL | llmlib-0.2.0.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc37367129c48bdd74f29e7f65718602d5aaf045e68fc4273ab5513ff7ff1af6
|
|
BLAKE2b-256 checksum How to use checksums |
5c5ce2d33371d62c9d884d7b9c4249baf2b07c3522774df8d9fd9ab5db7846de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.8
|
Security for llmlib 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.