Troubleshooting of OpenAI API: Difference between revisions

Jump to navigation Jump to search
m
 
(5 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 489: Line 510:




=== How to Solve AI Forgetting Training Content ===
📝 Inquiry:
<pre>
I'd like to ask a follow-up question: If we adopt a "layer-by-layer prompt optimization" approach to improve AI performance, might we encounter the following situation: After multiple rounds of prompt optimization, the AI does learn the relevant skills and performs well, but after some time, it forgets these trained capabilities?
I want to understand whether current mainstream AI model platforms all have stable memory retention capabilities - that is, can they continuously remember the training prompts and guidance we've previously provided?
Sometimes I feel that AI's memory seems unstable. During the same project, content and requirements that I've already explained to the AI in detail need to be re-explained from scratch after a while, which makes me question the continuity of AI learning.
</pre>
💬 Response:
Indeed, early AI models, due to shorter context window limitations, were prone to drifting from their original settings. When I encounter such situations, I usually choose to start a completely new conversation and restart the entire interaction process.
Current AI models should have significant improvements in this regard. If this conversation's results are satisfactory, I suggest you can give the AI an instruction to summarize and consolidate the entire conversation process, integrating the accumulated interaction principles and experiences from the dialogue into the initial prompt:
<pre>
Assuming I want to start a new conversation to discuss the same topic, please suggest what complete prompt I should use.
This prompt needs to include important content from our entire discussion process:
(1) The core problems and objectives that the original prompt aimed to solve
(2) Important aspects and details related to the original problem that the initial solution method didn't fully consider
</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 525: 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 ==

Navigation menu