summaryrefslogtreecommitdiff
path: root/examples/retrieval/retrieval.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/retrieval/retrieval.cpp')
-rw-r--r--examples/retrieval/retrieval.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/retrieval/retrieval.cpp b/examples/retrieval/retrieval.cpp
index eb89d16d..65b19ce7 100644
--- a/examples/retrieval/retrieval.cpp
+++ b/examples/retrieval/retrieval.cpp
@@ -148,11 +148,12 @@ int main(int argc, char ** argv) {
llama_backend_init();
llama_numa_init(params.numa);
- llama_model * model;
- llama_context * ctx;
-
// load the model
- std::tie(model, ctx) = llama_init_from_gpt_params(params);
+ llama_init_result llama_init = llama_init_from_gpt_params(params);
+
+ llama_model * model = llama_init.model;
+ llama_context * ctx = llama_init.context;
+
if (model == NULL) {
fprintf(stderr, "%s: error: unable to load model\n", __func__);
return 1;