swarmauri_llm_falai
swarmauri_llm_falai
Provider-specific Swarmauri import package for fal.ai queue-backed vision-language inference, OCR, image captioning, and visual question answering.
Overview · Installation · Quick Start · Usage · API · Contributing · Governance · License
Overview
Summary
swarmauri_llm_falai provides the provider-specific FalAIVisionModel
import for Swarmauri projects that call fal.ai vision and image-understanding
models. The adapter accepts an image URL plus a prompt, submits the request to
fal's queue-backed inference API, polls for completion, and returns the model
output string.
This package preserves the legacy LLM-package import path for fal.ai vision
workloads while keeping implementation parity with
swarmauri_standard.llms.FalAIVisionModel. New VLM-oriented code should also
review the newer Swarmauri VLM imports mentioned by the runtime deprecation
warning.
fal.ai's public documentation describes queue-backed inference under
https://queue.fal.run/{model_id}, including request submission, status polling,
and response retrieval. That maps directly to this adapter's predict and
apredict workflows.
Why This Package
- Keep fal.ai-specific vision model dependencies isolated from the rest of a Swarmauri application.
- Ask questions about remote images with Swarmauri-style model components.
- Use fal's queue-backed inference lifecycle without writing queue polling logic in application code.
- Preserve compatibility for projects that still import
FalAIVisionModelfrom the LLM provider package.
When to Use
Choose swarmauri_llm_falai when your integration needs provider-specific Swarmauri import package for fal.ai queue-backed vision-language inference, OCR, image captioning, and visual question answering. Match the imports below to your application boundary and install its declared dependencies before using the example.
Features
- Provider-specific
FalAIVisionModelimport for Swarmauri projects. - Vision-language prediction with
image_urlandpromptinputs. - Queue-backed request submission and status polling through fal.ai.
- Synchronous prediction through
predict. - Asynchronous prediction through
apredict. - Configurable queue polling with
max_retriesandretry_delay. - Built-in model allow list covering OCR, LLaVA, Florence, Moondream, MiniCPM, SA2VA, and related fal.ai vision endpoints.
- Compatibility with Python 3.10, 3.11, 3.12, 3.13, and 3.14.
Non-Goals
swarmauri_llm_falai owns provider-specific Swarmauri import package for fal.ai queue-backed vision-language inference, OCR, image captioning, and visual question answering. Its imports do not by themselves configure credentials, deploy a service, or certify the behavior of its consumers. Dependencies and neighboring packages retain their own documented responsibilities.
Getting Started
Prerequisites
Create a fal.ai API key and provide it as FalAIVisionModel(api_key=...) or set
FAL_KEY in the runtime environment.
Installation
uv add swarmauri_llm_falai
pip install swarmauri_llm_falai
uv
uv add swarmauri_llm_falai
pip
python -m pip install swarmauri_llm_falai
Poetry
poetry add swarmauri_llm_falai
Quick Start
Example
Source: docs/readme/quick_start.py.
from swarmauri_llm_falai import FalAIVisionModel
model = FalAIVisionModel(api_key="FAL_KEY")
answer = model.predict(
image_url="https://llava-vl.github.io/static/images/monalisa.jpg",
prompt="Who painted this artwork?",
)
print(answer)
Expected Result
The example demonstrates the documented swarmauri_llm_falai source boundary or workflow. Complete its required configuration first. README CI checks the maintained source’s syntax and declarations; it does not claim that external services or the application workflow were exercised.
Usage
Common Workflows
Source: docs/readme/usage.py.
from swarmauri_llm_falai import FalAIVisionModel
model = FalAIVisionModel(api_key="FAL_KEY")
answer = model.predict(
image_url="https://llava-vl.github.io/static/images/monalisa.jpg",
prompt="Who painted this artwork?",
)
print(answer)
Async Vision Question Answering
import asyncio
from swarmauri_llm_falai import FalAIVisionModel
async def main() -> None:
model = FalAIVisionModel(api_key="FAL_KEY")
answer = await model.apredict(
image_url="https://llava-vl.github.io/static/images/monalisa.jpg",
prompt="Describe the subject of the painting.",
)
print(answer)
asyncio.run(main())
Choose A fal.ai Vision Model
from swarmauri_llm_falai import FalAIVisionModel
model = FalAIVisionModel(api_key="FAL_KEY", name="fal-ai/florence-2-large/ocr")
text = model.predict(
image_url="https://example.com/document-scan.png",
prompt="Extract the visible text.",
)
print(text)
Configuration
Configure swarmauri_llm_falai through the APIs in package source; its manifest describes installation requirements, not an implicit service configuration. No additional package-global configuration contract is inferred from dependencies.
Error Handling
The inspected swarmauri_llm_falai source raises RuntimeError, TimeoutError. Handle these at the calling boundary and consult the implementation for the triggering conditions.
Best Practices
- Store fal.ai credentials in environment variables or a secrets manager.
- Use image URLs that are reachable by the fal.ai runtime.
- Tune
max_retriesandretry_delayfor long-running queue-backed models. - Prefer newer Swarmauri VLM imports for new projects when available.
Package Boundary
What It Owns
swarmauri_llm_falai is located in community and owns provider-specific Swarmauri import package for fal.ai queue-backed vision-language inference, OCR, image captioning, and visual question answering. Source-declared APIs include FalAIVisionModel, FalVLM. The manifest records its direct dependency boundary.
Public API and Import Surfaces
Import namespace: swarmauri_llm_falai.
Source-declared exports or types: FalAIVisionModel, FalVLM.
Inspect package source for exact signatures; this inventory does not designate every internal module as stable.
Entry Points
swarmauri.llms→FalAIVisionModel→swarmauri_llm_falai.FalAIVisionModel:FalAIVisionModel
Injected Dependencies
The direct installation dependencies of swarmauri_llm_falai are swarmauri-core, swarmauri-base, swarmauri-standard. These declarations do not imply automatic provider selection. Pass collaborators through the explicit constructors or call signatures in package source.
Protocol Consumers
No direct package-manifest dependency on swarmauri_llm_falai was found in the audited three-repository inventory. External consumers may still use its documented imports or commands.
Extensions
For swarmauri_llm_falai, use the source-declared public interfaces (FalAIVisionModel, FalVLM) when composing or extending behavior. Its entry-point section below is authoritative for registered plugins; no additional extension loader is inferred from the package name.
Operations and Readiness
Operational Requirements
Operate swarmauri_llm_falai according to its actual entry points and collaborators. The dependency and Python requirements in the manifest are prerequisites; deployment topology, credentials, and readiness remain the responsibility of the consuming application unless explicitly documented above.
Health and Observability
This README does not establish a standalone health endpoint for swarmauri_llm_falai. Observe the concrete caller’s results, exceptions, and existing test reports. An application that embeds this package must define its own health and telemetry contract.
Security and Resource Limits
Apply the input, credential, and resource constraints implemented in package source. The swarmauri_llm_falai README gate is a documentation check, not a security review or a substitute for the implementation’s limits and caller authorization.
Compatibility
This source version of swarmauri_llm_falai declares Python >=3.10,<3.15. Consult its dependency constraints before upgrading. Source-version and registry-version badges have separate meanings; this migration makes no additional platform or interoperability certification claim.
Verification
Tests
Run python -m pytest tests/unit/test_readme_sources.py from the swarmauri_llm_falai package directory for the maintained example source checks (Python compilation and non-Python file presence). Existing package tests include:
The repository README gate also checks the required heading tree, metadata, managed fragments, and referenced files.
Certification Status
No external certification is asserted for swarmauri_llm_falai by this documentation migration. README conformance, example syntax, runtime tests, and protocol or security certification are distinct evidence scopes.
Evidence
The README standards CI records mechanical documentation results for its tested commit. The package source and example sources support the package-boundary description; external runtime behavior requires its own test evidence.
FAQ
Why
What does swarmauri_llm_falai install?
It installs a provider package that exports FalAIVisionModel from
swarmauri_standard.llms.FalAIVisionModel and registers it under the Swarmauri
LLM entry point group.
Is this a text-only LLM package?
No. The model accepts image_url and prompt arguments and is intended for
vision-language tasks such as OCR, image captioning, visual question answering,
and image moderation workflows supported by fal.ai models.
Which fal.ai endpoint does it use?
The adapter posts to https://queue.fal.run/{model_id}. When fal returns a
request_id, the adapter polls the corresponding request status endpoint until
the request is completed, then fetches the response URL.
Which environment variable can supply credentials?
The model default reads FAL_KEY when api_key is not passed explicitly. The
package tests also support live checks when a fal.ai key is available.
Does this adapter support streaming?
No. stream and astream intentionally raise NotImplementedError for
FalAIVisionModel.
How
How do I start? Install or synchronize the environment under Getting Started, follow the maintained example for swarmauri_llm_falai, and consult package source for the exact types and signatures involved.
When
When should I validate an upgrade? Recheck swarmauri_llm_falai whenever its source version, declared collaborators, configuration, or caller changes. Run relevant behavioral tests in addition to the README gate before promotion.
Documentation and Related Packages
More Documentation
The repository contribution guide, package source, and manifest provide the supporting context for swarmauri_llm_falai. The README policy defines the common document structure.
Related Packages
- swarmauri_llm_deepinfra
- swarmauri_llm_gemini
- swarmauri_llm_openai
- swarmauri_llm_pytesseractimg2text
- swarmauri_llm_whisper
Project Links
Contributing
How to Contribute
Follow the contribution guide and include a focused example or regression for changes to swarmauri_llm_falai. Keep package behavior, its documented boundary, and its tests aligned.
Development Setup
Work from the pkgs/50-community/swarmauri_llm_falai checkout. Synchronize its declared development environment with uv, then run the relevant package tests and python -m pytest tests/unit/test_readme_sources.py. The repository’s dedicated README job installs readme-standards==0.1.3 without resolving unrelated runtime packages.
Notes for Maintainers
Foundational Swarmauri Packages
Provider Documentation
Governance
Ownership and Decision Making
Changes to swarmauri_llm_falai follow the maintainer review process of swarmauri/swarmauri-sdk and its contribution guide. Author attribution remains in the manifest; this README does not assign new publishing or administrative authority.
Standards and Policies
swarmauri_llm_falai follows the versioned package-guide-v1 outline. All fixed headings, hierarchy, order, separators, and package-specific branding are checked by CI; reviewers assess the accuracy and usefulness of authored claims.
Lifecycle and Migration
The swarmauri_llm_falai source version is 0.11.0.
License and Attribution
License
Licensed under Apache-2.0. See LICENSE.
Apache-2.0
Notices
See NOTICE for attribution.
Metadata
Release files for swarmauri_llm_falai 0.11.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 |
|---|---|---|---|---|
| swarmauri_llm_falai-0.11.0.tar.gz | 18.9 kB | Without provenance | Details for swarmauri_llm_falai-0.11.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| swarmauri_llm_falai-0.11.0-py3-none-any.whl | Python 3 | none | any | Details for swarmauri_llm_falai-0.11.0-py3-none-any.whl |
Total release size: 34.1 kB
Release files / swarmauri_llm_falai-0.11.0.tar.gz
| Download URL | swarmauri_llm_falai-0.11.0.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e8e019702707c66d92e5ff4afe166ad6872f6a6f16733d8049094d96d9662802
|
|
BLAKE2b-256 checksum How to use checksums |
414b41131b23e15af5bd2a7bb9c1da578e1062af7596060ed50d43bbdd5a1384
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / swarmauri_llm_falai-0.11.0-py3-none-any.whl
| Download URL | swarmauri_llm_falai-0.11.0-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf58184df8decb241a9ca0db091345e2516086503bf08df1ead49ff00abcf9e3
|
|
BLAKE2b-256 checksum How to use checksums |
3efdd0003f632c23721b3bf131ee7d1fa6447604af6a5064e13e0b4d8f483714
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for swarmauri_llm_falai 0.11.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.