sharpapi/laravel-content-paraphrase 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

sharpapi/laravel-content-paraphrase

Composer 安装命令:

composer require sharpapi/laravel-content-paraphrase

包简介

AI Content Paraphrasing for Laravel powered by SharpAPI.com

README 文档

README

Latest Version on Packagist Total Downloads

This package provides a Laravel integration for the SharpAPI Content Paraphrasing service. It allows you to rewrite text while maintaining its original meaning, which is perfect for creating unique content variations, avoiding plagiarism, and improving content readability.

Installation

You can install the package via composer:

composer require sharpapi/laravel-content-paraphrase

Configuration

Publish the config file with:

php artisan vendor:publish --tag="sharpapi-content-paraphrase"

This is the contents of the published config file:

return [
    'api_key' => env('SHARP_API_KEY'),
    'base_url' => env('SHARP_API_BASE_URL', 'https://sharpapi.com/api/v1'),
    'api_job_status_polling_wait' => env('SHARP_API_JOB_STATUS_POLLING_WAIT', 180),
    'api_job_status_polling_interval' => env('SHARP_API_JOB_STATUS_POLLING_INTERVAL', 10),
    'api_job_status_use_polling_interval' => env('SHARP_API_JOB_STATUS_USE_POLLING_INTERVAL', false),
];

Make sure to set your SharpAPI key in your .env file:

SHARP_API_KEY=your-api-key

Usage

use SharpAPI\ContentParaphrase\ContentParaphraseService;

$service = new ContentParaphraseService();

// Paraphrase text
$paraphrasedText = $service->paraphrase(
    'The quick brown fox jumps over the lazy dog.',
    'English', // optional language
    100, // optional max length
    'professional', // optional voice tone
    'blog post' // optional context
);

// $paraphrasedText will contain the paraphrased text as a string

Parameters

  • text (string): The text content to paraphrase
  • language (string|null): The language for the paraphrased text (default: English)
  • maxLength (int|null): Maximum length of the paraphrased text
  • voiceTone (string|null): The tone of voice for the paraphrased text (e.g., professional, casual, friendly)
  • context (string|null): Additional context to improve paraphrasing quality

Response Format

{
    "data": {
        "type": "api_job_result",
        "id": "385fec60-e73e-458c-a6c9-6e76e5a76661",
        "attributes": {
            "status": "success",
            "type": "content_paraphrase",
            "result": {
                "paraphrase": "Max Verstappen of Red Bull remarks that the Las Vegas Grand Prix is '99% show and 1% sport.' The triple world champion isn't thrilled about the spectacle, marking the first F1 race on the city's Strip. Other drivers, like Fernando Alonso, acknowledge the unique investment and setting. The event began with a grand ceremony featuring stars like Kylie Minogue. Bob Hamilton expressed excitement about the iconic city, noting the blend of show and sport, and praised F1's direction under Stefano Domenicali and Liberty."
            }
        }
    }
}

## Features

- Maintains the original meaning of the text
- Adjusts the writing style based on the specified voice tone
- Supports multiple languages
- Can limit the length of the output text
- Provides context-aware paraphrasing for better results

## Credits

- [Dawid Makowski](https://github.com/dawidmakowski)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

sharpapi/laravel-content-paraphrase 适用场景与选型建议

sharpapi/laravel-content-paraphrase 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 01 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「api」 「rewrite」 「laravel」 「artificial intelligence」 「natural language processing」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 sharpapi/laravel-content-paraphrase 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 sharpapi/laravel-content-paraphrase 我们能提供哪些服务?
定制开发 / 二次开发

基于 sharpapi/laravel-content-paraphrase 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-09