psygen-revised
Python package implementing Psygen Revised: a three-stage (optional fourth) LLM pipeline that produces a structured psychological profile for a character from a natural-language query.
- Schema: JSON Schema for each layer and the merged profile (
package data). - Runner:
ProfileGeneratorchains axiom → intermediate → emergent calls, validates JSON, merges evidence. - Prompt surface:
to_prompt_string()emits dialogue-ready text (20 emergent traits + coping style + role identity), capped at 600 characters per the design contract.
Install
pip install psygen-revised
With OpenAI client helper:
pip install psygen-revised[openai]
Quick use
import asyncio
from psygen_revised import ProfileGenerator, OpenAiLlmClient
async def main():
client = OpenAiLlmClient.from_env() # OPENAI_API_KEY
gen = ProfileGenerator(client)
profile = await gen.generate("Linus from Stardew Valley")
print(profile.to_prompt_string())
print(profile.to_json())
asyncio.run(main())
Custom LLM backend
Implement psygen_revised.protocols.LlmClient (complete(system, user) -> str) and pass it to ProfileGenerator.
CLI
psygen-generate "Linus from Stardew Valley" -o linus.json
Design
See DESIGN.md and PLAN.md in this directory.
License
MIT
Metadata
Release files for psygen-revised 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| psygen_revised-0.1.0.tar.gz | 11.7 kB | Without provenance | Details for psygen_revised-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| psygen_revised-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for psygen_revised-0.1.0-py3-none-any.whl |
Total release size: 31.9 kB
Release files / psygen_revised-0.1.0.tar.gz
| Download URL | psygen_revised-0.1.0.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fdd5d6abc91628c6dce1f834fe8f5efa2034b7179aac369442b1172c5f1d42c3
|
|
BLAKE2b-256 checksum How to use checksums |
f7d6f87c844f9dac58dc507315a046dedbc5a94b62c7f58deaf26eb057c2a260
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|
Release files / psygen_revised-0.1.0-py3-none-any.whl
| Download URL | psygen_revised-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1679b0f113fdce18aa7e3898987ca62ca79159f687ad1fae53dc4cdaaeb2ce5
|
|
BLAKE2b-256 checksum How to use checksums |
a1253278740e3ccf50eac1bd18dbd8469cb4320cbcb4a762e58d4703b037a62c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|
Security for psygen-revised 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.