Skip to main content

vidconcept-sum generates structured, factual summaries of scientific/educational concepts from video titles or descriptions using an LLM.

Project description

vidconcept-sum

PyPI version License: MIT Downloads LinkedIn

vidconcept-sum is a lightweight Python package that turns a video title or short text description into a structured, factual summary of the scientific or educational concept being presented. It leverages an LLM (by default ChatLLM7) to interpret the topic and returns a concise explanation, key terms, and contextual information, all formatted according to a strict regex pattern.


Features

  • One‑line API – just pass a string, get a list of structured summary elements.
  • LLM‑agnostic – works out‑of‑the‑box with ChatLLM7, but you can plug any LangChain‑compatible chat model.
  • Safety‑first – the prompt enforces factual, non‑speculative answers and validates output against a regular expression.
  • Easy installation – available on PyPI.

Installation

pip install vidconcept_sum

Quick Start

from vidconcept_sum import vidconcept_sum

# Simple call using the default ChatLLM7 model (requires an API key)
summary = vidconcept_sum(
    user_input="A short intro to quantum entanglement in YouTube video titles."
)

print(summary)

Parameters

Name Type Description
user_input str The video title or short description to be summarised.
llm (optional) BaseChatModel Any LangChain chat model instance. If omitted, the default ChatLLM7 will be instantiated.
api_key (optional) str API key for LLM7. If not supplied, the function looks for the environment variable LLM7_API_KEY.

The function returns a List[str] containing the extracted summary data.


Using a Custom LLM

You can replace the default ChatLLM7 with any LangChain‑compatible chat model. Below are examples for OpenAI, Anthropic, and Google Generative AI.

OpenAI

from langchain_openai import ChatOpenAI
from vidconcept_sum import vidconcept_sum

llm = ChatOpenAI(model="gpt-4o-mini")
response = vidconcept_sum(
    user_input="Explaining the basics of photosynthesis.",
    llm=llm
)
print(response)

Anthropic

from langchain_anthropic import ChatAnthropic
from vidconcept_sum import vidconcept_sum

llm = ChatAnthropic(model="claude-3-haiku-20240307")
response = vidconcept_sum(
    user_input="A video about black holes and event horizons.",
    llm=llm
)
print(response)

Google Generative AI

from langchain_google_genai import ChatGoogleGenerativeAI
from vidconcept_sum import vidconcept_sum

llm = ChatGoogleGenerativeAI(model="gemini-1.5-flash")
response = vidconcept_sum(
    user_input="Understanding the theory of relativity in simple terms.",
    llm=llm
)
print(response)

API Key & Rate Limits

  • LLM7 free tier provides generous rate limits that cover typical usage of this package.
  • If you need higher limits, supply your own API key:
    • Via environment variable: export LLM7_API_KEY="your_key_here"
    • Or directly in the call: vidconcept_sum(..., api_key="your_key_here")
  • Obtain a free API key by registering at https://token.llm7.io/.

Contributing & Support

If you encounter any issues or have feature requests, please open an issue on GitHub:

https://github.com/chigwell/vidconcept-sum/issues


License

This project is licensed under the MIT License.


Author

Eugene Evstafev
Email: hi@euegne.plus
GitHub: chigwell


Enjoy using vidconcept-sum to instantly extract clear, educational concepts from video titles!

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

vidconcept_sum-2025.12.21193338.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vidconcept_sum-2025.12.21193338-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file vidconcept_sum-2025.12.21193338.tar.gz.

File metadata

File hashes

Hashes for vidconcept_sum-2025.12.21193338.tar.gz
Algorithm Hash digest
SHA256 1db0a8f6eca4b679aea2a6c6d6b1358ea284fdaec90b1c3a1f4b30d56b29edbc
MD5 4e553055defe41e2a96eac1d8afb779b
BLAKE2b-256 070a1a817823eb79635ae836426dd1bf17b0c61f8ace46493ecba6e6e2226715

See more details on using hashes here.

File details

Details for the file vidconcept_sum-2025.12.21193338-py3-none-any.whl.

File metadata

File hashes

Hashes for vidconcept_sum-2025.12.21193338-py3-none-any.whl
Algorithm Hash digest
SHA256 bcafed169e19ecac2edc21a0e1b21b9e49b367a5c23864aecad4bfcc725679dd
MD5 085d15591d55b931f8d2cfe8a713af14
BLAKE2b-256 423dfd55763b080493a46344bfb2009c49b0bd54fc0147b6849aee9e641f1618

See more details on using hashes here.

Supported by

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