Integrate any custom LLM with Helicone using the Python Manual Logger. Step-by-step guide for Python implementation to connect your proprietary or open-source models.
Install the Helicone helpers package
Set `HELICONE_API_KEY` as an environment variable
Create a new HeliconeManualLogger instance
Define your operation and make the request
request
: A dictionary containing the request parametersoperation
: A callable that takes a HeliconeResultRecorder and returns a resultadditional_headers
: Optional dictionary of additional headersprovider
: Optional provider specification (“openai”, “anthropic”, or None for custom)provider
: Optional provider specification (“openai”, “anthropic”, or None for custom)request
: A dictionary containing the request parametersresponse
: Either a dictionary or string response to logoptions
: A LoggingOptions dictionary with timing informationlog_request
method with time to first token tracking:
send_log
method to manually track time to first token: