Quickstart
Quick Start Guide
Basic Chat Completion
from mira_network import MiraClient
async def main():
async with MiraClient(api_key="your-api-key") as client:
response = await client.chat_completions_create(
model="gpt-4o", # You can choose any available model of your choice
messages=[
{"role": "user", "content": "What is the capital of France?"}
]
)
print(response["choices"][0]["message"]["content"])
if __name__ == "__main__":
import asyncio
asyncio.run(main())Streaming Responses
Managing Conversations
Error Handling
Next Steps
Last updated