summaryrefslogtreecommitdiff
path: root/src/providers/openAI.cpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrik@mailbox.org>2026-01-12 17:01:55 +0100
committerAldrik Ramaekers <aldrik@mailbox.org>2026-01-12 17:01:55 +0100
commit6605cba2d6dc66cb4bf96fac21b32b903ea1a1b3 (patch)
treedc4eae8fdc79c87e7f0462429e389e40681204bc /src/providers/openAI.cpp
parent6d1c29533ab455dabe7e7b4f0dd31d5a11f02048 (diff)
refactoringsHEADmaster
Diffstat (limited to 'src/providers/openAI.cpp')
-rw-r--r--src/providers/openAI.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/providers/openAI.cpp b/src/providers/openAI.cpp
index 5659465..04981d1 100644
--- a/src/providers/openAI.cpp
+++ b/src/providers/openAI.cpp
@@ -26,7 +26,7 @@
static bool _openAI_batch_query_with_file(const char** queries, size_t query_count, const char* file_id, invoice* buffer, importer::batch_query_response_handler response_handler)
{
- const char *api_key = administration::get_active_ai_service().api_key_public;
+ const char *api_key = administration::get_active_ai_service().api_key;
httplib::SSLClient cli("api.openai.com", 443);
thrd_t threads[20];
@@ -96,7 +96,7 @@ static bool _openAI_batch_query_with_file(const char** queries, size_t query_cou
static bool _openAI_query_with_file(const char* query, size_t query_length, const char* file_id, char** response)
{
- const char *api_key = administration::get_active_ai_service().api_key_public;
+ const char *api_key = administration::get_active_ai_service().api_key;
httplib::SSLClient cli("api.openai.com", 443);
//cli.enable_server_certificate_verification(false);
@@ -135,7 +135,7 @@ static bool _openAI_query_with_file(const char* query, size_t query_length, cons
static bool _openAI_upload_file(const char* file_path, char* file_id, size_t file_id_len)
{
- const char *api_key = administration::get_active_ai_service().api_key_public;
+ const char *api_key = administration::get_active_ai_service().api_key;
const char *filename = strops::get_filename(file_path);
FILE* orig_file = fopen(file_path, "rb");
@@ -237,7 +237,7 @@ static bool _openAI_upload_file(const char* file_path, char* file_id, size_t fil
static bool _openAI_get_available_models(importer::model_list_request* buffer)
{
- const char *api_key = administration::get_active_ai_service().api_key_public;
+ const char *api_key = administration::get_active_ai_service().api_key;
httplib::SSLClient cli("api.openai.com", 443);