Skip to main content

A library containing AI utility functions

Project description

ebin_ai_assistant

A Python library that provides AI-powered utility functions using Google's Gemini API. This library simplifies common AI tasks such as getting responses, summarizing text, and formatting content.

Features

  • Get AI Response: Send prompts to Google Gemini and get text responses.
  • Summarize Text: Automatically summarize long pieces of text.
  • Format Text: Intelligently clean and format messy text into professional, structured output.

Installation

You can install ebin_ai_assistant directly from PyPI:

pip install ebin_ai_assistant

Configuration

Before using the library, you need to configure it with your Google Gemini API key. You can get an API key from Google AI Studio.

from ebin_ai_assistant import configure_api

# Replace with your actual API key
configure_api("YOUR_GOOGLE_GEMINI_API_KEY")

Usage

1. Get a Response

Send a prompt to the AI and get a response.

from ebin_ai_assistant import get_response

response = get_response("What is the capital of France?")
print(response)
# Output: The capital of France is Paris.

Custom Model: By default, it uses gemini-2.5-flash. You can specify a different model if needed:

response = get_response("Explain quantum physics", model_name="gemini-pro")

2. Summarize Text

Summarize a long block of text.

from ebin_ai_assistant import summarize_text

long_text = """
Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. Python is dynamically typed and garbage-collected. It supports multiple programming paradigms, including structured (particularly procedural), object-oriented and functional programming.
"""

summary = summarize_text(long_text)
print(summary)
# Output: Python is a readable, high-level programming language that supports multiple paradigms like object-oriented and functional programming.

3. Format Text

Clean up messy text and make it professional.

from ebin_ai_assistant import format_response

messy_text = "  hey there...   i need this   to be fixed!!  "
formatted = format_response(messy_text)
print(formatted)
# Output: Hey there, I need this to be fixed.

Requirements

  • Python 3.9+
  • google-generativeai

License

MIT License

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

ebin_ai_assistant-1.0.3.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

ebin_ai_assistant-1.0.3-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file ebin_ai_assistant-1.0.3.tar.gz.

File metadata

  • Download URL: ebin_ai_assistant-1.0.3.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for ebin_ai_assistant-1.0.3.tar.gz
Algorithm Hash digest
SHA256 eae9b6c90d94009c062c9df88cdcb3bcfc57721b2a536c74197f7ac7e825b543
MD5 5a3b7cac1917808efa3ac2fb5e8133f3
BLAKE2b-256 ed29bf6bdf4e551de8b0c770612c371f1136015a67da3547660bf364d897b728

See more details on using hashes here.

File details

Details for the file ebin_ai_assistant-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for ebin_ai_assistant-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dec8365e5a50c3cb08f7a15d23f93591a790b77195d26a51460d8c743adaa740
MD5 39bf4753f8dcb563b877b38aa567f77c
BLAKE2b-256 ac1aaf0ce4a457d30fe95d228b2d4e9a76e742c4121df3dff82fc3616c7d4d30

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