14,954
edits
No edit summary |
|||
| (10 intermediate revisions by the same user not shown) | |||
| Line 124: | Line 124: | ||
} | } | ||
</pre> | </pre> | ||
=== How to fix "API Error (HTTP 400): Encrypted content is not supported with this model" === | |||
Error message: API Error (HTTP 400): Encrypted content is not supported with this model. | |||
<pre> | |||
Error!: API Error (HTTP 400): { | |||
"error": { | |||
"message": "Encrypted content is not supported with this model.", | |||
"type": "invalid_request_error", | |||
"param": "include", | |||
"code": null | |||
} | |||
} | |||
</pre> | |||
Solution: | |||
# This error occurs when using the `include` parameter (e.g., for prompt caching or encrypted content) with a model that does not support it. GPT-4.1 does not support encrypted/included content in this way. | |||
# Remove or omit the `include` parameter from your API request payload. | |||
# Alternatively, switch to a model that supports this feature, such as reasoning models like GPT-5.2 or later. | |||
# See more details on OpenAI's model documentation: https://platform.openai.com/docs/models | |||
=== How to fix "Invalid parameter: 'response_format' of type 'json_object' is not supported with this model" === | === How to fix "Invalid parameter: 'response_format' of type 'json_object' is not supported with this model" === | ||
| Line 146: | Line 167: | ||
Solution: | Solution: | ||
* The model "gpt-4" was not supported. Need to use model of {{kbd | key=gpt-3.5-turbo-1106}} or {{kbd | key=gpt-4-1106-preview}} <ref>[https://github.com/openai/openai-python/issues/887 response_format error · Issue #887 · openai/openai-python]</ref><ref>[https://platform.openai.com/docs/api-reference/chat/create API Reference - OpenAI API]</ref><ref>[https://community.openai.com/t/openai-api-guide-using-json-mode/557265/1 🛡️ OpenAI API Guide: Using JSON Mode - API - OpenAI Developer Forum]</ref>. | * The model "gpt-4" was not supported. Need to use model of {{kbd | key=gpt-3.5-turbo-1106}} or {{kbd | key=gpt-4-1106-preview}} or {{kbd | key=gpt-4o}} <ref>[https://github.com/openai/openai-python/issues/887 response_format error · Issue #887 · openai/openai-python]</ref><ref>[https://platform.openai.com/docs/api-reference/chat/create API Reference - OpenAI API]</ref><ref>[https://community.openai.com/t/openai-api-guide-using-json-mode/557265/1 🛡️ OpenAI API Guide: Using JSON Mode - API - OpenAI Developer Forum]</ref>. | ||
<pre> | <pre> | ||
| Line 427: | Line 448: | ||
Explanation: The backslash {{kbd | key=<nowiki>\</nowiki>}} at the end of each line indicates that the command is not yet finished and will continue on the next line. Ensure that there are no extra characters or commands after the -d parameter or any other parameters to avoid similar errors. | Explanation: The backslash {{kbd | key=<nowiki>\</nowiki>}} at the end of each line indicates that the command is not yet finished and will continue on the next line. Ensure that there are no extra characters or commands after the -d parameter or any other parameters to avoid similar errors. | ||
=== | === Force Traditional Chinese Output === | ||
* | * Add #zh-TW before your question <ref>[https://learntech.tw/chatgpt-traditional-chinese/ ChatGPT: How to Force Traditional Chinese Output | Learn Technology, Save Time - Learn Technology]</ref> | ||
* | * Or say "Use Traditional Chinese commonly used in Taiwan" | ||
<pre> | <pre> | ||
``` | ``` | ||
Use Traditional Chinese commonly used in Taiwan: | |||
Rules | |||
- | - Use full-width punctuation marks and add spaces between Chinese and English text. | ||
- | - Below is a common AI terminology correspondence table (English -> Traditional Chinese): | ||
* Transformer -> Transformer | * Transformer -> Transformer | ||
* Token -> Token | * Token -> Token | ||
| Line 446: | Line 467: | ||
* AI Agent -> AI 代理 | * AI Agent -> AI 代理 | ||
* AGI -> 通用人工智慧 | * AGI -> 通用人工智慧 | ||
- | - The following is a table of common Taiwanese terms (English -> Traditional Chinese): | ||
* create -> 建立 | * create -> 建立 | ||
* quality -> 質量 | * quality -> 質量 | ||
| Line 487: | Line 508: | ||
</pre> | </pre> | ||
== Further reading == | == Further reading == | ||
* [[ChatGPT prompts]] | * [[AI Prompt Engineering]] ([[ChatGPT prompts#How to improve the prompt design | How to improve the prompt design]]) | ||
* [https://help.openai.com/en/collections/3780021-general-top-faq General Top FAQ | OpenAI Help Center] | * [https://help.openai.com/en/collections/3780021-general-top-faq General Top FAQ | OpenAI Help Center] | ||
* [https://help.openai.com/en/collections/3675931-openai-api#api-error-codes-explained OpenAI API | OpenAI Help Center] | * [https://help.openai.com/en/collections/3675931-openai-api#api-error-codes-explained OpenAI API | OpenAI Help Center] | ||
| Line 497: | Line 520: | ||
* [https://platform.openai.com/docs/guides/error-codes Error codes - OpenAI API] | * [https://platform.openai.com/docs/guides/error-codes Error codes - OpenAI API] | ||
* [https://errerrors.blogspot.com/2024/07/openai-batch-api-troubleshooting.html OpenAI Batch API 常見技術問題排除] | * [https://errerrors.blogspot.com/2024/07/openai-batch-api-troubleshooting.html OpenAI Batch API 常見技術問題排除] | ||
* [https://platform.openai.com/docs/guides/production-best-practices Production best practices - OpenAI API] | |||
== References == | == References == | ||