A lightweight client wrapper for OpenAI-compatible chat APIs with streaming, tool calls, and simple cost tracking.
- Copy
src/llm_client/clients/openai_client.pyinto your project - Create a configuration file based on
src/llm_client/conf/llm.example.yaml - Update the config with your API endpoint and key
from llm_client import OpenAIClient
client = OpenAIClient()
messages = [{"role": "user", "content": "Say hi!"}]
print(client.send_messages(messages, model="deepseek"))