diversen/gpt-translate 问题修复 & 功能扩展

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

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

diversen/gpt-translate

最新稳定版本:v1.2.1

Composer 安装命令:

composer require diversen/gpt-translate

包简介

Translate long texts using GPT

README 文档

README

This is minimal howto about translating a long text using GPT using php. It may translate markdown texts, e.g. a novel, from one language to another. It does the job quite well, but in any case you will need to edit the translated document if you want a translation of high quality.

The auto-translation may serve as a good starting point.

It is only tested using markdown text. It will split a document into small parts based on double lines. And then translate one section at a time.

Usage

This example will make an effort to translate the first the part of the danish novel 'Lykke Per' (A Fortunate Man) into english.

git clone git@github.com:diversen/gpt-translate.git
cd gpt-translate
composer install

You will need to change the api key in examples/example_1/index.php Then run:

php examples/example_1/index.php

(There is also a couple of other examples).

As library

composer require diversen/gpt-translate

Usage is the same as in examples/example_1/index.php

Related

This repo will try and fetch a URL and turn a html page into markdown:

https://github.com/diversen/url-to-markdown

License

MIT © Dennis Iversen

统计信息

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

GitHub 信息

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

其他信息

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