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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ebin_ai_assistant-0.0.2.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-0.0.2.tar.gz
Algorithm Hash digest
SHA256 3141e6b860397c499c3eae8fd1bc213eb796f7738dc8fba63094eeffa58a5bf8
MD5 8efe745a918f8592d4bb32c3dc369358
BLAKE2b-256 c8ebc9acbe3daf33d96a2dbfc4fd40515adba5a034f84d55de00eb36e775367f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ebin_ai_assistant-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 de94d7650a484ae62a8b6fa508bfd0400c46a28ab5b07ea76fbdc0c48a6f6a02
MD5 66078c308f146daa37f5520d484022b4
BLAKE2b-256 3c93e5504656803fe095013141ae79cd7156b8877cdaa81f423f52a741dd5eab

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