Helicone Community Page

a
ayoKho
Offline, last seen 2 weeks ago
Joined August 29, 2024
Sorry if I was unclear - this is what I meant. It should be the difference between those two columns
4 comments
D
a
Are you an admin in your org?
4 comments
h
a
at its core, yes, Helicone is exactly that! What are things in our documentation that you are unclear about? Happy to explain or help you through anything.

additionally, if you want to explain your use-case or questions in person, feel free to book some time with us here:

https://calendly.com/d/x5d-9q9-v7x/helicone-discovery-call?month=2024-01
1 comment
B
hi @abe , that package is good to go. docs for it are here: https://docs.helicone.ai/getting-started/integration-method/openai

although its worth noting, caching won't be available for it. that feature is only on our proxy implementation. here is a comparison: https://docs.helicone.ai/getting-started/proxy-vs-async
12 comments
J
a
a
hi Abe! thanks for signing up. I can diagnose this for you. what email did you sign up with?
33 comments
a
a
Hi Shardul!

1/3. We advise most of our users to transition to an enterprise plan after the reach their 2GB storage ceiling. We can hop on a call to discuss what this plan might look like for your specific use-case!
  1. Changing any parameter will count as a unique request. If this requests comes in again with the same parameters, it will be a cache hit.
2 comments
a
S
hey Matt! This is an example code snippet to get the data for the last x hours. Feel free to change up the query slightly to fit your limit and filter

Plain Text
import requests
from datetime import datetime, timedelta

# Calculate the ISO string for one hour ago
one_hour_ago_iso = (datetime.utcnow() -
                    timedelta(hours=1)).isoformat() + "Z"

# Define the GraphQL endpoint (replace with your actual endpoint)
url = "https://www.helicone.ai/api/graphql"

# Define the GraphQL query and variables
query = """
query ExampleQuery($limit: Int, $offset: Int, $timeStampISO: String){
  heliconeRequest(
      limit: $limit
      offset: $offset
      filters: [
        {
          createdAt: {
            gte: $timeStampISO
          }
        }
      ]
  ) {
      prompt
      properties{
        name
      }
      responseBody
      response
  }
}
"""


MAX_LOOPS = 1000
PAGE_SIZE = 100
all_data = []
for i in range(MAX_LOOPS):
    print("Loop", i)
    variables = {
        "limit": PAGE_SIZE,
        "offset": PAGE_SIZE * i,
        "timeStampISO": one_hour_ago_iso
    }

    # Define headers with Authorization
    headers = {
        "Authorization": "Bearer <KEY>",
        "Content-Type": "application/json"
    }

    # Send the request with headers
    response = requests.post(
        url, json={'query': query, 'variables': variables}, headers=headers)

    # Check if the request was successful
    if response.status_code == 200:
        data = response.json()['data']['heliconeRequest']
        all_data.extend(data)
        print("Success!")
        if (len(data) < PAGE_SIZE):
            break
    else:
        print("Error:", response.status_code)
        print(response.text)


print(len(all_data))
10 comments
a
m