diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-10-17 19:02:21 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-10-17 19:02:21 +0200 |
| commit | a8799cfee2de8ac53cc07c571c56ae5d9c98cbbd (patch) | |
| tree | bfbff345e11ce8d75b7a86a611367bdc63c6dcfd /include/importer.hpp | |
| parent | 18b9e47b88ab483b8f6fa0b133519546846fbb5e (diff) | |
model selection for ai service
Diffstat (limited to 'include/importer.hpp')
| -rw-r--r-- | include/importer.hpp | 18 |
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 |
