feat(ai): disable request storage via store:false parameter
Some checks failed
CI Code / Check coding style (pull_request) Successful in 1m22s
CI Code / Linux (arch) (pull_request) Failing after 3m12s
CI Code / Check spelling (pull_request) Successful in 1m50s
CI Code / Linux (debian) (pull_request) Failing after 2m52s
CI Code / Linux (ubuntu) (pull_request) Failing after 3m4s
CI Code / Code Coverage (pull_request) Successful in 2m49s
Some checks failed
CI Code / Check coding style (pull_request) Successful in 1m22s
CI Code / Linux (arch) (pull_request) Failing after 3m12s
CI Code / Check spelling (pull_request) Successful in 1m50s
CI Code / Linux (debian) (pull_request) Failing after 2m52s
CI Code / Linux (ubuntu) (pull_request) Failing after 3m4s
CI Code / Code Coverage (pull_request) Successful in 2m49s
Add store:false to AI API requests to prevent OpenAI, Perplexity, and other providers from storing conversation data or using it for training. Both the OpenAI Responses API and Perplexity API support the store parameter to control whether requests are persisted. Setting it to false ensures conversations remain private and are not retained by the provider. Privacy: - Requests are not stored by AI providers - Conversations are not used for model training - Aligns with CProof's privacy-first design
This commit is contained in:
@@ -546,8 +546,9 @@ static gchar*
|
||||
_build_json_payload(AISession* session, const gchar* prompt)
|
||||
{
|
||||
|
||||
/* OpenAI-compatible format with messages array:
|
||||
* {"model": "...", "messages": [...], "stream": false} */
|
||||
/* OpenAI-compatible Responses API format:
|
||||
* {"model": "...", "input": [...], "stream": false, "store": false}
|
||||
* store:false prevents providers from storing/using requests for training */
|
||||
GString* messages_json = g_string_new("");
|
||||
GList* curr = session->history;
|
||||
|
||||
@@ -574,7 +575,7 @@ _build_json_payload(AISession* session, const gchar* prompt)
|
||||
|
||||
auto_gchar gchar* escaped_model = ai_json_escape(session->model);
|
||||
gchar* json_payload = g_strdup_printf(
|
||||
"{\"model\":\"%s\",\"input\":[%s],\"stream\":false}",
|
||||
"{\"model\":\"%s\",\"input\":[%s],\"stream\":false,\"store\":false}",
|
||||
escaped_model, messages_json->str);
|
||||
|
||||
g_string_free(messages_json, TRUE);
|
||||
|
||||
Reference in New Issue
Block a user