Generate Text
Text Generation
Basic Usage
from mira_network import MiraClient
async def generate_text():
async with MiraClient(api_key="your-api-key") as client:
response = await client.chat_completions_create(
model="your-chosen-model",
messages=[
{"role": "user", "content": "What is the capital of France?"}
]
)
print(response["choices"][0]["message"]["content"])Streaming Responses
Multi-turn Conversations
Error Handling
Custom Node Configuration
Message Structure
Last updated