Skip to content

Latest commit

History

History
85 lines (65 loc) · 2.35 KB

File metadata and controls

85 lines (65 loc) · 2.35 KB
titlePython
descriptionHumiris AI is a library that allows developers to seamlessly integrate Mixture of AI Basic and Advanced into their applications. This library is designed to simplify the process of adding Mixture of AI features and functionalities, making it accessible for developers of all levels.
**Prerequisite**: To install the Humiris AI library, you can use pip, the Python package manager. Ensure you have Python 3.6 or later installed on your system.

Install Humiris Open your terminal or command prompt and run the following command:

pip install humiris_ai
**Prerequisite**: At this step you will need your Mixture Apikey to continue.{" "} How to get my Moai Apikey ?

Importing the Library

After installation, you can import the Humiris library into your Python project:

importhumiris_ai

Basic Usage

fromhumiris_aiimportBasicMoAi, MessageType, BasicPayload# Initialize the MoAi with your API keymoai=BasicMoAi(api_key='your_api_key')
# Create a payload for the AI servicemessages= [
MessageType(role='system', content='You are a helpful assistant that answers questions about technology.'),
MessageType(role='user', content='What is the diference between a microprocessor and a central processing unit?')
]
payload=BasicPayload(
mix_tuning_id='exampleId',
messages=messages,
temperature=0.7,
max_tokens=150
)
# Call the AI serviceresponse=moai.use_basic_mixtuning(payload)
print(response)

Advanced Usage

fromhumiris_aiimportAdvancedMoAi, MessageType, AdvancedPayload# Initialize the MoAi with your API keymoai=AdvancedMoAi(api_key='your_api_key')
# Create a payload for the AI servicemessages= [
MessageType(role='system', content='You are a helpful assistant that answers questions about technology.'),
MessageType(role='user', content='What is the diference between a microprocessor and a central processing unit?')
]
payload=AdvancedPayload(
advanced_mix_tuning_id='exampleId',
messages=messages,
temperature=0.7,
max_tokens=150
)
# Call the AI serviceresponse=moai.use_advanced_mixtuning(payload)
print(response)

Support For any questions or issues, please contact Hilario Houmey at h.hilario@humiris.ai.