Download the PHP package distvan/dialclient without Composer

On this page you can find all versions of the php package distvan/dialclient. 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 dialclient

PHP DialClient

DIAL AI Chat Completion Task implemented in PHP. A command line chat application that communicates with the DIAL AI API.

API specification: https://dialx.ai/dial_api

Install

Basic usage (sync)

DialChatCompletions::create() returns a Message (role + content).

Local env vars (scripts)

If you want to run the included app.php locally, you can set the required environment variables using the scripts in ./scripts.

The CLI expects:

DIAL_API_KEY (if set) is sent as an api-key header by app.php via DialChatCompletions.

Note: app.php currently runs the CLI in streaming mode ($app->run(true)), but it prints the final assembled answer (not token-by-token).

Bash / Git Bash

PowerShell

Run the CLI chat example

This repo includes a tiny interactive CLI chat in app.php (backed by DialClient\Application).

PowerShell

Bash / Git Bash

SSL / cURL error 60 (Windows)

If you see cURL error 60: SSL certificate problem: unable to get local issuer certificate, PHP/cURL can't validate the certificate chain.

Async

createAsync() returns a Promise that resolves to the decoded JSON array returned by the server.

Streaming

The API streams SSE events (data: ...) where each JSON chunk contains choices[0].delta (partial output). The stream ends with data: [DONE].

In many deployments, early chunks may contain only role/metadata and no delta.content, and finish_reason stays null until the final chunk.

To print tokens/fragments as they arrive:

If you need access to the full decoded chunks:

If you just want the final assembled message content:

Xdebug step-debug noise (CLI)

If you see Xdebug: [Step Debug] Time-out connecting to debugging client ... when running composer test / composer phpstan, disable step-debug for the Composer process:

🌐 Join Me on CoderLegion

CoderLegion Check out my articles and community posts on CoderLegion!


All versions of dialclient with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
guzzlehttp/guzzle Version ^7.8
guzzlehttp/promises Version ^2.0
guzzlehttp/psr7 Version ^2.6
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.1 || ^2.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 distvan/dialclient contains the following files

Loading the files please wait ...