HELICONE_API_KEY
export HELICONE_API_KEY=sk-<your-api-key> # You can also set it in your code (See below)
from openai import openai
from helicone.openai_async import openai
from helicone.openai_async import openai, Meta # export HELICONE_API_KEY=sk-<your-api-key> # or ... # from helicone.globals import helicone_global # helicone_global.api_key = "sk-<your-api-key>" x = openai.ChatCompletion.create( model="gpt-4o-mini", messages=[{ "role": "system", "content": "This will be logged" }], max_tokens=512, helicone_meta=Meta( custom_properties={ "age": 25 } ) )
Was this page helpful?