This release is a pre-release and may not be stable for production use.
WORK IN PROGRESS | PLEASE DO NOT USE YET !!
I am still working on this, I don't have the package built yet, I recommend not to use this yet. I haven't tested it thoroughly, and will most probably break.
Ethina
Ethina is a powerful Python package that provides a unified interface for interacting with various Language Model (LLM) providers such as OpenAI, Anthropic, AWS Bedrock, Azure AI, Azure OpenAI, Google, and Ollama.
Features
- Unified API for multiple LLM providers
- Supports both streaming and non-streaming responses
- Easy-to-use client generation
- Consistent input and output formats across providers
- Customizable parameters for LLM interactions
Installation
To install Ethina, use pip:
pip install ethina
Quick Start
Here's a quick example using Azure OpenAI:
from ethina import AzureOpenAIClient, AzureOpenAIChat
# Create client
provider_keys = {
"base": "https://your-resource-name.openai.azure.com/",
"api_key": "your-api-key",
"api_version": "2024-05-01-preview"
}
client = AzureOpenAIClient(provider_keys)
# Create chat object
chat = AzureOpenAIChat(client)
# Prepare input data
input_data = {
"model": "your-deployment-name",
"messages": [
{"role": "user", "content": "What is Ethina?"}
],
"max_tokens": 800,
"temperature": 0.7
}
# Generate response
response = chat.generate(input_data)
print(response)
Supported Providers
- OpenAI
- Azure OpenAI
- Anthropic
- AWS Bedrock
- Azure AI
- Ollama
Documentation
For detailed usage instructions and API reference, please refer to the documentation.
Contributing
We welcome contributions! Please see our Contributing Guide for more details.
License
This project is licensed under the MIT License - see the LICENSE file for details.
This version includes a more structured format, consistent code block styles, and links placeholders for documentation and contributing guide. Adjust the links as needed based on your actual documentation and contributing guide URLs.
Metadata
Release files for ethina 0.1a0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ethina-0.1a0.tar.gz | 7.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ethina-0.1a0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.7 kB
Release files / ethina-0.1a0.tar.gz
| Download URL | ethina-0.1a0.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
affd7cc34cffb63c49457b9c96daa36806486ba307f38d0e7cc118d7aa736d9b
|
|
BLAKE2b-256 checksum How to use checksums |
a82675b46b324fe2ce55039736c7a81348325c2b62d28577b19cc9646d78d158
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / ethina-0.1a0-py3-none-any.whl
| Download URL | ethina-0.1a0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd17f0423baadac5d8dc0ad7fab72be590bbf948e2588128e5acb0e2b9171ab7
|
|
BLAKE2b-256 checksum How to use checksums |
8ef945b36f5a895bcceae14a08806c2135a368e8ff64da7b2f9cb63df67225b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|