Skip to content

text-theme-scribe extracts recurring themes from text and returns a structured list of key concepts via LLM, ensuring consistent formatting.

Notifications You must be signed in to change notification settings

chigwell/text-theme-scribe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

text_theme_scribe

PyPI version License: MIT Downloads LinkedIn

A package that analyzes user-provided text to identify and extract recurring themes or topics, then summarizes them into a structured list of key concepts.

Installation

To install the package, use pip:

pip install text-theme_scribe

Usage

To use the package, import the text_theme_scribe function and call it with a string input:

from text_theme_scribe import text_theme_scribe

user_input = "This is a sample text with multiple themes..."
response = text_theme_scribe(user_input)
print(response)

Parameters

  • user_input: str, the user input text to process
  • llm: Optional[BaseChatModel], the langchain LLM instance to use (default: ChatLLM7 from langchain_llm7 https://pypi.org/project/langchain_llm7/)
  • api_key: Optional[str], the API key for llm7 (default: environment variable LLM7_API_KEY)

You can pass a custom LLM instance by passing it as the llm parameter. For example:

from text_theme_scribe import text_theme_scribe
from langchain_openai import ChatOpenAI

llm = ChatOpenAI()
response = text_theme_scribe(user_input, llm=llm)

You can also pass a custom API key by setting the LLM7_API_KEY environment variable or by passing it directly:

import os
os.environ["LLM7_API_KEY"] = "your_api_key"
response = text_theme_scribe(user_input)

If you want to use a different LLM, you can use a different API key:

response = text_theme_scribe(user_input, api_key="your_api_key")

Default LLM and API Key

By default, the package uses the ChatLLM7 from langchain_llm7 https://pypi.org/project/langchain_llm7/ and the free tier API key. If you want to use a different LLM or has higher rate limits, you can pass a custom LLM instance or API key.

Rate Limits

The default rate limits for LLM7 free tier are sufficient for most use cases of this package. If you need higher rate limits, you can pass your own API key via environment variable LLM7_API_KEY or by passing it directly.

Author

Eugene Evstafev

You can get a free API key by registering at https://token.llm7.io/

GitHub Issues

If you find any issues or have any questions, please open an issue on our GitHub repository: https://github.com/chigwell/text-theme_scribe

Releases

No releases published

Packages

No packages published

Languages