A framework designed to produce long-texts with GPT or other large language models.
Project description
🦜🦜🦜 textlong
textlong 的目标是基于大语言模型提供结构化的长文本生成能力。
一、安装
安装 textlong:
你可以使用 pip 安装:
pip install -U textlong
或者使用 poetry 安装:
poetry add textlong@latest
加载环境变量:
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv(), override=True)
二、长文本创作:根据提纲扩写
创作提纲:
from textlong import Writing
from langchain_zhipu import ChatZhipuAI
w = Writing(llm=ChatZhipuAI())
w.outline("请帮我创作500字的修仙小说,大女主设定,请给出主角的具体名字")
根据提纲扩写:
w.save_as_ref()
w.detail()
print(w.markdown)
Project details
Release history Release notifications | RSS feed
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.2.4.tar.gz
(41.7 kB
view hashes)
Built Distribution
textlong-0.2.4-py3-none-any.whl
(56.5 kB
view hashes)