| 1 |
#@require-env GRN_LANGUAGE_MODEL_DOWNLOAD_CACHE_DIR |
| 2 |
#@require-feature llama.cpp |
| 3 |
|
| 4 |
plugin_register functions/language_model |
| 5 |
plugin_register functions/vector |
| 6 |
|
| 7 |
table_create Data TABLE_NO_KEY |
| 8 |
column_create Data text COLUMN_SCALAR ShortText |
| 9 |
|
| 10 |
load --table Data |
| 11 |
[ |
| 12 |
{"text": "I am a king."}, |
| 13 |
{"text": "I am a queen."} |
| 14 |
] |
| 15 |
|
| 16 |
#@timeout 60 |
| 17 |
#@read-timeout 30 |
| 18 |
select Data \ |
| 19 |
--output_columns ' \ |
| 20 |
text, \ |
| 21 |
vector_size(language_model_vectorize("hf:///groonga/multilingual-e5-base-Q4_K_M-GGUF", text, {}))' |