Skip to main content

A Python package designed to facilitate the quick and customized development of agent-driven applications leveraging large language models (LLMs). This library aims to streamline tasks such as analyzing customer data, sending emails, and extracting information from various sources, including PDFs and web URLs.

Project description

elsai-agent-hub: A multi-agent framework for GenAI

Table of Contents

Introduction

elsai-agent-hub is a Python package designed to facilitate the quick and customized development of agent-driven applications leveraging large language models (LLMs). This library aims to streamline tasks such as content generation, sending emails, and extracting information from various sources, including PDFs and web URLs.

Main Features

Here are some of the key features of elsai-agent-hub:

  • Content Generation: Create high-quality written content tailored to specific needs and contexts using advanced LLMs.
  • Sales Pitch Automation: Automate the creation and sending of personalized sales pitch emails, improving outreach effectiveness and engagement rates
  • PDF Text Extraction: Seamless integration with PyMuPDF to read and extract text from PDF files.
  • Web Scraping: Utilize BeautifulSoup to scrape and extract data from web URLs.
  • Email Automation: Send emails securely using SMTP with best practices incorporated.
  • Flexibility and Customization: Highly customizable to suit specific application requirements and workflows.

Whether you are looking to build a simple application or a complex system leveraging LLMs, elsai-agent-hub provides the fundamental building blocks to get you started quickly and efficiently.

Directory Structure Diagram

plot

Installation

You can install our package simply by running

pip install elsai-agent-hub

License

MIT

Setup

Environment Variables

Depending on whether you are using Azure OpenAI or OpenAI, you need to set specific environment variables.

Azure OpenAI

If you are using Azure OpenAI, set the following environment variables:
```sh
export AZURE_OPENAI_ENDPOINT=<Your_Endpoint>
export AZURE_OPENAI_API_KEY=<Your_API_Key>
export OPENAI_API_VERSION=<OpenAI_Version_Date>
export AZURE_OPENAI_DEPLOYMENT_NAME=<Your_Deployment_Name>
```

OpenAI

If you are using OpenAI, set the following environment variable:
```sh
export OPENAI_API_KEY=<Your_API_Key>
```

Usage

Content Generate

It will analyze the query based on the given prompts

Default prompt

For Azure
```python
from elsai_agent_hub.micro_agent import ContentGenerate
generated_text = ContentGenerate().generate(pdf_file_path='Your Pdf file-path',
                                            domain='Your Domain URL',
                                            text='your text',
                                            ai_service='azure')
```
For openAI
from elsai_agent_hub.micro_agent import ContentGenerate
generated_text = ContentGenerate().generate(pdf_file_path='Your Pdf file-path',
                                           domain='Your Domain URL',
                                           text="your text",
                                           ai_service="openai")

Custom Prompt

from elsai_agent_hub.micro_agent import ContentGenerate

#Parameters
"""
pdf_file_path (str): Path to a PDF file to be analyzed.
ai_service (str): The AI service to use for analysis ('azure' or 'openai').
urls (list, optional): A URL's to be extract and analyze. Defaults to an empty list. Defaults to None.
text (str, optional): Text to be analyzed. Defaults to None.
system_message (str, optional): A system message that may provide additional context for the analysis. Defaults to None.
prompt (str, optional): A custom prompt for the AI service. If not provided, a default prompt will be used. Defaults to None.
ai_config (dict, optional): Additional configuration parameters for the AI service. Defaults to an empty dictionary.
"""
generated_text = ContentGenerate().generate(pdf_file_path='Your Pdf file-path',
                                           domain='Your Domain URL',
                                           text="your text",
                                           system_message="You are expert in data analysis"
                                           prompt="Analyze the document and provide tha valuable business insight"
                                           ai_service="openai") 

Email Sender

from elsai_agent_hub.tools import EmailSender
EmailSender().send_email(username="xxxx@gmail.com", #Login user mail ID
                      password="<Your APP Password", #Corresponding APP password for login USER mail
                      sender_mail="xxxxx@gmail.com",
                      receiver_mail="yyyyy@gmail.com",
                      subject="Test Mail",
                      content_body="Howdy!")

Sales Pitch Agent

 export LOGIN_MAIL='Your Gmail ID'
 export PASSWORD='Your 16 digit App password'
response = Sales().sales_pitch(pdf_file_path='Your Pdf file-path', #Product Details PDF file path
             csv_file_path='Your prospect CSV file', #Csv file path contains Name, Designation, Mail and Domain, 
             ai_service='azure',
             sender_name="Sender Name",
             sender_designation="Sender Designation",
             attachment='Attachment File path')

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

elsai-agent-hub-0.0.2.tar.gz (26.8 kB view details)

Uploaded Source

File details

Details for the file elsai-agent-hub-0.0.2.tar.gz.

File metadata

  • Download URL: elsai-agent-hub-0.0.2.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for elsai-agent-hub-0.0.2.tar.gz
Algorithm Hash digest
SHA256 52d2dee0e62b204f7f9a6e0b86687cf7925fe0fcfaa46409f3839f832ff037fb
MD5 3a1f4c290f2f5021fe6c46736c8e49b0
BLAKE2b-256 de728150f5827ce25ee1e91a12ab06fe95bd50f8f8b6d8daad1ca1f35a93c554

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