Download the PHP package alvincoded/grok-php-client without Composer

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

Grok PHP: The 2-in-1 PHP SDK for Grok AI

Latest Version PHP Version PHP Version Tests Passing License

Grok PHP is a 2-in-1 PHP SDK offering seamless integration with Grok AI API for both framework-agnostic PHP and Laravel 11+ applications.

Features

Requirements

Installation

Install Grok PHP via Composer:

New Do the following with Laravel applications only:

Note: This command publishes the configuration file and adds the relevant environment variables to your .env file.

Quick Start

Framework-agnostic PHP Usage :

Chat Completion
Text Completions
Image Understanding
Embeddings
Model-specific executions
Structured Output
Structured Output (alt. option with PHP class)

New Laravel Usage :

The coolest part about using Laravel with Grok PHP? You don't have to learn any new tricks! Just use it the same way you would with the framework-agnostic PHP and you're good to go. It's like magic, but better! ✨

Response Handling

Chat/Completion Response Methods

Image Analysis Response Methods

Embedding Response Methods

Error Handling

Supported Models

Model Supports Streaming Supports Functions
grok-beta Yes Yes
grok-2-vision-1212 No No
grok-2-1212 Yes Yes


Supported Parameters


Environment Variables

Add the following to your .env file:


Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Contributions are highly aappreciated! Please see the Contributing Guide for details.

Security

Please review the security policy on how to report security vulnerabilities.

License

Grok PHP is an open-sourced software licensed under the MIT license.

Support

If you encounter any issues or have questions, please open an issue on the GitHub repository.



Built with ❤️ for the AI community.


All versions of grok-php-client with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.9
psr/http-message Version ^2.0
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 alvincoded/grok-php-client contains the following files

Loading the files please wait ....