Skip to main content

A Universal Content & Action Orchestrator leveraging AI for content creation and automation.

Project description

qcsc-mod: Universal Content & Action Orchestrator 🚀 Overview qcsc-mod is an intelligent Python library designed to empower both developers and everyday users with advanced AI capabilities for content creation and assisted automation. By leveraging the power of Large Language Models (LLMs) and Image Generation models, qcsc-mod provides a simplified interface to:

Generate diverse text content: From short stories and marketing slogans to summaries and ideas.

Create basic images: Turn simple descriptions into visual assets.

Orchestrate actions: Interpret natural language instructions to perform file operations and other useful tasks.

For developers, it acts as a robust abstraction layer, making it easy to integrate sophisticated AI features into their applications without deep knowledge of LLM APIs. For everyday users, applications built with qcsc-mod can offer intuitive, natural-language-driven ways to achieve complex tasks, simplifying their digital life.

✨ Features Intelligent Text Generation:

generate_text: Create free-form text based on any prompt.

summarize: Condense long documents or texts.

brainstorm_ideas: Generate lists of creative ideas for any topic.

Basic Image Creation:

generate_image: Produce simple images from text descriptions.

Assisted Automation (via perform_action):

save_text: Save generated or provided text content to a file.

read_text: Read content from a specified file.

Expandable: Designed to easily integrate more actions (e.g., creating directories, basic web queries).

Natural Language Orchestration: A central perform_action function that understands user instructions in plain English and routes them to the appropriate underlying AI or utility function.

🛠️ Installation You can install qcsc-mod using pip:

pip install qcsc-mod

Note: This package requires an API key for Google's Gemini/Imagen models to function, as it makes calls to these services.

🔑 API Key Setup qcsc-mod requires access to the Google Gemini API (gemini-2.0-flash) for text operations and the Imagen API (imagen-3.0-generate-002) for image generation.

When running your application in a Canvas environment, the API key is automatically provided. However, if you are running qcsc-mod locally or integrating it into your own application outside of Canvas, you will need to set the API_KEY in qcsc_mod/content_ai.py and qcsc_mod/image_ai.py (and potentially qcsc_mod/main.py if you run it directly).

It is highly recommended to manage your API key securely, preferably using environment variables.

Example of how your API_KEY variable might look in content_ai.py or image_ai.py for local development (replace YOUR_API_KEY_HERE with your actual key):

import os

Get API key from environment variable, or hardcode for testing ONLY

API_KEY = os.getenv("GEMINI_API_KEY", "YOUR_API_KEY_HERE")

🚀 Usage The core of qcsc-mod's intelligent functionality is the perform_action function, which interprets natural language.

Example 1: Generating a Short Story

from qcsc_mod.main import perform_action

instruction = "Write a short story about a brave space pilot exploring a new planet inhabited by friendly, coding aliens." result = perform_action(instruction) print(result)

Example 2: Brainstorming Ideas

from qcsc_mod.main import perform_action

instruction = "Give me 4 unique ideas for a sustainable energy solution." result = perform_action(instruction) print(result)

Example 3: Generating an Image

from qcsc_mod.main import perform_action

Note: Image generation can take a few seconds.

instruction = "Generate an image of a vibrant, futuristic cityscape at sunset with flying cars." result = perform_action(instruction)

The result will be a base64 data URL. In a web app, you'd embed this in an tag.

print(result)

Example 4: Saving and Reading Text Files

from qcsc_mod.main import perform_action

Save text

save_instruction = "Save 'Hello qcsc-mod! This is a test.' to my_first_note.txt" save_result = perform_action(save_instruction) print(save_result)

Read text

read_instruction = "Read content from my_first_note.txt" read_result = perform_action(read_instruction) print(read_result)

Running the Interactive CLI:

You can also run main.py directly to use the interactive command-line interface:

python -m qcsc_mod.main

Then, type your instructions when prompted, for example:

write a poem about the beauty of Python programming

summarize this text: The quick brown fox jumps over the lazy dog. This sentence is a panagram and is often used to test typefaces.

generate 5 catchy slogans for a new AI-powered task manager

create an image of a cute robot reading a book

save "This is important meeting info." to meeting_notes.md

read content from meeting_notes.md

quit (to exit)

🤝 Contributing We welcome contributions! If you have ideas for new features, bug fixes, or improvements, please feel free to:

Fork the repository.

Create a new branch (git checkout -b feature/your-feature).

Make your changes.

Commit your changes (git commit -m 'Add new feature').

Push to the branch (git push origin feature/your-feature).

Open a Pull Request.

📄 License This project is licensed under the MIT License - see the LICENSE file for details.

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

qcsc_mod-0.1.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

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

qcsc_mod-0.1.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file qcsc_mod-0.1.0.tar.gz.

File metadata

  • Download URL: qcsc_mod-0.1.0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for qcsc_mod-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4f18463b50d45001615c1a17d294618dd6582711504924074a2ee5dd5150ed49
MD5 f4d7d9faef59775b4e9d6f971bfd5cf5
BLAKE2b-256 68abc74b5bd46f8af6ca6c81b0ffb7963cb075140a56475a60627e09ae411476

See more details on using hashes here.

File details

Details for the file qcsc_mod-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: qcsc_mod-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for qcsc_mod-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51b2803e6fa4bc72cf2f926457bc4d354fb5704990802da3b689bee6e9803e05
MD5 5abe7c27c022fa86d3d12e305a8ea36e
BLAKE2b-256 bd46ac942f923615f51588882c3a441c1f6700c9bfa11dc3fb6f5bcc1a9d4724

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