The fastest and most efficient AI inference client for Python. Built with Rust for unmatched performance, outperforming pure Python implementations through native multiprocessing. Supporting OpenAI, Anthropic, Gemini, DeepSeek, Groq, and more.
1from bhumi.base_client import BaseLLMClient, LLMConfig
2import asyncio
3
4async def main():
5 config = LLMConfig(
6 api_key="your-api-key",
7 model="openai/gpt-4o"
8 )
9
10 client = BaseLLMClient(config)
11 response = await client.completion([
12 {"role": "user", "content": "Hello!"}
13 ])
14
15 print(response['text'])
16
17if __name__ == "__main__":
18 asyncio.run(main())