CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 03:38:32 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"2496bf3bbfffbe920530161cfb7ebbec"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com github.githubassets.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com marketplace-screenshots.githubusercontent.com/ copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=gHtsbNm3WGV7S8%2BChdZE%2F07mKvgjUOIq%2BQzs%2BAqEqgLjD4Uc0gDaSJN5RDzPylML7dKzVvZiSKewR8yVBK7ptWCEYDmD2l4u1gvHym%2FFW1AEwtzXWyhDCwUm9CewFpPerixlzUUQZ0OmdX0CsoDBc%2Bj%2F4folNNcr01RKwMXtvx3c1cP6QEu6r4a0GOpCmp3%2FSVTjSaIsIDJzuiPQ22gsOv7UqBg1pOCOcsJYcldFR%2Bzjxs%2Fl98SGjfrYNeoOybxXzFvNW5fhls4KjrRXyDBUzQ%3D%3D--qeXvoJdtWsJ5wzpu--y%2BpjW7jZrAqn%2FoeafGpEcg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.328897492.1760153911; Path=/; Domain=github.com; Expires=Sun, 11 Oct 2026 03:38:31 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 11 Oct 2026 03:38:31 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: B2FE:2994BB:25EF3D:37D118:68E9D137
results.txt · GitHub
Show Gist options
Save simonw/fdc1b48b20a99714200f5d3970b1dff4 to your computer and use it in GitHub Desktop.
{{ message }}
Instantly share code, notes, and snippets.
simonw/results.txt Secret
Created
March 27, 2025 19:58
-
Star
0
(0)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
Save simonw/fdc1b48b20a99714200f5d3970b1dff4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "llm/cli.py:1776", | |
"score": 0.37465753605256674, | |
"content": "@cli.command(name=\"plugins\")\n@click.option(\"--all\", help=\"Include built-in default plugins\", is_flag=True)\ndef plugins_list(all):\n \"List installed plugins\"\n click.echo(json.dumps(get_plugins(all), indent=2))", | |
"metadata": null | |
} | |
{ | |
"id": "llm/cli.py:1791", | |
"score": 0.36442988318076636, | |
"content": "@cli.command()\n@click.argument(\"packages\", nargs=-1, required=False)\n@click.option(\n \"-U\", \"--upgrade\", is_flag=True, help=\"Upgrade packages to latest version\"\n)\n@click.option(\n \"-e\",\n \"--editable\",\n help=\"Install a project in editable mode from this path\",\n)\n@click.option(\n \"--force-reinstall\",\n is_flag=True,\n help=\"Reinstall all packages even if they are already up-to-date\",\n)\n@click.option(\n \"--no-cache-dir\",\n is_flag=True,\n help=\"Disable the cache\",\n)\ndef install(packages, upgrade, editable, force_reinstall, no_cache_dir):\n \"\"\"Install packages from PyPI into the same environment as LLM\"\"\"\n args = [\"pip\", \"install\"]\n if upgrade:\n args += [\"--upgrade\"]\n if editable:\n args += [\"--editable\", editable]\n if force_reinstall:\n args += [\"--force-reinstall\"]\n if no_cache_dir:\n args += [\"--no-cache-dir\"]\n args += list(packages)\n sys.argv = args\n run_module(\"pip\", run_name=\"__main__\")", | |
"metadata": null | |
} | |
{ | |
"id": "llm/cli.py:1827", | |
"score": 0.3001879629201789, | |
"content": "@cli.command()\n@click.argument(\"packages\", nargs=-1, required=True)\n@click.option(\"-y\", \"--yes\", is_flag=True, help=\"Don't ask for confirmation\")\ndef uninstall(packages, yes):\n \"\"\"Uninstall Python packages from the LLM environment\"\"\"\n sys.argv = [\"pip\", \"uninstall\"] + list(packages) + ([\"-y\"] if yes else [])\n run_module(\"pip\", run_name=\"__main__\")", | |
"metadata": null | |
} | |
{ | |
"id": "tests/test_plugins.py:8", | |
"score": 0.26169557855107234, | |
"content": "def test_register_commands():\n importlib.reload(cli)\n\n def plugin_names():\n return [plugin[\"name\"] for plugin in llm.get_plugins()]\n\n assert \"HelloWorldPlugin\" not in plugin_names()\n\n class HelloWorldPlugin:\n __name__ = \"HelloWorldPlugin\"\n\n @hookimpl\n def register_commands(self, cli):\n @cli.command(name=\"hello-world\")\n def hello_world():\n \"Print hello world\"\n click.echo(\"Hello world!\")\n\n try:\n plugins.pm.register(HelloWorldPlugin(), name=\"HelloWorldPlugin\")\n importlib.reload(cli)\n\n assert \"HelloWorldPlugin\" in plugin_names()\n\n runner = CliRunner()\n result = runner.invoke(cli.cli, [\"hello-world\"])\n assert result.exit_code == 0\n assert result.output == \"Hello world!\\n\"\n\n finally:\n plugins.pm.unregister(name=\"HelloWorldPlugin\")\n importlib.reload(cli)\n assert \"HelloWorldPlugin\" not in plugin_names()", | |
"metadata": null | |
} | |
{ | |
"id": "tests/test_embed.py:9", | |
"score": 0.22549138284613493, | |
"content": "def test_demo_plugin():\n model = llm.get_embedding_model(\"embed-demo\")\n assert model.embed(\"hello world\") == [5, 5] + [0] * 14", | |
"metadata": null | |
} | |
{ | |
"id": "llm/plugins.py:18", | |
"score": 0.21343024460897292, | |
"content": "def load_plugins():\n global _loaded\n if _loaded:\n return\n _loaded = True\n if not hasattr(sys, \"_called_from_test\") and LLM_LOAD_PLUGINS is None:\n # Only load plugins if not running tests\n pm.load_setuptools_entrypoints(\"llm\")\n\n # Load any plugins specified in LLM_LOAD_PLUGINS\")\n if LLM_LOAD_PLUGINS is not None:\n for package_name in [\n name for name in LLM_LOAD_PLUGINS.split(\",\") if name.strip()\n ]:\n try:\n distribution = metadata.distribution(package_name) # Updated call\n llm_entry_points = [\n ep for ep in distribution.entry_points if ep.group == \"llm\"\n ]\n for entry_point in llm_entry_points:\n mod = entry_point.load()\n pm.register(mod, name=entry_point.name)\n # Ensure name can be found in plugin_to_distinfo later:\n pm._plugin_distinfo.append((mod, distribution)) # type: ignore\n except metadata.PackageNotFoundError:\n sys.stderr.write(f\"Plugin {package_name} could not be found\\n\")\n\n for plugin in DEFAULT_PLUGINS:\n mod = importlib.import_module(plugin)\n pm.register(mod, plugin)", | |
"metadata": null | |
} | |
{ | |
"id": "llm/cli.py:1836", | |
"score": 0.1972868321400161, | |
"content": "@cli.command()\n@click.argument(\"collection\", required=False)\n@click.argument(\"id\", required=False)\n@click.option(\n \"-i\",\n \"--input\",\n type=click.Path(exists=True, readable=True, allow_dash=True),\n help=\"File to embed\",\n)\n@click.option(\"-m\", \"--model\", help=\"Embedding model to use\")\n@click.option(\"--store\", is_flag=True, help=\"Store the text itself in the database\")\n@click.option(\n \"-d\",\n \"--database\",\n type=click.Path(file_okay=True, allow_dash=False, dir_okay=False, writable=True),\n envvar=\"LLM_EMBEDDINGS_DB\",\n)\n@click.option(\n \"-c\",\n \"--content\",\n help=\"Content to embed\",\n)\n@click.option(\"--binary\", is_flag=True, help=\"Treat input as binary data\")\n@click.option(\n \"--metadata\",\n help=\"JSON object metadata to store\",\n callback=json_validator(\"metadata\"),\n)\n@click.option(\n \"format_\",\n \"-f\",\n \"--format\",\n type=click.Choice([\"json\", \"blob\", \"base64\", \"hex\"]),\n help=\"Output format\",\n)\ndef embed(\n collection, id, input, model, store, database, content, binary, metadata, format_\n):\n \"\"\"Embed text and store or return the result\"\"\"\n if collection and not id:\n raise click.ClickException(\"Must provide both collection and id\")\n\n if store and not collection:\n raise click.ClickException(\"Must provide collection when using --store\")\n\n # Lazy load this because we do not need it for -c or -i versions\n def get_db():\n if database:\n return sqlite_utils.Database(database)\n else:\n return sqlite_utils.Database(user_dir() / \"embeddings.db\")\n\n collection_obj = None\n model_obj = None\n if collection:\n db = get_db()\n if Collection.exists(db, collection):\n # Load existing collection and use its model\n collection_obj = Collection(collection, db)\n model_obj = collection_obj.model()\n else:\n # We will create a new one, but that means model is required\n if not model:\n model = get_default_embedding_model()\n if model is None:\n raise click.ClickException(\n \"You need to specify an embedding model (no default model is set)\"\n )\n collection_obj = Collection(collection, db=db, model_id=model)\n model_obj = collection_obj.model()\n\n if model_obj is None:\n if model is None:\n model = get_default_embedding_model()\n try:\n model_obj = get_embedding_model(model)\n except UnknownModelError:\n raise click.ClickException(\n \"You need to specify an embedding model (no default model is set)\"\n )\n\n show_output = True\n if collection and (format_ is None):\n show_output = False\n\n # Resolve input text\n if not content:\n if not input or input == \"-\":\n # Read from stdin\n input_source = sys.stdin.buffer if binary else sys.stdin\n content = input_source.read()\n else:\n mode = \"rb\" if binary else \"r\"\n with open(input, mode) as f:\n content = f.read()\n\n if not content:\n raise click.ClickException(\"No content provided\")\n\n if collection_obj:\n embedding = collection_obj.embed(id, content, metadata=metadata, store=store)\n else:\n embedding = model_obj.embed(content)\n\n if show_output:\n if format_ == \"json\" or format_ is None:\n click.echo(json.dumps(embedding))\n elif format_ == \"blob\":\n click.echo(encode(embedding))\n elif format_ == \"base64\":\n click.echo(base64.b64encode(encode(embedding)).decode(\"ascii\"))\n elif format_ == \"hex\":\n click.echo(encode(embedding).hex())", | |
"metadata": null | |
} | |
{ | |
"id": "llm/cli.py:151", | |
"score": 0.19148804067255487, | |
"content": "@click.group(\n cls=DefaultGroup,\n default=\"prompt\",\n default_if_no_args=True,\n)\n@click.version_option()\ndef cli():\n \"\"\"\n Access Large Language Models from the command-line\n\n Documentation: https://llm.datasette.io/\n\n LLM can run models from many different providers. Consult the\n plugin directory for a list of available models:\n\n https://llm.datasette.io/en/stable/plugins/directory.html\n\n To get started with OpenAI, obtain an API key from them and:\n\n \\b\n $ llm keys set openai\n Enter key: ...\n\n Then execute a prompt like this:\n\n llm 'Five outrageous names for a pet pelican'\n \"\"\"", | |
"metadata": null | |
} | |
{ | |
"id": "llm/cli.py:1753", | |
"score": 0.1863117227526341, | |
"content": "@aliases.command(name=\"remove\")\n@click.argument(\"alias\")\ndef aliases_remove(alias):\n \"\"\"\n Remove an alias\n\n Example usage:\n\n \\b\n $ llm aliases remove turbo\n \"\"\"\n try:\n remove_alias(alias)\n except KeyError as ex:\n raise click.ClickException(ex.args[0])", | |
"metadata": null | |
} | |
{ | |
"id": "llm/hookspecs.py:8", | |
"score": 0.1672872472388833, | |
"content": "@hookspec\ndef register_commands(cli):\n \"\"\"Register additional CLI commands, e.g. 'llm mycommand ...'\"\"\"", | |
"metadata": null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can’t perform that action at this time.