Skip to main content

A framework designed to produce long-texts with GPT or other large language models.

Project description

🦜🦜🦜 textlong

PyPI version

textlong 的目标是基于大语言模型提供结构化的长文本生成能力。

一、安装

你可以使用 pip 安装:

pip install -U textlong

或者使用 poetry 安装:

poetry add textlong@latest

二、结构化长文生成能力

textlong 中提供如下结构化长文档的创作模式:

  • 一键直出:输入写作要求后,由AI直接创作
  • (其他模式正在研发中,请参考路线图说明 路线图

应用示范:

import os
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv(), override=True)

from textlong import WritingTask

# 使用默认的智谱AI推理
t = WritingTask()
t.auto_write("task 给好基友写一封信, 1800字")

t.invoke("")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

textlong-0.1.2.tar.gz (28.2 kB view hashes)

Uploaded Source

Built Distribution

textlong-0.1.2-py3-none-any.whl (35.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page