Skip to content

Commit 5ce7bbb

Browse files
committed
update
1 parent eadd5df commit 5ce7bbb

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

articles/ai-services/openai/concepts/content-filter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ data: [DONE]
982982
```
983983
984984
> [!IMPORTANT]
985-
> When content filtering is triggered for a prompt and a `"status": 400` is received as part of the response there may be a charge for this request as the prompt was evaluated by the service. [Charges will also occur](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/) when a `"status":200` is received with `"finish_reason": "content_filter"`. In this case the prompt did not have any issues, but the completion generated by the model was detected to violate the content filtering rules which results in the completion being filtered.
985+
> When content filtering is triggered for a prompt and a `"status": 400` is received as part of the response there will be a charge for this request as the prompt was evaluated by the service. [Charges will also occur](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/) when a `"status":200` is received with `"finish_reason": "content_filter"`. In this case the prompt did not have any issues, but the completion generated by the model was detected to violate the content filtering rules which results in the completion being filtered.
986986
987987
## Best practices
988988

articles/ai-services/openai/faq.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,15 @@ sections:
113113
How do I fix InternalServerError - 500 - Failed to create completion as the model generated invalid Unicode output?
114114
answer:
115115
You can minimize the occurrence of these errors by reducing the temperature of your prompts to less than 1 and ensuring you're using a client with retry logic. Reattempting the request often results in a successful response.
116+
- question: |
117+
We noticed charges associated with API calls that failed to complete with status code 400. Why is failed called generating a charge?
118+
answer:
119+
If the service performs processing, you will be charged even if the status code is not successful (not 200).
120+
Common examples of this are, a 400 error due to a content filter or input limit, or a 408 error due to a timeout. Charges will also occur when a `status 200` is received with a `finish_reason` of `content_filter`.
121+
In this case the prompt did not have any issues, but the completion generated by the model was detected to violate the content filtering rules which results in the completion being filtered.
122+
123+
If the service doesn't perform processing, you won't be charged.
124+
For example, a 401 error due to authentication or a 429 error due to exceeding the Rate Limit.
116125
117126
- name: Getting access to Azure OpenAI Service
118127
questions:

0 commit comments

Comments
 (0)