-
-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is currently hard-coded to 10:
openai-to-sqlite/openai_to_sqlite/cli.py
Lines 166 to 187 in a66cfb8
| @cli.command() | |
| @click.argument( | |
| "db_path", | |
| type=click.Path(file_okay=True, dir_okay=False, allow_dash=False), | |
| ) | |
| @click.argument("query") | |
| @click.option( | |
| "--token", | |
| help="OpenAI API key", | |
| envvar="OPENAI_API_KEY", | |
| ) | |
| @click.option( | |
| "table_name", | |
| "-t", | |
| "--table", | |
| default="embeddings", | |
| help="Name of the table containing the embeddings", | |
| ) | |
| def search(db_path, query, token, table_name): | |
| """ | |
| Search embeddings using cosine similarity against a query | |
| """ |
openai-to-sqlite/openai_to_sqlite/cli.py
Lines 215 to 217 in a66cfb8
| results.sort(key=lambda r: r[1], reverse=True) | |
| for id, score in results[:10]: | |
| print(f"{score:.3f} {id}") |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request