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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file intelisys-0.5.6.tar.gz
.
File metadata
- Download URL: intelisys-0.5.6.tar.gz
- Upload date:
- Size: 26.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1da6d727a49f6f07930217209efe95ffdac7bb9e0b0a930db31e0c8bad0a9c5a |
|
MD5 | 4aefa3facef3c49b7984f5bb03d922ad |
|
BLAKE2b-256 | 4387cfd26ac49dbd039b6f4eedc7a8e9b145a2951a9fd50731d16265fc4a073d |
File details
Details for the file intelisys-0.5.6-py3-none-any.whl
.
File metadata
- Download URL: intelisys-0.5.6-py3-none-any.whl
- Upload date:
- Size: 25.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9085c588dde0426eeb48f73cc927175ab0a631ba884e7f30f6f4b44f64d53775 |
|
MD5 | cbb372c6e1163f5e978c19ef4e089d12 |
|
BLAKE2b-256 | 1ff81fa0e98fd374e7169eb81728960df8f0d513a7d08bb05c4ba64edc23abf9 |