Skip to content

Instantly share code, notes, and snippets.

View simonw's full-sized avatar

Simon Willison simonw

View GitHub Profile

What's new in the world of LLMs - March 2025 NICAR edition

https://simonwillison.net/2024/Dec/31/llms-in-2024/ is my in-depth review of 2024 in LLMs

https://llm.datasette.io/ is the CLI tool I’ve been building

I like https://github.com/taketwo/llm-ollama and https://ollama.com/ for running local models - my current favorite is https://ollama.com/library/mistral-small

https://simonwillison.net/tags/llms/ is my LLMs tag, but it has 963 items already so may take a while to dig through!

# /// script
# requires-python = ">=3.12"
# dependencies = [
# "click",
# ]
# ///
import os
import json
import re
uv run --with pillow --with google-genai python -c '
import os
from google import genai
from google.genai import types
from io import BytesIO
from PIL import Image

GEMINI_API_KEY = os.environ["GEMINI_API_KEY"]
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "click",
# "kokoro",
# "misaki[en]",
# "soundfile",
# ]
# ///
import click
@simonw
simonw / geocode.py
Created January 26, 2025 16:49
Geocode using the API bulit into macOS CoreLocation
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "pyobjc-core",
# "pyobjc-framework-CoreLocation",
# "click"
# ]
# ///
"""Basic geocoding using CoreLocation on macOS."""
# /// script
# dependencies = [
# "pyobjc-core",
# "pyobjc-framework-CoreLocation"
# ]
# ///
"""Get named timezone for a location on macOS using CoreLocation
To use this script, you need to have pyobjc-core and pyobjc-framework-CoreLocation installed:
@simonw
simonw / response.json
Created January 1, 2025 16:04
GPT-4o audio response
This file has been truncated, but you can view the full file.
{
"id": "chatcmpl-AkvTd3qWivjaB4rHJUSMAu7UJRTsM",
"object": "chat.completion",
"created": 1735747393,
"model": "gpt-4o-audio-preview-2024-12-17",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
@simonw
simonw / response.json
Created December 18, 2024 02:07
GPT-4o audio response
This file has been truncated, but you can view the full file.
{
"id": "chatcmpl-Afdl8zH5y8xDqqdZi7UiPyYZfkP58",
"object": "chat.completion",
"created": 1734487646,
"model": "gpt-4o-audio-preview-2024-12-17",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
@simonw
simonw / response.json
Created December 18, 2024 02:07
GPT-4o audio response
This file has been truncated, but you can view the full file.
{
"id": "chatcmpl-AfdkL95RjVZiUuJIUWdS0CCi7iM0S",
"object": "chat.completion",
"created": 1734487597,
"model": "gpt-4o-mini-audio-preview-2024-12-17",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
@simonw
simonw / response.json
Created December 17, 2024 21:49
GPT-4o audio response
This file has been truncated, but you can view the full file.
{
"id": "chatcmpl-AfZjInFYyuKnJGB7UeC613oqPJFyF",
"object": "chat.completion",
"created": 1734472156,
"model": "gpt-4o-audio-preview-2024-12-17",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
OSZAR »