Proxy Integration
Python SDK
1
2
Set API keys as environment variables
3
Install required packages
Ensure you have the necessary packages installed in your Python environment:
4
Import libraries
5
Initialize Vertex AI with Helicone
6
Initialize the model and generate content
Manual Logging with Log Builder
For more control over logging, especially with asynchronous and streaming responses, you can use the Helicone Manual Logger:1
Install additional required packages
2
Create a log builder example
This example demonstrates using the Helicone log builder with both async and streaming responses:
3
Create the HeliconeManualLogger helper
Create a file named
helicone_helpers.py
with the following content:- Precise control over what gets logged
- Support for both async and streaming responses
- Ability to add custom properties and metadata
- Manual control over when logs are sent