Download the PHP package oliverearl/nomiai-php without Composer

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

Nomi.ai PHP Library

Latest Version on Packagist Tests Total Downloads

This is a lightweight, PHP library for interacting with the Nomi.ai REST API. Nomi AI is a companionship application that uses artificial intelligence.

The only prerequisite is at least PHP 8.3 with the JSON extension. You'll need a HTTP client too, preferably Guzzle. If you're using a popular framework, you should be good to go.

If you're using Laravel, install the Laravel-specific library instead.

Installation

You can install the package via Composer:

Usage

Quickstart

After installing the library, getting started is easy:

Retrieving Nomis

A numerically-indexed array of Nomis associated with an account can be returned using the library. If you know your Nomi's UUID, you can also retrieve their data individually.

Chatting with Nomis

Once you have a Nomi you want to chat with, or if you know their UUID, sending a message is easy. If all goes well, you will end up with a MessageSet object containing both your message and the corresponding reply.

Retrieving an avatar

You can retrieve the avatar from a Nomi with either a Nomi object, or their corresponding UUID.

Rooms

Retrieving rooms

You can retrieve a numerically-indexed array of rooms associated with your account. Just like with Nomis, if you know the UUID of the room, you can also retrieve this individually.

Creating a room for your Nomis

Creating a room for Nomis can be done with either an array of Nomi objects, or an array containing their respective UUIDs. A RoomRequest object exists to help you with this process, or you can use an associative array.

Updating and deleting rooms

Updating an existing room can also be done with a RoomRequest object, or an associative array containing the values you wish to change. Whatever you choose, it's a good idea not to include fields you don't want to update.

Deleting a room is straightforward. These methods will simply return true as they will throw an appropriate exception if something goes wrong.

Messaging within rooms

Sending a message into a room is easy. Be aware rooms do take time to initialise, so don't send a message to them immediately after creation. The message that was sent is returned as the result.

Nomis can be prompted to send a message to a room. For more information about this, please check the Nomi.ai website.

Functionality

The library is under active development. Complete feature availability is planned for the first major release.

Nomi.ai API Functionality Implemented Release
Retrieve and view Nomis Yes v0.1.2-alpha
Send and receive messages to Nomis Yes v0.1.3-alpha
Retrieve Nomi avatars Yes v0.1.6-alpha
Retrieve rooms Yes v0.2.0-alpha
Create rooms Yes v0.2.0-alpha
Send messages into rooms Yes v0.2.0-alpha
Delete rooms Yes v0.2.0-alpha

For more information regarding the Nomi.ai API, please check the documentation available here.

Testing

Tests are run using the Pest testing framework. You can run the suite like so:

Code Style

Laravel Pint is used to maintain the PER coding style. The linter can be run using:

There are Pest architecture tests that also attempt to maintain certain conventions, including the use of strict typing where possible.

Changelog

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

Contributing

Your contributions are warmly welcomed! Anything from documentation, to optimisations, and additional tests. Pull requests must pass the existing test suite and conform to the required code style.

For new functionality, adequate tests must be included!

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of nomiai-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-json Version *
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 oliverearl/nomiai-php contains the following files

Loading the files please wait ....