Skip to content

Instantly share code, notes, and snippets.

@Zetaphor
Zetaphor / chainforge_openai_compatible_provider.py
Created January 2, 2025 19:34
Chainforge - OpenAI Compatible API Provider
from chainforge.providers import provider
import openai
from typing import Optional, Any, List, Dict, Union
# Define ChatHistory type locally
ChatMessage = Dict[str, str] # {"role": str, "content": str}
ChatHistory = List[ChatMessage]
# Schema for provider settings
OPENAI_COMPATIBLE_SETTINGS_SCHEMA = {
@Zetaphor
Zetaphor / hdel.fish
Created June 8, 2025 17:08
Fish history deleter
#
# function hdel
#
# Interactively search and delete entries from fish shell history.
# Requires 'fzf' to be installed.
#
function hdel --description "Interactively delete items from Fish history"
# 1. Dependency Check: Ensure fzf is installed.
if not command -q fzf
echo (set_color red)"Error: This function requires 'fzf' (fuzzy finder)."(set_color normal)
@Zetaphor
Zetaphor / dedup_history.fish
Created June 8, 2025 17:08
Fish history deduplication
function dedup_fish_history --description "Deduplicate Fish shell history (compatible with old/new versions)"
# 1. Get the path to the history file in a backwards-compatible way.
set -l histfile
# Try the modern way first.
if command -q fish_config && fish_config path history >/dev/null 2>&1
set histfile (fish_config path history)
else
# Fall back to the legacy default path for older fish versions.
set histfile "$HOME/.local/share/fish/fish_history"
# Some very old versions might use ~/.fish_history

Bluesky AI List Intersection

People who appear on both a pro-AI blocklist and an anti-AI blocklist, suggesting more nuanced positions in the AI debate.

Lists Analyzed

Anti-AI people lists (by @antiantiai.bsky.social)

List Members Description