A new package designed to help users distinguish between factual information and imaginative interpretations. This tool takes user-provided text as input and uses advanced language models to analyze a
Project description
Factofiction Analyzer
Overview
Factofiction Analyzer is a Python package that helps users distinguish between factual information and imaginative interpretations. It takes user-provided text as input, analyzes and structures the content using advanced language models, and identifies and separates factual statements from imaginative or speculative ones.
Installation
pip install factofiction_analyzer
Usage
Usage example:
from factofiction_analyzer import factofiction_analyzer
response = factofiction_analyzer(user_input="The cat sat on the mat.")
Input parameters:
user_input: The user input text to process (str)llm: The langchain LLM instance to use (Optional[BaseChatModel]). If not provided, the default ChatLLM7 will be used.api_key: The API key for LLM7 (Optional[str]). If not provided, the LLM7 free tier will be used.
Note: If you want to use a custom LLM instance, you can pass it as an argument like this:
from langchain_openai import ChatOpenAI
from factofiction_analyzer import factofiction_analyzer
llm = ChatOpenAI()
response = factofiction_analyzer(user_input="The cat sat on the mat.", llm=llm)
Supported LLMs
The package uses ChatLLM7 from langchain_llm7 by default. You can use other LLMs by passing your own instance:
- OpenAI:
langchain_openai.ChatOpenAI - Anthropic:
langchain_anthropic.ChatAnthropic - Google Generative AI:
langchain_google_genai.ChatGoogleGenerativeAI
API Key
If you need higher rate limits for LLM7, you can set the LLM7_API_KEY environment variable or pass your API key directly:
factofiction_analyzer(user_input="The cat sat on the mat.", api_key="your_api_key")
You can obtain a free API key by registering at https://token.llm7.io/
GitHub Issues
Report any issues or bugs to: https://github.com/your-github-nickname/factofiction-analyzer/issues
Author
Written by Eugene Evstafev (hi@euegne.plus)
Acknowledgement
This package uses the llmatch-messages package for consistent output formatting.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file factofiction_analyzer-2025.12.21084430.tar.gz.
File metadata
- Download URL: factofiction_analyzer-2025.12.21084430.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e3b05b2918f3df01311c71df4ba41443ffcf7b9597364e6919a3e6b736ea76b
|
|
| MD5 |
cb8474bdd651c95d1a4d2e167896e615
|
|
| BLAKE2b-256 |
2561e10a7c0cdc07e8075417571d81f1b9db5a06f7a35f634f726af7c2e29b90
|
File details
Details for the file factofiction_analyzer-2025.12.21084430-py3-none-any.whl.
File metadata
- Download URL: factofiction_analyzer-2025.12.21084430-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfb4c1904a5089c26d485a49c11f97626a57448b0cc1bd8f2016aca1a2a25a62
|
|
| MD5 |
08411b83259e047bcf24280ae993e232
|
|
| BLAKE2b-256 |
2a44522ad35a1b4e4091b230d8e5e6e05fd4ef058203de91b1525effb9da1150
|