from mira_network import MiraClientasync 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())
messages = [ {"role": "system", "content": "You are a helpful assistant"}, {"role": "user", "content": "Hi! Can you help me?"},]async with MiraClient(api_key="your-api-key") as client: response = await client.chat_completions_create( model="your-chosen-model", messages=messages )