🛠️Installation
Easily install Solaira from PyPI using pip install for quick integration into your projects.
Install Solaira directly from PyPI:
pip install git+https://github.com/solairaai/solaira.git
API Key
To use Solaira, you need a DeepSeek AI API key. Obtain your API key from DeepSeek AI and configure it in your project.
⚠️ Note: Solaira is not affiliated with DeepSeek AI but uses it as a base AI for its agents.
Usage Examples
Synchronous Example
from solaira import Solaira
# Initialize the Solaira client
api = Solaira(api_key="your_deepseek_api_key")
# Call the API endpoint synchronously
response = api.call_endpoint(
text="Analyze Solana wallet activity",
chain="solana",
deep_mode=True,
max_tokens=500,
temperature=0.7,
stream=False
)
# Print the response
print("Response Data:", response.data)
print("Metadata:", response.metadata)
Asynchronous Example
import asyncio
from solaira import SolairaAsync
async def main():
# Initialize the Solaira async client
api = SolairaAsync(api_key="your_deepseek_api_key")
# Call the API endpoint asynchronously
response = await api.call_endpoint(
text="Predict market trends for Solana",
chain="solana",
deep_mode=False,
max_tokens=500,
temperature=0.7,
stream=False
)
# Print the response
print("Response Data:", response.data)
print("Metadata:", response.metadata)
# Run the async function
asyncio.run(main())
Configuration ⚙️
api_key: Your DeepSeek AI API key.
chain: Blockchain to interact with (e.g., solana, ethereum).
deep_mode: Enable deeper analysis (default: False).
max_tokens: Control the length of the response (default: 500).
temperature: Adjust the creativity of the AI's response (default: 0.7).
stream: Enable streaming for real-time outputs (default: False).
Last updated