LangFn (Python)
Comprehensive AI Development SDK for LLM-based workflows.
Features
- Model Abstraction: Unified interface for OpenAI, Anthropic, Ollama, and more.
- Orchestration: Sequential, Parallel, and Map-Reduce chains.
- Graph Workflows: Stateful workflows with
StateGraph. - Agents: Functional
ToolAgentandReActAgent. - Structured Output: Type-safe output parsing with Pydantic.
- RAG: Embeddings and Vector Store support.
- Observability: Built-in tracing with
watchfnintegration.
Usage
from langfn import LangFn
from langfn.models.openai import OpenAIChatModel
lang = LangFn(
model=OpenAIChatModel(api_key="your-api-key")
)
response = await lang.complete("Hello world")
print(response.content)
Documentation
See the main documentation for more details.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
langfn-0.0.1.tar.gz
(28.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
langfn-0.0.1-py3-none-any.whl
(45.8 kB
view details)
File details
Details for the file langfn-0.0.1.tar.gz.
File metadata
- Download URL: langfn-0.0.1.tar.gz
- Upload date:
- Size: 28.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d07db20d319cd99702fa2d356cfee38f6c40f2580961d3aad4df5877d80062b7
|
|
| MD5 |
491467695dcd199cc1ebcaf7ead3d933
|
|
| BLAKE2b-256 |
83dc9a3d740fdbde987fe042d16ddb4ee5e5b1d42ce824928d5d4310a585d72d
|
File details
Details for the file langfn-0.0.1-py3-none-any.whl.
File metadata
- Download URL: langfn-0.0.1-py3-none-any.whl
- Upload date:
- Size: 45.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a079d1db7844508f76fdd6bcc93ff0abd4f9c7876746c3f1c24a1325e2b359c6
|
|
| MD5 |
1dabaa61e4c7c6a218bfa484457d9b08
|
|
| BLAKE2b-256 |
8ca8c0b513a98b3fb8e243b2222a307e2163f607b2e6a806b248a5ef517c04e6
|