Skip to main content

Langchain LLM API

A Langchain compatible implementation which enables the integration with LLM-API

The main reason for implementing this package is to be able to use Langchain with any model run locally.

Usage

You can install this as a python library using the command (until it's integrated with langchain itself)

pip install langchain-llm-api

To use this langchain implementation with the LLM-API:

from langchain_llm_api import LLMAPI, APIEmbeddings

llm = LLMAPI(
    params={"temp": 0.2},
    verbose=True
)

llm("What is the capital of France?")

Or with streaming:

from langchain_llm_api import LLMAPI, APIEmbeddings
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler

llm = LLMAPI(
    params={"temp": 0.2},
    verbose=True,
    streaming=True,
    callback_manager=CallbackManager([StreamingStdOutCallbackHandler()])
)

llm("What is the capital of France?")

Check LLM-API for the possible models and thier params

Embeddings

to use the embeddings endpoint:

emb = APIEmbeddings(
    host_name="your api host name",
    params = {"n_predict": 300, "temp": 0.2, ...}
)

Metadata

Release files for langchain-llm-api 0.0.1

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

Source distribution (sdist)

Source distribution for langchain-llm-api 0.0.1
File Size Uploaded Provenance
langchain_llm_api-0.0.1.tar.gz 3.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-llm-api 0.0.1
File Interpreter ABI Platform
langchain_llm_api-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.2 kB

Release files / langchain_llm_api-0.0.1.tar.gz

Download URL langchain_llm_api-0.0.1.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
14fcb392805691022ab4274189515866bf1bb9fc58eb90803a468ea31f799015
BLAKE2b-256 checksum
How to use checksums
b4ddd45b26379aa1fba996064071a31adeb2393e50f2f74d5e82817d34659e32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.8.16 Linux/5.15.0-1035-azure

Release files / langchain_llm_api-0.0.1-py3-none-any.whl

Download URL langchain_llm_api-0.0.1-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb46a951251b448429db98ece1f6cf609103a11e38dd8d73c000244a0485462d
BLAKE2b-256 checksum
How to use checksums
6bcd79526ec075e366576f87d397e1cf636da88a7dc03e026e6bed21ad72d004
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.8.16 Linux/5.15.0-1035-azure

Security for langchain-llm-api 0.0.1

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