summaryrefslogtreecommitdiff
path: root/src/ai_providers
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai_providers')
-rw-r--r--src/ai_providers/DeepSeek.cpp2
-rw-r--r--src/ai_providers/openAI.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/ai_providers/DeepSeek.cpp b/src/ai_providers/DeepSeek.cpp
index ede31f8..c34e299 100644
--- a/src/ai_providers/DeepSeek.cpp
+++ b/src/ai_providers/DeepSeek.cpp
@@ -24,7 +24,7 @@
#define QUERY_BUFFER_SIZE 1000000
char* query_buffer = 0;
-static bool _DeepSeek_query_with_file(char* query, size_t query_length, char* file_id, char** response)
+static bool _DeepSeek_query_with_file(const char* query, size_t query_length, char* file_id, char** response)
{
(void)file_id;
(void)query_length;
diff --git a/src/ai_providers/openAI.cpp b/src/ai_providers/openAI.cpp
index 3e5104d..d1495dc 100644
--- a/src/ai_providers/openAI.cpp
+++ b/src/ai_providers/openAI.cpp
@@ -24,7 +24,7 @@
#include "logger.hpp"
#include "importer.hpp"
-static bool _openAI_batch_query_with_file(char** queries, size_t query_count, char* file_id, invoice* buffer, importer::batch_query_response_handler response_handler)
+static bool _openAI_batch_query_with_file(const char** queries, size_t query_count, char* file_id, invoice* buffer, importer::batch_query_response_handler response_handler)
{
const char *api_key = administration::get_ai_service().api_key_public;
httplib::SSLClient cli("api.openai.com", 443);
@@ -94,7 +94,7 @@ static bool _openAI_batch_query_with_file(char** queries, size_t query_count, ch
return 1;
}
-static bool _openAI_query_with_file(char* query, size_t query_length, char* file_id, char** response)
+static bool _openAI_query_with_file(const char* query, size_t query_length, char* file_id, char** response)
{
const char *api_key = administration::get_ai_service().api_key_public;
@@ -102,7 +102,7 @@ static bool _openAI_query_with_file(char* query, size_t query_length, char* file
//cli.enable_server_certificate_verification(false);
char* query_escaped = strops::prep_str_for_json(query, query_length);
- memops::unalloc(query);
+ //memops::unalloc(query);
size_t body_size = query_length + 200;
char* body = (char*)memops::alloc(body_size);