Skip to content

Commit ceb005b

Browse files
committed
Update main.cpp
1 parent 432ff23 commit ceb005b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/prediction-next-token/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const char * Utf8FromUtf16(const wchar_t * wstr) {
3737
return buffer; // caller должен вызвать free()
3838
}
3939

40-
int wmain(int argc, wchar_t * argv[]) {
40+
static int wmain(int argc, wchar_t * argv[]) {
4141
SetConsoleOutputCP(CP_UTF8);
4242
SetConsoleCP(CP_UTF8);
4343
// Установка значений по умолчанию
@@ -84,7 +84,7 @@ int wmain(int argc, wchar_t * argv[]) {
8484
// 2) context
8585
llama_context_params ctx_params = llama_context_default_params();
8686
ctx_params.n_ctx = 512;
87-
llama_context * ctx = llama_init_from_model(model, ctx_params);
87+
llama_context * ctx = llama_new_context_with_model(model, ctx_params);
8888
if (!ctx) {
8989
fprintf(stderr, "failed to create context\n");
9090
llama_model_free(model);

0 commit comments

Comments
 (0)