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.6.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.6-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ebin_ai_assistant-1.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 45b60c2b6f8b644b6bed70ecece0b1d1c666c2a7e9d7faf654222fbd15f617e2
MD5 920a9698e7320ff344ee8b7b1784406a
BLAKE2b-256 d6fc400dbe96f60a0e3609c2715da5c91ed6db4beb8e66337da4f7c1b3c0463b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ebin_ai_assistant-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7c4efcd0036ccb5ce59082583d3c980f2fceb3574a21b9b8afaefc6b6874bf40
MD5 e22250da56b9f3ad12ec2f6ac3e3ac51
BLAKE2b-256 37451cbe783ed3605fff43eb7eb39df16b1889841575863e5d40e2652e3514b7

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