定制 vigstudio/laravel-ai 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

vigstudio/laravel-ai

最新稳定版本:0.0.4

Composer 安装命令:

composer require vigstudio/laravel-ai

包简介

A laravel plugin to interact with AI providers

README 文档

README

WARNING: This package is currently under heavy development and is not yet suitable for production use.

The Laravel AI package provides an interface for connecting your Laravel application with AI services, particularly with OpenAI. With this package, you can easily:

  • Send requests to OpenAI and receive responses
  • Customize the parameters of your requests
  • Keep track of all requests and responses in your database
  • Keep track of the costs of your requests

Installation

You can install the package via composer:

composer require vigstudio/laravel-ai

After installation, publish the configuration file:

php artisan vendor:publish --provider="VigStudio\LaravelAI\ServiceProvider"

Configuration

In the .env file, set your OpenAI API key:

AI_OPENAI_API_KEY=YOUR_API_KEY

Command line tools

This package offers a variety of command line tools that simplify interaction with AI services. Each tool prompts you to specify a provider and a model.

The tools include:

Chat

php artisan ai:chat

This command enables you to initiate a chat with an AI. Once the command is executed, you can begin your conversation.

Completion

php artisan ai:complete

This command allows you to request the AI to complete your text. Once the command is executed, you can provide your prompt and the AI will generate a response.

Image generate

php artisan ai:image:generate

This command allows you to request the AI to generate an image. Once the command is executed, you can provide your prompt and the AI will generate an image.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-03-22