Skip to main content

Function LLM for Python

function logo

Dynamic JSON Badge X (formerly Twitter) Follow

Use local LLMs in your Python apps, with GPU acceleration and zero dependencies. This package is designed to patch OpenAI and Anthropic clients for running inference locally, using predictors hosted on Function.

Installing Function LLM

Function is distributed on PyPi. To install, open a terminal and run the following command:

# Install Function LLM
$ pip install --upgrade fxn-llm

Using the OpenAI Client Locally

To run text generation and embedding models locally using the OpenAI client, patch your OpenAI instance with the locally function:

from openai import OpenAI
from fxn_llm import locally

# 💥 Create your OpenAI client
openai = OpenAI()

# 🔥 Make it local
openai = locally(openai)

# 🚀 Generate embeddings
embeddings = openai.embeddings.create(
    model="@nomic/nomic-embed-text-v1.5-quant",
    input="search_query: Hello world!"
)

Function is a product of NatML Inc.

Metadata

Release files for fxn-llm 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fxn-llm 0.0.2
File Size Uploaded Provenance Actions
fxn_llm-0.0.2.tar.gz 12.7 kB Without provenance Details for fxn_llm-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fxn-llm 0.0.2
File Interpreter ABI Platform Actions
fxn_llm-0.0.2-py3-none-any.whl Python 3 none any Details for fxn_llm-0.0.2-py3-none-any.whl

Total release size: 24.9 kB

Release files / fxn_llm-0.0.2.tar.gz

Download URL fxn_llm-0.0.2.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1aff66fe419bc695531948f57928672775bb9c803983e0c77aee77bd2fa1e34c
BLAKE2b-256 checksum
How to use checksums
fef0e69fa36f1391fdf98804403352a8e48b17cbc52fe8e443d5058cf0e4b1fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.8

Release files / fxn_llm-0.0.2-py3-none-any.whl

Download URL fxn_llm-0.0.2-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0987ab56908e0746d1c563ac6e8f68334600de7dca693fd140b833283249247e
BLAKE2b-256 checksum
How to use checksums
efb24c803129cdeb6f22f79a73abc5f047fa0b1676e75100bfce6adceeb59194
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.8

Security for fxn-llm 0.0.2

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.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page