承接 sfolador/ai-avatar-suggest 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sfolador/ai-avatar-suggest

最新稳定版本:1.2

Composer 安装命令:

composer require sfolador/ai-avatar-suggest

包简介

Create avatar for your users with openai

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Use this library to generate avatars for your users by letting them insert a short description about themselves.

Installation

You can install the package via composer:

composer require sfolador/ai-avatar-suggest

You can publish the config file with:

php artisan vendor:publish --tag="ai-avatar-suggest-config"

This is the contents of the published config file:

return [
    'openai_key' => env('OPENAI_KEY'),
    'default_size' => '256x256',
    'default_route' => 'ai-avatar-suggest',
    'use_cache' => true,
    'throttle' => [
        'enabled' => false,
        'max_attempts' => 60,
        'prefix' => 'ai-avatar-suggest',
    ],
];

Remember to set your OpenAI key in your .env file.

If the use_cache option is set to true, the package will use the default cache driver to prevent unnecessary calls to the OpenAI API. You can change the cache driver in your config/cache.php file.

Usage

$aiAvatarSuggest = new Sfolador\AiAvatarSuggest();
echo $aiAvatarSuggest->suggest('A developer with a red beard and a cool hat');

//or if you want to use the facade

echo AiAvatarSuggest::suggest('A developer with a red beard and a cool hat');

You can also invoke the generation by calling the route ai-avatar-suggest with a prompt parameter. The response will be a JSON with the suggested email, such as:

{
  "suggestion": "https://www.example.com/link/to/avatar"
}

Cache clear

If you use a Cache driver that supports tags, you can clear the cache by invoking the command:

php artisan ai-avatar-suggest:clear-cache

Testing

composer test

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

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

Credits

License

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

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固