This commit is contained in:
2025-05-26 09:43:39 -04:00
parent aeae900cae
commit 1b8213a92e
3 changed files with 45 additions and 20 deletions

View File

@@ -36,7 +36,7 @@ def embed(text, input_type):
return resp.embeddings.float[0]
def search():
query = 'sex'
query = 'caves locations in bath county'
query_embedding = embed(query, 'search_query')
rows = conn.execute('SELECT * FROM embeddings ORDER BY embedding <=> %s::vector LIMIT 5', (query_embedding,)).fetchall()