Skip to main content

Intelligence/AI services for the Lifsys Enterprise with enhanced max_history_words, efficient history trimming, and improved document processing

Project description

Intelisys: Your Advanced AI Assistant Library

Welcome to Intelisys, a powerful and versatile AI assistant library that provides a unified interface for interacting with various AI models and providers. Intelisys is designed to make AI integration seamless and efficient for developers of all levels.

What's New in Version 0.5.6

  • Enhanced max_history_words functionality for improved conversation management
  • Optimized history trimming for efficient memory usage
  • Improved asynchronous support with better error handling
  • Added support for structured output with OpenAI provider using Pydantic models
  • Expanded reference capabilities, now supporting various document types (PDF, Word, Excel, PowerPoint)
  • Improved performance for long-running conversations

Key Features

  • Multi-provider support (OpenAI, Anthropic, OpenRouter, Groq)
  • Asynchronous operations for improved performance
  • Template-based chat for easy customization
  • Structured output support using Pydantic models (OpenAI only)
  • Image processing capabilities
  • Efficient conversation history management
  • Reference information support from various sources

Installation

Install Intelisys using pip:

pip install intelisys

Quick Start

Here's a simple example to get you started:

from intelisys import Intelisys

# Create an Intelisys instance
ai = Intelisys(provider="openai", model="gpt-4")

# Chat with the AI
response = ai.chat("What is the capital of France?")
print(response)

Advanced Usage

Template-Based Chat

Use templates for more structured interactions:

ai = Intelisys(provider="anthropic", model="claude-3-5-sonnet-20240620")
ai.set_default_template("Explain {{topic}} in simple terms.")
response = ai.template_chat(render_data={"topic": "quantum computing"})
print(response)

Asynchronous Operations

Perform asynchronous chats for improved efficiency:

import asyncio

async def async_chat():
    ai = Intelisys(provider="openai", model="gpt-4", use_async=True)
    response = await ai.chat_async("Discuss the future of AI")
    print(response)

asyncio.run(async_chat())

Structured Output

Get structured responses using Pydantic models (OpenAI only):

from pydantic import BaseModel

class MovieReview(BaseModel):
    title: str
    rating: float
    summary: str

ai = Intelisys(provider="openai", model="gpt-4")
ai.set_output_model(MovieReview)
result = ai.chat("Review the movie 'Inception'")
print(result)  # This will be a MovieReview instance

Reference Information

Provide context to your AI assistant:

ai = Intelisys(provider="openai", model="gpt-4")
ai.reference("https://example.com/article.html")
ai.reference("/path/to/local/document.pdf")
response = ai.chat("Summarize the referenced information")
print(response)

API Reference

For a complete API reference, please refer to our documentation.

Contributing

We welcome contributions to Intelisys! Please see our Contributing Guidelines for more details.

License

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

Changelog

For a detailed list of changes and version history, please refer to the CHANGELOG.md file.

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

intelisys-0.5.6.tar.gz (26.2 kB view hashes)

Uploaded Source

Built Distribution

intelisys-0.5.6-py3-none-any.whl (25.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page