16 lines
372 B
Python
16 lines
372 B
Python
import json
|
|
from db import get_connection_from_env, ensure_table, save_embedding
|
|
|
|
|
|
def main():
|
|
conn = get_connection_from_env()
|
|
ensure_table(conn)
|
|
sample_embedding = [0.01, 0.02, 0.03]
|
|
row_id = save_embedding(conn, "db_test_user", json.dumps(sample_embedding))
|
|
print("Inserted row id:", row_id)
|
|
conn.close()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|