Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverearl committed Nov 29, 2024
1 parent 1de54dc commit d42db1e
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,29 @@ $conversation = $sdk->sendMessageToNomi($nomi, 'Hello!');
$conversation = $sdk->sendMessage($nomi->uuid, 'World!');
```

### Retrieving an avatar

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

```php
/** @var \Nomiai\PhpSdk\NomiAI $sdk **/
/** @var \Nomiai\PhpSdk\Resources\Nomi $nomi **/

$avatar = $sdk->getAvatarFromNomi($nomi);

// Or via the UUID:
$avatar = $sdk->getAvatar($nomi->uuid);

/*
* Avatar is an object that might get more functionality down the line. For now,
* to get the underlying .webp image, access the avatar property.
*/
$webp = $avatar->avatar;

// You can also retrieve the underlying image by casting the object to a string.
$image = (string) $avatar;
```

## Functionality

The library is under active development. Complete feature availability is planned for the first major release.
Expand All @@ -78,7 +101,7 @@ The library is under active development. Complete feature availability is planne
|------------------------------------|-------------|:-------------|
| 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.5-alpha |
| Retrieve Nomi avatars | Yes | v0.1.6-alpha |
| Retrieve rooms | No | |
| Create rooms | No | |
| Send messages into rooms | No | |
Expand Down

0 comments on commit d42db1e

Please sign in to comment.