Skip to content

Commit

Permalink
Merge pull request #3 from outl1ne/initial-release
Browse files Browse the repository at this point in the history
Update nova openai description
  • Loading branch information
allantatter authored Feb 22, 2024
2 parents d4b5a7a + 38bf86d commit a031dd4
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
# Nova OpenAI

## Testing
OpenAI SDK for a Laravel application that also stores OpenAI communication and presents it in a Laravel Nova admin panel.

This is currently an **unstable** package, breaking changes are to be expected. The main objective at the moment is to make it easier to include it as a dependency in our own client projects. This way we can make it more mature and have a v1 release when we feel it suits our needs in practice. This is why we haven't implemented all OpenAI endpoints yet and will add them one-by-one when they are actually needed.

If you need any features to be implemented or bump its priority in our backlog then feel free to make an inquiry via email at [email protected].

## Requirements

- `php: >=8.1`
- `laravel/nova: ^4.0`

## Installation

```bash
composer require outl1ne/nova-openai

// optional
php artisan vendor:publish --tag=nova-openai-config
```

## Usage

```php
$response = OpenAI::chat()->create(
model: 'gpt-3.5-turbo',
messages: (new Messages)->system('You are a helpful assistant.')->user('Hello!'),
);

$response = OpenAI::embeddings()->create(
'text-embedding-3-small',
'The food was delicious and the waiter...'
);
```

## Contributing

```
composer install
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "outl1ne/nova-openai",
"description": "Abstraction layer to store OpenAI communication, pricing and to present it in Laravel Nova environment.",
"description": "OpenAI SDK for a Laravel application that also stores OpenAI communication and presents it in a Laravel Nova admin panel.",
"keywords": [
"laravel",
"nova"
"nova",
"openai"
],
"license": "MIT",
"require": {
Expand Down
2 changes: 1 addition & 1 deletion src/NovaOpenAIServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function boot()

$this->publishes([
__DIR__ . '/../config/nova-openai.php' => config_path('nova-openai.php'),
], 'config');
], 'nova-openai-config');

// Register resources
Nova::resources(array_filter([
Expand Down

0 comments on commit a031dd4

Please sign in to comment.