Skip to main content

AIXNet Beta

Overview

AIXNet Beta is a powerful and user-friendly Python package designed to streamline interactions with the OpenAI and Together AI APIs. By offering an intuitive interface, AIXNet allows developers to quickly integrate advanced AI models like OpenAI's GPT and Meta LLaMA into their applications. Whether you're building conversational agents, automated assistants, or just experimenting with AI-driven solutions, AIXNet simplifies the process by requiring only your API key and a well-structured payload to get started.

AIXNet Beta is particularly useful for developers looking to work with cutting-edge AI models without the complexity of directly interfacing with APIs. With support for various models and interactive chat sessions, it's a great solution for anyone seeking to integrate AI seamlessly into their workflows.

Installation

To install the package, use:

pip install aixnet-beta

This will install the latest version of the AIXNet Beta package, making it easy to start using the features immediately.

Usage

Here's a sample usage to demonstrate how easy it is to get started with AIXNet Beta:

# Import
from aixnet_beta.fm import AzureFM

# Initialize the AzureFM object
azure_fm = AzureFM(
    model="meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo",
    api_key="REQUEST_FOR_API_KEY",
    protocol="You are a helpful assistant.")

# Start chat
azure_fm.start_chat()

With the start_chat method, AIXNet allows for a smooth and interactive chat session, where users can engage directly with AI models in a conversational format. The AI model listens to user prompts and responds accordingly. Here’s an example of how the chat session might unfold:

🤖 Start chatting with us! Enter 'EXIT' to quit. 🛑
🧑 Human: tell me a joke
🤖 Bot: A man walked into a library and asked the librarian, "Do you have any books on Pavlov's dogs and Schrödinger's cat?"

The librarian replied, "It rings a bell, but I'm not sure if it's here or not."
🧑 Human: EXIT
🙌 Thank you for using the chatbot! Have a great day! 🌟

Additional Features

AIXNet Beta comes with a number of helpful features for working with AI models. Here are a few of them:

List Models

You can easily list all available models using the list_models() method. This is helpful for developers who need to quickly see what models are supported and choose the best one for their use case.

# List models
azure_fm.list_models()

Expected output:

Available models: ['gpt-3.5-turbo', 'meta-llama/Llama-3-8b-chat-hf', 'meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo']

Managing Conversation History

The AIXNet Beta package also allows for managing conversation history, enabling developers to track the interactions between the user and the model. You can clear, view, or add messages to the history for better control and customization.

Example:

# Add a message to the conversation history
azure_fm.add_message(role="user", content="What is AI?")

This feature can be useful in scenarios where conversation context needs to be preserved or reviewed.

Error Handling

The invoke_api method has built-in error handling that ensures your application won't crash even if something goes wrong during the API request. AIXNet Beta is designed to gracefully manage exceptions and provide informative error messages to help developers quickly debug and resolve issues.

Benefits

  • Simplicity: AIXNet Beta abstracts away the complexities of API requests and payload construction, letting developers focus on building the actual functionality of their applications.
  • Flexibility: Supports multiple AI models, allowing you to experiment with different configurations for various use cases.
  • Interactive Chat: Provides an easy way to start AI-powered conversations, perfect for building chatbots, virtual assistants, or interactive tools.
  • Error-Resilient: With built-in error handling, your application stays robust even when unexpected issues arise.

License

This project is licensed under the MIT License, making it free and open to modification and redistribution. You can freely use it in your own projects, including commercial applications, with minimal restrictions.

Metadata

Release files for aixnet-beta 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aixnet-beta 0.2.5
File Size Uploaded
aixnet_beta-0.2.5.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aixnet-beta 0.2.5
File Interpreter ABI Platform
aixnet_beta-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / aixnet_beta-0.2.5.tar.gz

Download URL aixnet_beta-0.2.5.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
dae43a6ac9069cff90c8ce2aa55fc5bc93901648a106aaf674bc6ab55e64fbd2
BLAKE2b-256 checksum
How to use checksums
9af30ba3b1c1afdf1acb10f5fb87e490d413c418b6ee9ca47f52babbb6a3def9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.1 Windows/10

Release files / aixnet_beta-0.2.5-py3-none-any.whl

Download URL aixnet_beta-0.2.5-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b78834f9f9ea8a8167f28cb6b3433b5cfbf1058461c27cba0825f5fc46d4770
BLAKE2b-256 checksum
How to use checksums
2ba82ed77cd29871d7d4c0c823b4aeeeb44d35b873c6281b8f719a5e85f02290
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.1 Windows/10

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page