Example: basic chat
python
import asyncio
import os
from air import AIR
from air.providers.groq import GroqProvider
async def main():
air = AIR()
air.add_provider(GroqProvider(api_key=os.environ["GROQ_API_KEY"], model="llama-3.3-70b-versatile"))
response = await air.chat("What is the capital of France?")
print(response.content)
print("answered by:", response.provider, response.model)
if __name__ == "__main__":
asyncio.run(main())air.chat("...") with a single provider registered always uses that provider directly; there is nothing to fall back to. See multiple-providers.md for more than one provider.