Helicone Community Page

Updated 4 days ago

Setting up Helicone with Litellm for Political Bias Score

Hi, I'm trying to set up helicone to work with litellm. Have the following code:

Plain Text
resp = completion(
        model="azure/gpt-4o-mini",
        messages=[
            {"role": "system", "content": system_prompt},
            {"role": "user", "content": user_prompt}
        ],
        response_format=PoliticalBiasScore,
        fallbacks=["gpt-4o-mini"],
        user="varsity_topstories_scorearticlepoliticalbias",
        metadata={
            "user": "varsity_topstories_scorearticlepoliticalbias",
            "Helicone-Property-User": "varsity_topstories_scorearticlepoliticalbias"
        }
    )


which seems to be hit or miss on if it tags this to a user at all. What is the best way to do this - thank you!
J
d
4 comments
Hi Davis- Can you please remove the Helicone-Property-User?
Gave that a go, this:

Plain Text
resp = completion(
        model="azure/gpt-4o-mini",
        messages=[
            {"role": "system", "content": system_prompt},
            {"role": "user", "content": user_prompt}
        ],
        response_format=PoliticalBiasScore,
        fallbacks=["gpt-4o-mini"],
        user="varsity_topstories_scorearticlepoliticalbias",
        metadata={
            "user": "varsity_topstories_scorearticlepoliticalbias"
        }
    )


still does not show up with any user tags or custom property tags in helicone unfortunately
if its helpful this is the id of the call: 2d75bf1d-dc26-47ab-bc61-65861bc8dffc
Hi Davis - we reached out to the LiteLLM team and we are working with them to resolve this issue. Sorry for the inconvience. Can you please stay tuned for an update
Add a reply
Sign up and join the conversation on Discord