billxue
billxue
CDCloudflare Developers
Created by billxue on 1/2/2024 in #general-help
AI Gateway GraphQL to retrieve tokens cost, request & response.
Hello! I'm trying AI Gateway to log the token cost. I followed the guide https://developers.cloudflare.com/ai-gateway/get-started/configuring-settings/ to use GraphQL. However, the graphql query only responses like:
{"data":{"viewer":{"accounts":[{"requests":[{"count":2,"dimensions":{"gateway":"mygateway","model":"gpt-3.5-turbo-0613","provider":"openai","ts":"2024-01-02T01:05:00Z"}}]}]}},"errors":null}
{"data":{"viewer":{"accounts":[{"requests":[{"count":2,"dimensions":{"gateway":"mygateway","model":"gpt-3.5-turbo-0613","provider":"openai","ts":"2024-01-02T01:05:00Z"}}]}]}},"errors":null}
How to retrieve more detailed logs using GraphQL? Where to find the schema for GraphQL?
2 replies