summaryrefslogtreecommitdiff
path: root/include/importer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/importer.hpp')
-rw-r--r--include/importer.hpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/importer.hpp b/include/importer.hpp
index cb24cf8..e206204 100644
--- a/include/importer.hpp
+++ b/include/importer.hpp
@@ -18,10 +18,13 @@
#include "administration.hpp"
+#define MAX_MODEL_LIST_RESULT_COUNT 50
+
#define I_ERR_SUCCESS 0
#define I_ERR_FAILED_UPLOAD 1
#define I_ERR_FAILED_QUERY 2
#define I_ERR_FAILED_IMPORT 3
+#define I_ERR_UNIMPLEMENTED 4
typedef uint32_t i_err;
@@ -46,16 +49,29 @@ namespace importer {
status status;
} invoice_request;
+ typedef struct
+ {
+ time_t started_at;
+ i_err error;
+ status status;
+ u32 result_count;
+ char result[MAX_MODEL_LIST_RESULT_COUNT][MAX_LEN_SHORT_DESC];
+ ai_provider service;
+ } model_list_request;
+
typedef struct
{
char* provider_name;
+ char* default_model;
bool (*upload_file)(char* file_path, char* file_id, size_t file_id_len);
bool (*query_with_file)(char* query, size_t query_length, char* file_id, char** response);
+ bool (*get_available_models)(model_list_request* buffer);
} ai_provider_impl;
const char* error_to_string(i_err error);
const char* status_to_string(status status);
- invoice_request* ai_document_to_invoice(char* file_path);
ai_provider_impl get_ai_provider_implementation(ai_provider provider);
+ invoice_request* ai_document_to_invoice(char* file_path);
+ model_list_request* ai_get_available_models(ai_provider service);
} \ No newline at end of file