Download the PHP package modfin/bellman without Composer

On this page you can find all versions of the php package modfin/bellman. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bellman

bellman-php

PHP client for bellmand, the Bellman LLM proxy. One URL and one API key give you OpenAI, Anthropic, Gemini (VertexAI), VoyageAI, Ollama, vLLM and xAI behind the same interface.

Requires PHP 8.1+.

Install

If the package is not on Packagist (or you want to pin to the GitHub repo directly), add the repository to your composer.json first:

Usage

The key name (my-app) identifies the caller in bellmand's logs and metrics, the token is the API key configured in bellmand.

Configuring a generator

Generators are immutable, every setter returns a new instance, so configure once and reuse.

Also available: topP(), topK(), frequencyPenalty(), presencePenalty(), stopAt(), thinkingBudget() and includeThinkingParts().

Structured output

Images, PDFs and other files

Pass raw bytes, the client takes care of base64 encoding. Plain strings passed to prompt() are user messages.

Conversations

Append $res->turn to the prompts to continue a conversation. It holds the assistant's reply in replay-ready form, including thinking signatures that some providers require you to send back.

Embeddings

Models

All models known to the Go library are available as static constructors on Bellman\Models\Anthropic, OpenAI, VertexAI, VoyageAI, Ollama, VLLM, XAI and OMLX, with the same names as in Go:

Any model bellmand can route to works, including ones not in the catalog:

Usage and errors

Every failure throws Bellman\BellmanException. $e->statusCode holds the HTTP status from bellmand (null if it was never reached), and $e->isRateLimited() and $e->isUnauthorized() cover the common cases.

HTTP client

Guzzle is used by default with a 300 second timeout. Any PSR-18 client can be passed instead:

Laravel

Then inject Bellman\Client wherever you need it.

Development

src/Models is generated from the Go library's model definitions. To update it after models change in bellman, run this from the repo root, with a bellman checkout next to it:

Not yet supported: streaming, and tools / function calling.


All versions of bellman with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-json Version *
guzzlehttp/guzzle Version ^7.8
psr/http-client Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package modfin/bellman contains the following files

Loading the files please wait ...