You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -161,11 +161,11 @@ func _ready():
161
161
db.calibrate_embedding_size()
162
162
```
163
163
164
-
5. Create tables based on the metadata, By default, 3 table are created:
164
+
5. Create tables based on the metadata, By default, these table are created:
165
165
166
166
*`llm_table_meta`: which store the metadata for a particular id
167
167
*`llm_table`: store texts with metadata and embedding
168
-
*`llm_table_virtual`: a table for embedding similarity computation
168
+
*Some tables with names containing `llm_table_virtual`: tables for embedding similarity computation
169
169
170
170
Note that your `.meta` property should always match the metadata columns in the database before any storing or retrieving operation, consider setting your `.meta` property within the `_ready()` function or within the inspector.
171
171
@@ -398,9 +398,9 @@ Besides the functions and signals from GDEmbedding, LlmDB has a few more functio
398
398
*`open_db()`: create a `dB_File` at `dB_Dir` if the file doesn't exist, then connect to the database
399
399
*`close_db()`: terminate the connection to the database
400
400
*`execute(statement: String)` execute an sql statement, turn on `Verbose stdout` in `Project Settings` to see the log generated by this statement
401
-
*`create_llm_tables()`: create a table with name `Table Name` if the table doesn't exist, and two addtional `Table Name` + `_meta`and `Table Name` + `_virtual` tables
401
+
*`create_llm_tables()`: create a table with name `Table Name` if the table doesn't exist, a `Table Name` + `_meta`table to store pre-defined metadata by `id`, and some `_virtual` tables to
402
402
*`drop_table(p_table_name: String)`: drop a table with a specific name
403
-
*`drop_llm_tables(p_table_name: String)`: drop all three tables created by `create_llm_tables()`, where`p_table_name` is the `Table Name` when the creation function is called
403
+
*`drop_llm_tables(p_table_name: String)`: drop all tables (except the `sqlite_sequence` table which is created automatically for autoincrement) created by `create_llm_tables()`, i.e.,`p_table_name`, `p_table_name` + `_meta` and every table with a name containing `p_table_name` + `_virtual`
404
404
*`has_table(p_table_name: String) -> bool`: whether a table with this name exists
405
405
*`is_table_valid(p_table_name: String) -> bool`: whether the table contains valid metadata, i.e., all elements in `.meta` properties exist in the table and the data types are correct
406
406
*`store_meta(meta_dict: Dictionary)`: store a set of meta data to table `Table Name` + `_meta` with `id` as the primary key, such that you can call `store_text_by_id` by id instead of inputting the full metadata dictionary through `store_text_by_meta`
0 commit comments