Skip to content

Commit ae178b8

Browse files
committed
add sqlite.org csv
1 parent 4b4665f commit ae178b8

File tree

6 files changed

+1014
-3
lines changed

6 files changed

+1014
-3
lines changed

llama.cpp/embedr/BUILD.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ o/$(MODE)/llama.cpp/embedr/sqlite3.a: o/$(MODE)/llama.cpp/embedr/sqlite3.o
2222
o/$(MODE)/llama.cpp/embedr/sqlite-vec.o: llama.cpp/embedr/sqlite-vec.c
2323
o/$(MODE)/llama.cpp/embedr/sqlite-vec.a: o/$(MODE)/llama.cpp/embedr/sqlite-vec.o
2424

25+
o/$(MODE)/llama.cpp/embedr/sqlite-csv.o: llama.cpp/embedr/sqlite-csv.c
26+
o/$(MODE)/llama.cpp/embedr/sqlite-csv.a: o/$(MODE)/llama.cpp/embedr/sqlite-csv.o
27+
2528
o/$(MODE)/llama.cpp/embedr/sqlite-lembed.o: llama.cpp/embedr/sqlite-lembed.c
2629
o/$(MODE)/llama.cpp/embedr/sqlite-lembed.a: o/$(MODE)/llama.cpp/embedr/sqlite-lembed.o o/$(MODE)/llama.cpp/llama.cpp.a
2730

@@ -38,6 +41,7 @@ o/$(MODE)/llama.cpp/embedr/embedr: \
3841
o/$(MODE)/llama.cpp/embedr/embedr.1.asc.zip.o \
3942
o/$(MODE)/llama.cpp/llama.cpp.a \
4043
o/$(MODE)/llama.cpp/embedr/sqlite3.a \
44+
o/$(MODE)/llama.cpp/embedr/sqlite-csv.a \
4145
o/$(MODE)/llama.cpp/embedr/sqlite-vec.a \
4246
o/$(MODE)/llama.cpp/embedr/sqlite-lembed.a
4347

llama.cpp/embedr/embedr.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "llama.cpp/embedr/sqlite3.h"
66
#include "llama.cpp/embedr/sqlite-vec.h"
77
#include "llama.cpp/embedr/sqlite-lembed.h"
8+
#include "llama.cpp/embedr/sqlite-csv.h"
89
#include "llama.cpp/embedr/shell.h"
910
#include "string.h"
1011
int main(int argc, char ** argv) {
@@ -13,12 +14,20 @@ int main(int argc, char ** argv) {
1314
sqlite3_stmt* stmt;
1415
rc = sqlite3_auto_extension((void (*)())sqlite3_vec_init);
1516
rc = sqlite3_auto_extension((void (*)())sqlite3_lembed_init);
17+
rc = sqlite3_auto_extension((void (*)())sqlite3_csv_init);
18+
FLAGS_READY = 1;
19+
20+
printf(
21+
"llamafile-embed %s, SQLite %s, sqlite-vec=%s, sqlite-lembed=%s\n",
22+
LLAMAFILE_VERSION_STRING,
23+
sqlite3_version,
24+
SQLITE_VEC_VERSION,
25+
SQLITE_LEMBED_VERSION
26+
);
1627

1728
if(argc > 1 && (strcmp(argv[1], "sh") == 0)) {
1829
return mn(argc-1, argv+1);
1930
}
20-
printf("%d\n", argc);
21-
printf("llamafile-embed %s, SQLite %s, sqlite-vec=%s, %d\n", LLAMAFILE_VERSION_STRING, sqlite3_version, SQLITE_VEC_VERSION, LLAMA_FTYPE_MOSTLY_Q4_1);
2231

2332
rc = sqlite3_open(":memory:", &db);
2433
if(rc != SQLITE_OK) {

llama.cpp/embedr/shell.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32587,7 +32587,6 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){
3258732587
#else
3258832588
ShellState data;
3258932589
#endif
32590-
printf("Fuck\n");
3259132590
const char *zInitFile = 0;
3259232591
int i;
3259332592
int rc = 0;

0 commit comments

Comments
 (0)