| title | Python |
|---|---|
| description | Humiris 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. |
Install Humiris Open your terminal or command prompt and run the following command:
pip install humiris_aiImporting the Library
After installation, you can import the Humiris library into your Python project:
importhumiris_aiBasic 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.