Helicone Community Page

Updated 3 months ago

Requests work but do not show up in web console

I'm using the Proxy configuration to send OpenAI requests to Helicone using HTTP. The prompt responses are returned successfully, but the requests are not logged anywhere in the web console.

The requests are for the gpt-4-vision-preview model and contain an image.

I'm using this Kotlin library to send the requests: https://github.com/aallam/openai-kotlin

Here's the code snippet:

Plain Text
 private val openAI = OpenAI(
        token = "xxx",
        host = OpenAIHost(baseUrl = "https://oai.hconeai.com/v1/"),
        headers = mapOf("Helicone-Auth" to "xxx")
    )

    override suspend fun prompt(image: ByteArray, text: String, userId: String?): String {
        val encoded = image.encodeBase64()
        val request = chatCompletionRequest {
            model = ModelId("gpt-4-vision-preview")
            messages {
                system {
                    content = text
                }
                user {
                    content {
                        image("data:image/jpeg;base64,$encoded", detail = "Screenshot")
                    }
                }
            }
            maxTokens = 500
            userId?.let { [email protected] = it }
        }
        val response = openAI.chatCompletion(request)
        val content = response.choices.first().message.content.orEmpty()
        return content
    }
C
c
4 comments
Hi, this is likely a configuration issue with that specific library. Are you able to share with me what the request looks like once built?

I suspect 1 of 2 possibilities:
  1. You're hitting Helicone but don't have auth correctly set, so we are not logging it
  2. You're not hitting Helicone and the host is being ignored and you're going directly to OpenAI
Hi, I checked the request and it seems to be hitting the Helicone url and include the auth header.

I have also tried to generate another key and use that, still nothing shows up in the web dashboard.
Attachment
image.png
Okay my bad, I just noticed that I am missing the Bearer prefix in the header πŸ˜„
No problem! Glad it works now 😁 Let me know if you have any other questions.
Add a reply
Sign up and join the conversation on Discord