You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/epp/handlers/response_test.go
+57Lines changed: 57 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -51,11 +51,40 @@ const (
51
51
}
52
52
}
53
53
`
54
+
bodyWithCachedTokens=`
55
+
{
56
+
"id": "cmpl-573498d260f2423f9e42817bbba3743a",
57
+
"object": "text_completion",
58
+
"created": 1732563765,
59
+
"model": "meta-llama/Llama-3.1-8B-Instruct",
60
+
"choices": [
61
+
{
62
+
"index": 0,
63
+
"text": " Chronicle\nThe San Francisco Chronicle has a new book review section, and it's a good one. The reviews are short, but they're well-written and well-informed. The Chronicle's book review section is a good place to start if you're looking for a good book review.\nThe Chronicle's book review section is a good place to start if you're looking for a good book review. The Chronicle's book review section",
Copy file name to clipboardExpand all lines: pkg/epp/metrics/metrics.go
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -125,6 +125,17 @@ var (
125
125
[]string{"model_name", "target_model_name"},
126
126
)
127
127
128
+
promptCachedTokens=prometheus.NewHistogramVec(
129
+
prometheus.HistogramOpts{
130
+
Subsystem: InferenceObjectiveComponent,
131
+
Name: "prompt_cached_tokens",
132
+
Help: metricsutil.HelpMsgWithStability("Inference objective prompt cached token count distribution for requests in each model.", compbasemetrics.ALPHA),
133
+
// Most models have a input context window less than 1 million tokens.
0 commit comments