From c71fb45b4b124695beb59620c40a880ffa16d1fb Mon Sep 17 00:00:00 2001 From: chrishart0 <64378248+chrishart0@users.noreply.github.com> Date: Sat, 15 Feb 2025 18:12:25 -0500 Subject: [PATCH] Add an example for hitting a model with an API key in the new monitoring docs. --- .../getting-started/advanced-topics/monitoring.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/getting-started/advanced-topics/monitoring.md b/docs/getting-started/advanced-topics/monitoring.md index 2187721..cd6f39d 100644 --- a/docs/getting-started/advanced-topics/monitoring.md +++ b/docs/getting-started/advanced-topics/monitoring.md @@ -90,3 +90,18 @@ $count(data[id in ['gpt-4o', 'gpt-4o-mini']]) = 2 You can test JSONata queries at [jsonata.org](https://try.jsonata.org/) to verify they work with your API response. +## Model Response Testing + +To verify that models can actually process requests, you can monitor the chat completions endpoint. This provides a deeper health check by ensuring models can generate responses. + +```bash +# Test model response +curl -X POST https://your-openweb-instance/api/chat/completions \ + -H "Authorization: Bearer sk-adfadsflkhasdflkasdflkh" \ + -H "Content-Type: application/json" \ + -d '{ + "messages": [{"role": "user", "content": "Respond with the word HEALTHY"}], + "model": "llama3.1", + "temperature": 0 + }' +```